selfprivacy.org.app/lib/ui/components/brand_modal_sheet/brand_modal_sheet.dart

64 lines
2.2 KiB
Dart
Raw Normal View History

2020-11-30 12:03:55 +02:00
import 'package:flutter/material.dart';
2020-12-10 22:33:19 +02:00
var navigatorKey = GlobalKey<NavigatorState>();
2020-11-30 12:03:55 +02:00
class BrandModalSheet extends StatelessWidget {
const BrandModalSheet({
2021-03-15 17:39:44 +02:00
Key? key,
2020-11-30 12:03:55 +02:00
this.child,
}) : super(key: key);
2021-03-15 17:39:44 +02:00
final Widget? child;
2020-11-30 12:03:55 +02:00
@override
Widget build(BuildContext context) {
2020-12-03 18:52:53 +02:00
return DraggableScrollableSheet(
2020-12-10 22:33:19 +02:00
minChildSize: 0.95,
2020-12-03 18:52:53 +02:00
initialChildSize: 1,
maxChildSize: 1,
builder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
physics: ClampingScrollPhysics(),
2020-11-30 12:03:55 +02:00
child: Container(
2020-12-03 18:52:53 +02:00
child: Column(
children: [
2020-12-10 22:33:19 +02:00
GestureDetector(
onTap: () => Navigator.of(context).pop(),
behavior: HitTestBehavior.opaque,
2020-12-03 18:52:53 +02:00
child: Container(
2020-12-10 22:33:19 +02:00
width: double.infinity,
child: Center(
child: Padding(
padding: EdgeInsets.only(top: 132, bottom: 6),
child: Container(
height: 4,
width: 30,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xFFE3E3E3).withOpacity(0.65),
),
),
),
2020-12-03 18:52:53 +02:00
),
),
),
Container(
2021-03-18 14:24:30 +02:00
constraints: BoxConstraints(
minHeight: MediaQuery.of(context).size.height - 132,
maxHeight: MediaQuery.of(context).size.height - 132,
),
decoration: BoxDecoration(
borderRadius:
BorderRadius.vertical(top: Radius.circular(20)),
color: Theme.of(context).scaffoldBackgroundColor,
),
width: double.infinity,
child: child),
2020-12-03 18:52:53 +02:00
],
2020-11-30 12:03:55 +02:00
),
),
2020-12-03 18:52:53 +02:00
);
});
2020-11-30 12:03:55 +02:00
}
}