mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
30 lines
881 B
Dart
30 lines
881 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lunasea/system/state.dart';
|
|
import 'package:lunasea/widgets/ui.dart';
|
|
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
|
|
|
class LunaBottomModalSheet<T> {
|
|
@protected
|
|
Future<T?> showModal({
|
|
Widget Function(BuildContext context)? builder,
|
|
}) async {
|
|
return showBarModalBottomSheet<T>(
|
|
context: LunaState.context,
|
|
expand: false,
|
|
backgroundColor:
|
|
LunaTheme.isAMOLEDTheme ? Colors.black : LunaColours.secondary,
|
|
shape: LunaUI.shapeBorder,
|
|
builder: builder ?? this.builder as Widget Function(BuildContext),
|
|
closeProgressThreshold: 0.90,
|
|
elevation: LunaUI.ELEVATION,
|
|
);
|
|
}
|
|
|
|
Widget? builder(BuildContext context) => null;
|
|
|
|
Future<dynamic> show({
|
|
Widget Function(BuildContext context)? builder,
|
|
}) async =>
|
|
showModal(builder: builder);
|
|
}
|