Skip to content

Commit db50181

Browse files
committed
Fix settings dialog
1 parent 13237fb commit db50181

File tree

4 files changed

+35
-20
lines changed

4 files changed

+35
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ jobs:
877877
- name: Setup Fastlane
878878
uses: ruby/setup-ruby@v1
879879
with:
880-
ruby-version: "3.3.6"
880+
ruby-version: "3.3.7"
881881
bundler-cache: true
882882
working-directory: app/android
883883
- name: 🚀 Deploy to Play Store

app/lib/api/settings.dart

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1+
import 'dart:ui';
2+
13
import 'package:flutter/material.dart';
24

35
import '../pages/settings/page.dart';
46

5-
Future<void> openSettings(
6-
BuildContext context, {
7-
SettingsView view = SettingsView.general,
8-
}) =>
9-
showDialog<void>(
10-
context: context,
11-
builder: (context) => Dialog(
12-
clipBehavior: Clip.antiAlias,
13-
child: ConstrainedBox(
14-
constraints:
15-
const BoxConstraints(maxHeight: 600, maxWidth: 800),
16-
child: SettingsPage(
17-
isDialog: true,
18-
view: view,
19-
))));
7+
Future<void> openSettings(BuildContext context) => showGeneralDialog<void>(
8+
context: context,
9+
pageBuilder: (context, animation, secondaryAnimation) =>
10+
ScaffoldMessenger(
11+
child: BackdropFilter(
12+
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
13+
child: Dialog(
14+
clipBehavior: Clip.antiAlias,
15+
child: ConstrainedBox(
16+
constraints:
17+
const BoxConstraints(maxHeight: 800, maxWidth: 1000),
18+
child: const SettingsPage(isDialog: true))),
19+
),
20+
),
21+
barrierDismissible: true,
22+
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
23+
transitionDuration: const Duration(milliseconds: 200),
24+
transitionBuilder: (context, animation, secondaryAnimation, child) {
25+
// Animate the dialog from bottom to center
26+
return SlideTransition(
27+
position: Tween<Offset>(
28+
begin: const Offset(0, 1),
29+
end: Offset.zero,
30+
).chain(CurveTween(curve: Curves.easeOutQuart)).animate(animation),
31+
child: child,
32+
);
33+
},
34+
);

app/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,10 @@ packages:
461461
dependency: transitive
462462
description:
463463
name: flutter_rust_bridge
464-
sha256: "39804d78730d41ecddbe97e38c7dd6c2b43f76e91ef7bbd329f98f9b0bd19e56"
464+
sha256: "5a5c7a5deeef2cc2ffe6076a33b0429f4a20ceac22a397297aed2b1eb067e611"
465465
url: "https://pub.dev"
466466
source: hosted
467-
version: "2.8.0"
467+
version: "2.9.0"
468468
flutter_secure_storage:
469469
dependency: "direct main"
470470
description:

server/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ packages:
263263
dependency: transitive
264264
description:
265265
name: flutter_rust_bridge
266-
sha256: "39804d78730d41ecddbe97e38c7dd6c2b43f76e91ef7bbd329f98f9b0bd19e56"
266+
sha256: "5a5c7a5deeef2cc2ffe6076a33b0429f4a20ceac22a397297aed2b1eb067e611"
267267
url: "https://pub.dev"
268268
source: hosted
269-
version: "2.8.0"
269+
version: "2.9.0"
270270
frontend_server_client:
271271
dependency: transitive
272272
description:

0 commit comments

Comments
 (0)