create method

  1. @override
Widget create(
  1. BuildContext context,
  2. Widget title,
  3. Widget content,
  4. List<UIAction> actions,
  5. UIAction? cancel,
)
override

Implementation

@override
Widget create(
  BuildContext context,
  Widget title,
  Widget content,
  List<UIAction> actions,
  UIAction? cancel,
) {
  return BottomSheet(
    onClosing: () {},
    builder: (_) {
      return Container(
        width: double.infinity,
        padding: const EdgeInsets.symmetric(vertical: 20.0),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            title,
            const SizedBox(height: 10),
            content,
            const SizedBox(height: 40),
            Column(
              children: actions.map(
                (action) {
                  return _button(action);
                },
              ).toList(),
            ),
            _cancelButton(context, cancel!),
          ],
        ),
      );
    },
  );
}