Skip to content

Instantly share code, notes, and snippets.

@NishantDesai1306
Created June 29, 2019 08:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NishantDesai1306/1333b04a17f4d88d6a6fbd229fa6dec3 to your computer and use it in GitHub Desktop.
Save NishantDesai1306/1333b04a17f4d88d6a6fbd229fa6dec3 to your computer and use it in GitHub Desktop.
Code for DefaultAppBar
class DefaultAppBar extends StatefulWidget implements PreferredSizeWidget {
@override
Size get preferredSize => Size.fromHeight(56.0);
@override
_DefaultAppBarState createState() => _DefaultAppBarState();
}
class _DefaultAppBarState extends State<DefaultAppBar> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
AppBar(
title: Text("Flutter App"),
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
),
IconButton(
icon: Icon(Icons.more_vert),
onPressed: () {},
)
],
),
]
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment