admin 26-5-2
This commit is contained in:
@@ -9,40 +9,50 @@ class MyScafolld extends StatelessWidget {
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.body,
|
||||
this.action = const Icon(
|
||||
Icons.clear,
|
||||
color: AppColor.secondaryColor,
|
||||
),
|
||||
this.action,
|
||||
required this.isleading,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final List<Widget> body;
|
||||
final Widget action;
|
||||
final Widget? action;
|
||||
final bool isleading;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
backgroundColor: AppColor.bg,
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
backgroundColor: AppColor.bg,
|
||||
elevation: 0,
|
||||
leadingWidth: 70,
|
||||
leading: isleading
|
||||
? IconButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios_new,
|
||||
color: AppColor.primaryColor,
|
||||
? Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(right: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.surfaceElevated,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.divider),
|
||||
),
|
||||
child: IconButton(
|
||||
onPressed: () => Get.back(),
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios_new_rounded,
|
||||
color: AppColor.textPrimary,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
actions: [action],
|
||||
: null,
|
||||
actions: [
|
||||
if (action != null) action!,
|
||||
const SizedBox(width: 16),
|
||||
],
|
||||
title: Text(
|
||||
title,
|
||||
style: AppStyle.title.copyWith(fontSize: 30),
|
||||
style: AppStyle.headTitle,
|
||||
),
|
||||
),
|
||||
body: SafeArea(child: Stack(children: body)));
|
||||
|
||||
Reference in New Issue
Block a user