2021-05-25 21:53:54 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2021-06-08 18:52:44 +00:00
|
|
|
import 'package:selfprivacy/config/brand_colors.dart';
|
2021-05-25 21:53:54 +00:00
|
|
|
|
|
|
|
class BrandBottomSheet extends StatelessWidget {
|
|
|
|
const BrandBottomSheet({Key? key, required this.child}) : super(key: key);
|
|
|
|
|
|
|
|
final Widget child;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-06-08 18:52:44 +00:00
|
|
|
var mainHeight = MediaQuery.of(context).size.height -
|
|
|
|
MediaQuery.of(context).padding.top -
|
|
|
|
100;
|
|
|
|
return ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(maxHeight: mainHeight + 4 + 6),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Center(
|
|
|
|
child: Container(
|
|
|
|
height: 4,
|
|
|
|
width: 30,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(2),
|
|
|
|
color: BrandColors.gray4,
|
|
|
|
),
|
|
|
|
),
|
2021-05-25 21:53:54 +00:00
|
|
|
),
|
2021-06-08 18:52:44 +00:00
|
|
|
SizedBox(height: 6),
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
child: ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(maxHeight: mainHeight),
|
|
|
|
child: Scaffold(body: child),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2021-05-25 21:53:54 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|