build method
dynamic
build( - dynamic context
)
Implementation
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final colorScheme = theme.colorScheme;
return Material(
elevation: 1,
surfaceTintColor: colorScheme.surfaceTint,
borderRadius: const BorderRadius.horizontal(left: Radius.circular(28)),
child: Scaffold(
resizeToAvoidBottomInset: true,
body: Container(
// keep space shell top bar to prevent us being covered by front-camera etc.
padding: const EdgeInsets.only(top: 12),
child: CustomScrollView(
shrinkWrap: true,
slivers: [
SliverList(
delegate: SliverChildListDelegate(
[
_SliverHeader(
header: header,
addBackIconButton: addBackIconButton,
addCloseIconButton: addCloseIconButton,
backButtonTooltip: backButtonTooltip,
closeButtonTooltip: closeButtonTooltip,
),
if (body != null) SingleChildScrollView(child: body),
...(delegates ?? []),
],
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Visibility(
visible: addActions,
child: _SliverFooter(
addDivider: addDivider,
confirmActionTitle: confirmActionTitle,
confirmActionKey: confirmActionKey,
cancelActionTitle: cancelActionTitle,
actions: actions,
confirmActionOnPressed: confirmActionOnPressed,
cancelActionOnPressed: cancelActionOnPressed,
),
),
),
],
),
),
),
);
}