forked from Nexus/nexus
parent
df592b3f38
commit
ed84410039
13 changed files with 540 additions and 66 deletions
29
lib/widgets/sheet_layout.dart
Normal file
29
lib/widgets/sheet_layout.dart
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import "package:material_ui/material_ui.dart";
|
||||
|
||||
class const SheetLayout({
|
||||
required final Widget title,
|
||||
required final List<Widget> children,
|
||||
required final List<Widget> actions,
|
||||
super.key,
|
||||
}) extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) => Padding(
|
||||
padding: .only(bottom: MediaQuery.viewInsetsOf(context).bottom),
|
||||
child: SingleChildScrollView(
|
||||
padding: const .all(24),
|
||||
child: Column(
|
||||
mainAxisSize: .min,
|
||||
crossAxisAlignment: .stretch,
|
||||
spacing: 12,
|
||||
children: [
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headlineSmall!,
|
||||
child: title,
|
||||
),
|
||||
...children,
|
||||
Row(mainAxisAlignment: .end, spacing: 8, children: actions),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue