CupertinoBottomSheetAppBar.withCloseButton constructor
CupertinoBottomSheetAppBar.withCloseButton({})
Implementation
factory CupertinoBottomSheetAppBar.withCloseButton({
required String title,
required String buttonText,
VoidCallback? onClosePressed,
TextStyle? headerStyle,
TextStyle? buttonTextStyle,
int maxLines = 1,
}) {
return CupertinoBottomSheetAppBar(
title: title,
headerStyle: headerStyle,
maxLines: maxLines,
trailing: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: onClosePressed ?? closeCupertinoBottomSheet,
child: Text(
buttonText,
style: buttonTextStyle,
),
),
);
}