I want to be able to put 2 ListView in a row so they are totally independant and I can add items dynamically to it. As if I had a Column for my score and next to it, a Column for the number of kill.
Does anyonw have an idea how to do it ?
I tried that :
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
height: 200,
child: ListView(
children: <Widget>[
Text("Hey")
],
),
),
VerticalDivider(),
Container(
height: 200,
child: ListView(
children: <Widget>[
Text("Hey")
]),
),
],
)
Here is my full class :
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class GamePage extends StatefulWidget {
@override
_GamePageState createState() => _GamePageState();
}
class _GamePageState extends State<GamePage>{
@override
Widget build(BuildContext context){
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text("Jeu", style: TextStyle(fontSize: 20.0),),
),
child: SafeArea(
child: Container(
padding: EdgeInsets.all(20),
child: Column(
children: <Widget>[
CupertinoTextField(
placeholder: "Team 1",
),
Container(padding: EdgeInsets.all(5.0),),
Row(
children: <Widget>[
Expanded(child: Container(),),
Text("Annonces :", textAlign: TextAlign.center,),
Expanded(child: Container(),),
Text("Points réguliers :", textAlign: TextAlign.center,),
Expanded(child: Container(),),
],
),
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
height: 200,
child: ListView(
children: <Widget>[
Text("Hey")
],
),
),
VerticalDivider(),
Container(
height: 200,
child: ListView(
children: <Widget>[
Text("Hey")
]),
),
],
)
],
),
),
)
);
}
}
Does someone has any solution ?
