2020-11-30 12:03:55 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class BrandModalSheet extends StatelessWidget {
|
|
|
|
const BrandModalSheet({
|
|
|
|
Key key,
|
|
|
|
this.child,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
final Widget child;
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-12-03 18:52:53 +02:00
|
|
|
return DraggableScrollableSheet(
|
|
|
|
minChildSize: 0.5,
|
|
|
|
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: [
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 32, bottom: 6),
|
|
|
|
child: Container(
|
|
|
|
height: 4,
|
|
|
|
width: 30,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(2),
|
|
|
|
color: Color(0xFFE3E3E3).withOpacity(0.65),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
minHeight: MediaQuery.of(context).size.height - 32 - 4,
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.vertical(top: Radius.circular(20)),
|
2020-12-08 21:26:51 +02:00
|
|
|
color: Theme.of(context).scaffoldBackgroundColor,
|
2020-12-03 18:52:53 +02:00
|
|
|
),
|
|
|
|
width: double.infinity,
|
|
|
|
child: child,
|
|
|
|
),
|
|
|
|
],
|
2020-11-30 12:03:55 +02:00
|
|
|
),
|
|
|
|
),
|
2020-12-03 18:52:53 +02:00
|
|
|
);
|
|
|
|
});
|
2020-11-30 12:03:55 +02:00
|
|
|
}
|
|
|
|
}
|