CupertinoBottomSheetAppBar.withCloseIcon constructor

CupertinoBottomSheetAppBar.withCloseIcon({
  1. required String title,
  2. VoidCallback? onClosePressed,
  3. TextStyle? headerStyle,
  4. Color? iconColor,
  5. int maxLines = 1,
})

Implementation

factory CupertinoBottomSheetAppBar.withCloseIcon({
  required String title,
  VoidCallback? onClosePressed,
  TextStyle? headerStyle,
  Color? iconColor,
  int maxLines = 1,
}) {
  return CupertinoBottomSheetAppBar(
    title: title,
    padding: null,
    maxLines: maxLines,
    headerStyle: headerStyle,
    trailing: IconButton(
      splashRadius: kToolbarHeight * .4,
      icon: Icon(
        Icons.close,
        color: iconColor ?? headerStyle?.color,
      ),
      onPressed: onClosePressed ?? closeCupertinoBottomSheet,
    ),
  );
}