mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 07:35:13 +00:00
design: Move chatbackup in adaptive bottom sheet
This commit is contained in:
parent
8826815f8e
commit
195694a252
2 changed files with 9 additions and 15 deletions
|
@ -13,6 +13,7 @@ import 'package:share_plus/share_plus.dart';
|
|||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/widgets/adaptive_flat_button.dart';
|
||||
import '../../utils/adaptive_bottom_sheet.dart';
|
||||
import '../key_verification/key_verification_dialog.dart';
|
||||
|
||||
class BootstrapDialog extends StatefulWidget {
|
||||
|
@ -24,18 +25,10 @@ class BootstrapDialog extends StatefulWidget {
|
|||
required this.client,
|
||||
}) : super(key: key);
|
||||
|
||||
Future<bool?> show(BuildContext context) => PlatformInfos.isCupertinoStyle
|
||||
? showCupertinoDialog(
|
||||
Future<bool?> show(BuildContext context) => showAdaptiveBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => this,
|
||||
barrierDismissible: true,
|
||||
useRootNavigator: false,
|
||||
)
|
||||
: showDialog(
|
||||
context: context,
|
||||
builder: (context) => this,
|
||||
barrierDismissible: true,
|
||||
useRootNavigator: false,
|
||||
maxHeight: 600,
|
||||
);
|
||||
|
||||
@override
|
||||
|
|
|
@ -9,6 +9,7 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||
required Widget Function(BuildContext) builder,
|
||||
bool isDismissible = true,
|
||||
bool isScrollControlled = true,
|
||||
double maxHeight = 480.0,
|
||||
}) =>
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
|
@ -16,8 +17,8 @@ Future<T?> showAdaptiveBottomSheet<T>({
|
|||
useRootNavigator: !PlatformInfos.isMobile,
|
||||
isDismissible: isDismissible,
|
||||
isScrollControlled: isScrollControlled,
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 480,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: maxHeight,
|
||||
maxWidth: FluffyThemes.columnWidth * 1.5,
|
||||
),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
|
|
Loading…
Reference in a new issue