show<T> method
Future<T?>
show<T>({
- required WidgetBuilder builder,
- AxisDirection direction = AxisDirection.left,
- double? maxPrimarySize,
- bool enabledDrag = true,
- Color modalColor = Colors.black54,
- bool ignoreModalPointer = false,
- bool enabledFade = false,
通过路由打开抽屉,适用于无需保持状态的弹窗
Implementation
Future<T?> show<T>({
required WidgetBuilder builder,
AxisDirection direction = AxisDirection.left,
double? maxPrimarySize,
bool enabledDrag = true,
Color modalColor = Colors.black54,
bool ignoreModalPointer = false,
bool enabledFade = false,
}) async {
final route = _ElDrawerRoute<T>(
direction: direction,
drawerMaxSize: _calcDrawerMaxSize(
size: maxPrimarySize,
overlaySize: el.router.overlay.context.size!,
direction: direction,
),
enabledDrag: enabledDrag,
modalColor: modalColor,
ignoreModalPointer: ignoreModalPointer,
enabledFade: enabledFade,
builder: builder,
);
return await el.router.push<T>(route);
}