showChannelInfoBottomSheet<T> function

PersistentBottomSheetController showChannelInfoBottomSheet<T>({
  1. required BuildContext context,
  2. required Channel channel,
  3. Color? backgroundColor,
  4. double? elevation,
  5. BoxConstraints? constraints,
  6. AnimationController? transitionAnimationController,
  7. Clip? clipBehavior = Clip.hardEdge,
  8. ShapeBorder? shape = _kDefaultChannelInfoBottomSheetShape,
  9. void onMemberTap(
    1. Member
    )?,
  10. VoidCallback? onViewInfoTap,
  11. VoidCallback? onLeaveChannelTap,
  12. VoidCallback? onDeleteConversationTap,
  13. VoidCallback? onCancelTap,
})

Shows a material design bottom sheet in the nearest Scaffold ancestor. If you wish to show a persistent bottom sheet, use Scaffold.bottomSheet.

Returns a controller that can be used to close and otherwise manipulate the bottom sheet.

The optional backgroundColor, elevation, shape, clipBehavior, constraints and transitionAnimationController parameters can be passed in to customize the appearance and behavior of persistent bottom sheets (see the documentation for these on BottomSheet for more details).

To rebuild the bottom sheet (e.g. if it is stateful), call PersistentBottomSheetController.setState on the controller returned by this method.

The new bottom sheet becomes a LocalHistoryEntry for the enclosing ModalRoute and a back button is added to the app bar of the Scaffold that closes the bottom sheet.

To create a persistent bottom sheet that is not a LocalHistoryEntry and does not add a back button to the enclosing Scaffold's app bar, use the Scaffold.bottomSheet constructor parameter.

A closely related widget is a modal bottom sheet, which is an alternative to a menu or a dialog and prevents the user from interacting with the rest of the app. Modal bottom sheets can be created and displayed with the showModalBottomSheet function.

The context argument is used to look up the Scaffold for the bottom sheet. It is only used when the method is called. Its corresponding widget can be safely removed from the tree before the bottom sheet is closed.

See also:

Implementation

PersistentBottomSheetController showChannelInfoBottomSheet<T>({
  required BuildContext context,
  required Channel channel,
  Color? backgroundColor,
  double? elevation,
  BoxConstraints? constraints,
  AnimationController? transitionAnimationController,
  Clip? clipBehavior = Clip.hardEdge,
  ShapeBorder? shape = _kDefaultChannelInfoBottomSheetShape,
  void Function(Member)? onMemberTap,
  VoidCallback? onViewInfoTap,
  VoidCallback? onLeaveChannelTap,
  VoidCallback? onDeleteConversationTap,
  VoidCallback? onCancelTap,
}) =>
    showBottomSheet(
      context: context,
      backgroundColor: backgroundColor,
      elevation: elevation,
      shape: shape,
      clipBehavior: clipBehavior,
      constraints: constraints,
      transitionAnimationController: transitionAnimationController,
      builder: (BuildContext context) => StreamChannelInfoBottomSheet(
        channel: channel,
        onMemberTap: onMemberTap,
        onViewInfoTap: onViewInfoTap,
        onLeaveChannelTap: onLeaveChannelTap,
        onDeleteConversationTap: onDeleteConversationTap,
        onCancelTap: onCancelTap,
      ),
    );