build method

  1. @override
dynamic build(
  1. dynamic context,
  2. dynamic ref
)

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  return isCupertino
      ? CupertinoActionSheet(
          title: header ?? const SizedBox.shrink(),
          message: content,
          actions: <Widget>[
            CupertinoActionSheetAction(
              onPressed: () => Navigator.pop(context),
              child: Text(L10n.of(context).close),
            ),
          ],
        )
      : GestureDetector(
          onTap: () {
            // Close the bottom sheet when tapping outside of it.
            Navigator.pop(context);
          },
          child: Container(
            height: sheetHeight,
            padding: const EdgeInsets.all(16.0),
            decoration: sheetDecoration,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                header ?? const SizedBox.shrink(),
                const SizedBox(height: 16.0),
                Expanded(
                  child: SingleChildScrollView(
                    child: content,
                  ),
                ),
              ],
            ),
          ),
        );
}