mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-19 23:55:26 +02:00
39 lines
1.0 KiB
Dart
39 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:quid_faciam_hodie/constants/spacing.dart';
|
|
|
|
class ModalSheet extends StatelessWidget {
|
|
final Widget child;
|
|
|
|
const ModalSheet({
|
|
Key? key,
|
|
required this.child,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
|
|
return Wrap(
|
|
crossAxisAlignment: WrapCrossAlignment.center,
|
|
children: <Widget>[
|
|
Padding(
|
|
padding:
|
|
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
|
child: Material(
|
|
borderRadius: const BorderRadius.only(
|
|
topLeft: Radius.circular(LARGE_SPACE),
|
|
topRight: Radius.circular(LARGE_SPACE),
|
|
),
|
|
color: theme.bottomSheetTheme.modalBackgroundColor ??
|
|
theme.bottomAppBarColor,
|
|
child: Container(
|
|
padding: const EdgeInsets.all(MEDIUM_SPACE),
|
|
child: child,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|