2024-04-14 07:58:27 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2024-04-16 12:36:47 +00:00
|
|
|
import 'package:solian/widgets/common_wrapper.dart';
|
2024-04-14 07:58:27 +00:00
|
|
|
import 'package:solian/widgets/navigation_drawer.dart';
|
|
|
|
|
2024-04-16 12:36:47 +00:00
|
|
|
class IndentWrapper extends LayoutWrapper {
|
2024-04-14 07:58:27 +00:00
|
|
|
final bool? hideDrawer;
|
|
|
|
|
2024-04-16 12:36:47 +00:00
|
|
|
const IndentWrapper({
|
|
|
|
super.key,
|
|
|
|
super.child,
|
|
|
|
required super.title,
|
|
|
|
super.floatingActionButton,
|
|
|
|
super.appBarActions,
|
|
|
|
this.hideDrawer,
|
|
|
|
super.noSafeArea,
|
|
|
|
}) : super();
|
2024-04-14 07:58:27 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final content = child ?? Container();
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(title: Text(title), actions: appBarActions),
|
|
|
|
floatingActionButton: floatingActionButton,
|
|
|
|
drawer: (hideDrawer ?? false) ? null : const SolianNavigationDrawer(),
|
|
|
|
body: (noSafeArea ?? false) ? content : SafeArea(child: content),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|