openDrawer<T> function
Future<T?>
openDrawer<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- required OverlayPosition position,
- bool expands = false,
- bool draggable = true,
- bool barrierDismissible = true,
- WidgetBuilder? backdropBuilder,
- bool useSafeArea = true,
- bool showDragHandle = true,
- BorderRadiusGeometry? borderRadius,
- Size? dragHandleSize,
- bool transformBackdrop = true,
- double? surfaceOpacity,
- double? surfaceBlur,
- Color? barrierColor,
Implementation
Future<T?> openDrawer<T>({
required BuildContext context,
required WidgetBuilder builder,
required OverlayPosition position,
bool expands = false,
bool draggable = true,
bool barrierDismissible = true,
WidgetBuilder? backdropBuilder,
bool useSafeArea = true,
bool showDragHandle = true,
BorderRadiusGeometry? borderRadius,
Size? dragHandleSize,
bool transformBackdrop = true,
double? surfaceOpacity,
double? surfaceBlur,
Color? barrierColor,
}) {
return openRawDrawer<T>(
context: context,
barrierDismissible: barrierDismissible,
backdropBuilder: backdropBuilder,
useSafeArea: useSafeArea,
transformBackdrop: transformBackdrop,
builder: (context, extraSize, size, padding, stackIndex) {
return DrawerWrapper(
position: position,
expands: expands,
draggable: draggable,
extraSize: extraSize,
size: size,
showDragHandle: showDragHandle,
dragHandleSize: dragHandleSize,
padding: padding,
borderRadius: borderRadius,
surfaceOpacity: surfaceOpacity,
surfaceBlur: surfaceBlur,
barrierColor: barrierColor,
stackIndex: stackIndex,
child: builder(context),
);
},
position: position,
).future;
}