some refactors
This commit is contained in:
@@ -60,3 +60,34 @@ PreferredSizeWidget appBar({
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSizeWidget tabletAppBar({
|
||||
required String title,
|
||||
required GlobalKey<ScaffoldState> key,
|
||||
}) {
|
||||
return PreferredSize(
|
||||
preferredSize: const Size.fromHeight(64),
|
||||
child: AppBar(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
elevation: 0,
|
||||
titleSpacing: 0,
|
||||
leading: Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 24.0.w()),
|
||||
child: SvgPicture.asset(AssetsManager.logoSmall),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Padding(
|
||||
padding: EdgeInsetsDirectional.only(end: 24.0.w()),
|
||||
child: SvgPicture.asset(
|
||||
AssetsManager.menu,
|
||||
height: 32.0.w(),
|
||||
width: 32.0.w(),
|
||||
),
|
||||
),
|
||||
onPressed: () => key.currentState!.openDrawer(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user