fix the row option

dev_faiz
Elham Rababh 4 years ago
parent f75291d602
commit 449b0f3014

@ -14,8 +14,8 @@ class MyHomePage extends StatefulWidget {
String title ="MyHomePage"; String title ="MyHomePage";
bool haveOnePatient = false; bool haveOnePatient = false;
bool haveLessThan3Patient = true; bool have3Patient = true;
bool haveListOfPatient = true; bool haveListOfPatient = false;
@override @override
@ -35,22 +35,25 @@ class _MyHomePageState extends State<MyHomePage> {
Row( Row(
children: [ children: [
FirstColumn( FirstColumn(
haveLessThan3Patient: widget.haveLessThan3Patient, have3Patient: widget.have3Patient,
), ),
const SizedBox( const SizedBox(
width: 40, width: 40,
), ),
if(widget.haveListOfPatient)
Container( Container(
width: 10, width: 10,
height:SizeConfig.getHeightMultiplier()*40, height:SizeConfig.getHeightMultiplier()*40,
color: Colors.grey, color: Colors.grey,
), ),
if(widget.haveListOfPatient)
const SizedBox( const SizedBox(
width: 40, width: 40,
), ),
if(widget.haveListOfPatient)
const QueItemList() const QueItemList()
], ],
): FirstColumn(haveLessThan3Patient: widget.haveLessThan3Patient,), ): FirstColumn(have3Patient: widget.have3Patient,),
], ],
), ),
bottomSheet: Container( bottomSheet: Container(
@ -81,9 +84,9 @@ class _MyHomePageState extends State<MyHomePage> {
} }
class FirstColumn extends StatelessWidget { class FirstColumn extends StatelessWidget {
final bool haveLessThan3Patient; final bool have3Patient;
const FirstColumn({Key key, this.haveLessThan3Patient = false}) : super(key: key); const FirstColumn({Key key, this.have3Patient = false}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -93,7 +96,7 @@ class FirstColumn extends StatelessWidget {
const QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true, haveListOfPatient: true,), const QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true, haveListOfPatient: true,),
SizedBox( SizedBox(
height: SizeConfig.getHeightMultiplier() * 5,), height: SizeConfig.getHeightMultiplier() * 5,),
if(haveLessThan3Patient) if(have3Patient)
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: const [ children: const [

@ -44,6 +44,7 @@ class QueItem extends StatelessWidget {
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
isNurseVisit isNurseVisit

Loading…
Cancel
Save