i am new to flutter and i Need help with align widget
Here have used alignment center for the TabBar widget and
alignment bottomRight for Text widget
and i didnt get the correct result here.
This is the Output image:
Source Code:
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context);
return SafeArea(
child: DefaultTabController(
length: 2,
child: Scaffold(
backgroundColor: Colors.amber,
body: Column(
mainAxisSize: MainAxisSize.min,
children: [
Align(
*[**alignment: Alignment.bottomRight,**][1]*
child: Text("data"),
),
Align(
***alignment: Alignment.center,***
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: 300,
maxHeight: 60,
),
child: AppBar(
automaticallyImplyLeading: false,
bottom: TabBar(
tabs: [
Tab(
icon: Icon(Icons.directions_bike),
),
Tab(
icon: Icon(
Icons.directions_car,
),
),
],
),
),
),
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 100,
maxWidth: 100,
),
child: Container(
color: Colors.blue,
),
)
],
),
),
),
);
}
question from:
https://stackoverflow.com/questions/65941855/unable-to-align-widget-using-align-flutter 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…