show method
dynamic
show({
- required BuildContext context,
- Text? title,
- required Text description,
- required CustomSheetColor color,
- required SweetSheetAction positive,
- SweetSheetAction? negative,
- IconData? icon,
- bool isDismissible = true,
Implementation
show({
required BuildContext context,
Text? title,
required Text description,
required CustomSheetColor color,
required SweetSheetAction positive,
SweetSheetAction? negative,
IconData? icon,
bool useRootNavigator = false,
bool isDismissible = true,
}) {
showModalBottomSheet(
isDismissible: isDismissible,
enableDrag: isDismissible,
context: context,
isScrollControlled: true,
useRootNavigator: useRootNavigator,
builder: (BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: double.infinity,
color: color.main,
padding:
const EdgeInsets.symmetric(horizontal: 24.0, vertical: 24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
title == null
? Container()
: DefaultTextStyle(
style: TextStyle(
fontSize: 24,
color: Colors.white,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.start,
child: title),
_buildContent(color, description, icon)
],
),
),
Container(
padding: const EdgeInsets.all(8.0),
color: color.accent,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: _buildActions(positive, negative),
),
)
],
);
},
);
}