Skip to content

Commit 628014c

Browse files
committed
Add panel background to unsafe area
1 parent 5f25895 commit 628014c

File tree

10 files changed

+486
-445
lines changed

10 files changed

+486
-445
lines changed

lib/about_page.dart

Lines changed: 81 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -31,107 +31,109 @@ class AboutPage extends ConsumerWidget {
3131
final l10n = AppLocalizations.of(context);
3232
return ResponsiveDialog(
3333
title: Text(l10n.s_about),
34-
builder: (context, _) => Padding(
35-
padding: const EdgeInsets.symmetric(vertical: 32),
36-
child: Column(
37-
mainAxisSize: MainAxisSize.min,
38-
children: [
39-
Image.asset('assets/graphics/app-icon.png', scale: 1 / 0.75),
40-
Padding(
41-
padding: const EdgeInsets.only(top: 24.0),
42-
child: Text(
43-
l10n.app_name,
44-
style: Theme.of(context).textTheme.titleMedium,
45-
),
46-
),
47-
const Text(version),
48-
const Text(''),
49-
Row(
34+
builder:
35+
(context, _) => Padding(
36+
padding: const EdgeInsets.symmetric(vertical: 32),
37+
child: Column(
5038
mainAxisSize: MainAxisSize.min,
5139
children: [
52-
TextButton(
40+
Image.asset('assets/graphics/app-icon.png', scale: 1 / 0.75),
41+
Padding(
42+
padding: const EdgeInsets.only(top: 24.0),
5343
child: Text(
54-
key: tosButton,
55-
l10n.s_terms_of_use,
56-
style: const TextStyle(
57-
decoration: TextDecoration.underline,
58-
),
44+
l10n.app_name,
45+
style: Theme.of(context).textTheme.titleMedium,
5946
),
60-
onPressed: () {
61-
launchTermsUrl();
62-
},
47+
),
48+
const Text(version),
49+
const Text(''),
50+
Row(
51+
mainAxisSize: MainAxisSize.min,
52+
children: [
53+
TextButton(
54+
child: Text(
55+
key: tosButton,
56+
l10n.s_terms_of_use,
57+
style: const TextStyle(
58+
decoration: TextDecoration.underline,
59+
),
60+
),
61+
onPressed: () {
62+
launchTermsUrl();
63+
},
64+
),
65+
TextButton(
66+
child: Text(
67+
key: privacyButton,
68+
l10n.s_privacy_policy,
69+
style: const TextStyle(
70+
decoration: TextDecoration.underline,
71+
),
72+
),
73+
onPressed: () {
74+
launchPrivacyUrl();
75+
},
76+
),
77+
],
6378
),
6479
TextButton(
6580
child: Text(
66-
key: privacyButton,
67-
l10n.s_privacy_policy,
81+
key: licensesButton,
82+
l10n.s_open_src_licenses,
6883
style: const TextStyle(
6984
decoration: TextDecoration.underline,
7085
),
7186
),
7287
onPressed: () {
73-
launchPrivacyUrl();
88+
Navigator.of(context).push(
89+
MaterialPageRoute<void>(
90+
builder:
91+
(BuildContext context) =>
92+
const LicensePage(applicationVersion: version),
93+
settings: const RouteSettings(name: 'licenses'),
94+
),
95+
);
7496
},
7597
),
76-
],
77-
),
78-
TextButton(
79-
child: Text(
80-
key: licensesButton,
81-
l10n.s_open_src_licenses,
82-
style: const TextStyle(
83-
decoration: TextDecoration.underline,
98+
const Padding(
99+
padding: EdgeInsets.only(top: 24.0, bottom: 8.0),
100+
child: Divider(),
84101
),
85-
),
86-
onPressed: () {
87-
Navigator.of(context).push(
88-
MaterialPageRoute<void>(
89-
builder: (BuildContext context) =>
90-
const LicensePage(applicationVersion: version),
91-
settings: const RouteSettings(name: 'licenses'),
92-
),
93-
);
94-
},
95-
),
96-
const Padding(
97-
padding: EdgeInsets.only(top: 24.0, bottom: 8.0),
98-
child: Divider(),
99-
),
100-
Padding(
101-
padding: const EdgeInsets.symmetric(vertical: 16.0),
102-
child: Text(
103-
key: helpButton,
104-
l10n.s_help_and_feedback,
105-
style: Theme.of(context).textTheme.titleMedium,
106-
),
107-
),
108-
Row(
109-
mainAxisSize: MainAxisSize.min,
110-
children: [
111-
TextButton(
112-
onPressed: launchDocumentationUrl,
102+
Padding(
103+
padding: const EdgeInsets.symmetric(vertical: 16.0),
113104
child: Text(
114-
key: userGuideButton,
115-
l10n.s_user_guide,
116-
style: const TextStyle(
117-
decoration: TextDecoration.underline,
118-
),
105+
key: helpButton,
106+
l10n.s_help_and_feedback,
107+
style: Theme.of(context).textTheme.titleMedium,
119108
),
120109
),
121-
TextButton(
122-
onPressed: launchHelpUrl,
123-
child: Text(
124-
l10n.s_i_need_help,
125-
style: const TextStyle(
126-
decoration: TextDecoration.underline,
110+
Row(
111+
mainAxisSize: MainAxisSize.min,
112+
children: [
113+
TextButton(
114+
onPressed: launchDocumentationUrl,
115+
child: Text(
116+
key: userGuideButton,
117+
l10n.s_user_guide,
118+
style: const TextStyle(
119+
decoration: TextDecoration.underline,
120+
),
121+
),
127122
),
128-
),
123+
TextButton(
124+
onPressed: launchHelpUrl,
125+
child: Text(
126+
l10n.s_i_need_help,
127+
style: const TextStyle(
128+
decoration: TextDecoration.underline,
129+
),
130+
),
131+
),
132+
],
129133
),
130134
],
131135
),
132-
],
133-
),
134-
),
136+
),
135137
);
136138
}
137139
}

lib/android/init.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ Future<Widget> initialize() async {
8383
clipboardProvider.overrideWith(
8484
(ref) => ref.watch(androidClipboardProvider),
8585
),
86-
logPanelVisibilityProvider
87-
.overrideWith((ref) => LogPanelVisibilityNotifier(kDebugMode)),
86+
logPanelVisibilityProvider.overrideWith(
87+
(ref) => LogPanelVisibilityNotifier(kDebugMode),
88+
),
8889
androidSdkVersionProvider.overrideWithValue(await getAndroidSdkVersion()),
8990
androidNfcSupportProvider.overrideWithValue(await getHasNfc()),
9091
supportedSectionsProvider.overrideWithValue([

lib/android/views/settings_views.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,15 @@ class AllowScreenshotsView extends ConsumerWidget {
213213
final l10n = AppLocalizations.of(context);
214214
final allowScreenshots = ref.watch(androidAllowScreenshotsProvider);
215215
return SwitchListTile(
216-
title: Text(l10n.s_allow_screenshots),
217-
subtitle: Text(l10n.l_allow_screenshots_desc),
218-
value: allowScreenshots,
219-
key: keys.allowScreenshotsSetting,
220-
onChanged: (value) {
221-
ref
222-
.read(androidAllowScreenshotsProvider.notifier)
223-
.setAllowScreenshots(value);
224-
});
216+
title: Text(l10n.s_allow_screenshots),
217+
subtitle: Text(l10n.l_allow_screenshots_desc),
218+
value: allowScreenshots,
219+
key: keys.allowScreenshotsSetting,
220+
onChanged: (value) {
221+
ref
222+
.read(androidAllowScreenshotsProvider.notifier)
223+
.setAllowScreenshots(value);
224+
},
225+
);
225226
}
226227
}

lib/app/app.dart

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ class YubicoAuthenticatorApp extends StatelessWidget {
3030

3131
@override
3232
Widget build(BuildContext context) => GlobalShortcuts(
33-
child: Consumer(builder: (context, ref, _) {
34-
final primaryColor = ref.watch(primaryColorProvider);
35-
return MaterialApp(
36-
title: ref.watch(l10nProvider).app_name,
37-
theme: AppTheme.getLightTheme(primaryColor),
38-
darkTheme: AppTheme.getDarkTheme(primaryColor),
39-
themeMode: ref.watch(themeModeProvider),
40-
home: page,
41-
debugShowCheckedModeBanner: false,
42-
locale: ref.watch(currentLocaleProvider),
43-
supportedLocales: AppLocalizations.supportedLocales,
44-
localizationsDelegates: const [
45-
AppLocalizations.delegate,
46-
GlobalMaterialLocalizations.delegate,
47-
GlobalWidgetsLocalizations.delegate,
48-
GlobalCupertinoLocalizations.delegate,
49-
],
50-
);
51-
}),
52-
);
33+
child: Consumer(
34+
builder: (context, ref, _) {
35+
final primaryColor = ref.watch(primaryColorProvider);
36+
return MaterialApp(
37+
title: ref.watch(l10nProvider).app_name,
38+
theme: AppTheme.getLightTheme(primaryColor),
39+
darkTheme: AppTheme.getDarkTheme(primaryColor),
40+
themeMode: ref.watch(themeModeProvider),
41+
home: page,
42+
debugShowCheckedModeBanner: false,
43+
locale: ref.watch(currentLocaleProvider),
44+
supportedLocales: AppLocalizations.supportedLocales,
45+
localizationsDelegates: const [
46+
AppLocalizations.delegate,
47+
GlobalMaterialLocalizations.delegate,
48+
GlobalWidgetsLocalizations.delegate,
49+
GlobalCupertinoLocalizations.delegate,
50+
],
51+
);
52+
},
53+
),
54+
);
5355
}

0 commit comments

Comments
 (0)