I am making a practice app in flutter and stuck on this: How can i align widgets such that; 1. An icon stays at extreme left of appbar 2. Text widget stays in middle. 3. button stays at extreme right of appbar. here is the image for what i am talking about
3 Answers
1
votes
You can do it using AppBar widget.
Note: If you want to implement drawer then use drawer property.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Title"),
centerTitle: true,
leading: Icon(Icons.menu),
actions: [Icon(Icons.comment)],
),
body: Container(),
);
}
0
votes