Flutter/ 3 Rows in one Container or AlertDialog
357
This is your code now:
Container(
constraints: BoxConstraints(minWidth: 0, maxWidth: 300, maxHeight: 600),
padding: EdgeInsets.all(0),
width: 300.0,
height: 560.0,
child: //Row(..the rest you want to copy"
Add a column before this row, and replicate your Row
three times:
Container(
constraints: BoxConstraints(minWidth: 0, maxWidth: 300, maxHeight: 600),
padding: EdgeInsets.all(0),
width: 300.0,
height: 560.0,
child: Column( children: [
Row1("..the rest you want to copy"),
Row2("..the rest you want to copy"),
Row3("..the rest you want to copy)"
]), //Column
), //Container
Author by
bayrixx
Updated on December 29, 2022Comments
-
bayrixx over 1 year
I'm trying to make an Alert Dialog with a navigation window. There should be 3 Rows with different IconButtons to Navigate on another site. Unfortunately I'm new to Flutter and don't know how to make 2 more Rows. Can someone please help me? Is it even possible to do that? I mean I can't add any more children or can I? I Don't know if i should split it in 3 AlertDialogs or is that stupid?
That was my Layout for the first Row
Code:
import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; void popup(BuildContext context) { var alertDialog = AlertDialog( backgroundColor: Color(0xffb09c84), title: Text(''), content: Container( constraints: BoxConstraints(minWidth: 0, maxWidth: 300, maxHeight: 600), padding: EdgeInsets.all(0), width: 300.0, height: 560.0, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( children: [ IconButton( icon: FaIcon( FontAwesomeIcons.newspaper, size: 44.0, ), onPressed: () {}, ), SizedBox(height: 2.0), Container( child: Text( " Zeitung", style: TextStyle( fontSize: 14.0, ), ), ), ], ), Column( children: [ IconButton( icon: FaIcon( FontAwesomeIcons.envelope, size: 44.0, ), onPressed: () {}, ), SizedBox(height: 2.0), Container( child: Text( " News", textAlign: TextAlign.center, style: TextStyle( fontSize: 14.0, ), ), ), ], ), Column( children: [ IconButton( icon: FaIcon( FontAwesomeIcons.creativeCommonsSampling, color: Colors.black, size: 44.0, ), onPressed: () {}, ), SizedBox( height: 3.0, ), Container( child: Text( " Vertretung", style: TextStyle( fontSize: 14.0, ), ), ), ], ), ], ), ), ); showDialog(context: context, builder: (BuildContext context) => alertDialog); }
-
bayrixx about 3 yearsFirst thanks for your help. Can you please explain me exactly what the new Rows mean. I will edit my question because i think i asked wrong.
-
Huthaifa Muayyad about 3 yearsDon't mention it, the rows were based on the diagram you posted. Will wait for your update.
-
bayrixx about 3 yearsI got it !! I try to finish the 3 Rows and then tell you how it worked out or if i have more problem with this. Thanks so much!
-
Huthaifa Muayyad about 3 yearsGreat, yes please update regardless! You're welcome anytime.
-
bayrixx about 3 yearsWorked out pretty good. Glad you helped me!
-
Huthaifa Muayyad about 3 yearsFantastic, glad you asked!