getPrimarySettingAppbar static method
Implementation
static Widget getPrimarySettingAppbar(BuildContext context, String title, { bool light = false }){
return AppBar(
backgroundColor: light ? Colors.white : MyColors.primary,
systemOverlayStyle: SystemUiOverlayStyle(
statusBarBrightness: Brightness.dark
), titleSpacing: 0,
iconTheme: IconThemeData(color: light ? MyColors.grey_60 : Colors.white),
title: Text(title, style: MyText.title(context)!.copyWith(
color: light ? MyColors.grey_60 : Colors.white
)),
leading: IconButton(
icon: Icon(Icons.menu),
onPressed: () {
Navigator.pop(context);
},
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
onPressed: () {
showToastClicked(context, "Search");
},
),
PopupMenuButton<String>(
onSelected: (String value){
showToastClicked(context, value);
},
itemBuilder: (context) => [
PopupMenuItem(
value: "Settings", child: Text("Settings"),
),
],
)
]
);
}