Skip to content

Commit 030be8d

Browse files
committed
feat: simplify settings page
1 parent 716f764 commit 030be8d

File tree

12 files changed

+319
-16
lines changed

12 files changed

+319
-16
lines changed

build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
targets:
2+
$default:
3+
builders:
4+
drift_dev:
5+
options:
6+
# Use ISO 8601 strings
7+
store_date_time_values_as_text: true

lib/app/view/app.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'package:qack/presentation/landing/components/cubit/bottom_navigation_bar
1111
import 'package:qack/presentation/landing/view/landing_page.dart';
1212
import 'package:qack/presentation/settings/bloc/settings_bloc.dart';
1313
import 'package:qack/presentation/settings/respository/settings_repository.dart';
14+
import 'package:qack/theme/colors.dart';
1415
import 'package:qack/theme/themes/light_theme.dart';
1516

1617
class App extends StatelessWidget {
@@ -72,8 +73,6 @@ class AppView extends StatefulWidget {
7273
}
7374

7475
class _AppViewState extends State<AppView> {
75-
76-
7776
@override
7877
Widget build(BuildContext context) {
7978
const theme = LightTheme();
@@ -94,11 +93,9 @@ class _AppViewState extends State<AppView> {
9493
borderRadius: BorderRadius.circular(8),
9594
),
9695
),
97-
/*
98-
scaffoldBackgroundColor: state.theme.scaffoldColor,
99-
cardColor: state.theme.cardColor,
96+
scaffoldBackgroundColor: theme.scaffoldColor,
97+
cardColor: theme.cardColor,
10098
primaryColor: AppColors.primary500,
101-
*/
10299
),
103100
localizationsDelegates: AppLocalizations.localizationsDelegates,
104101
supportedLocales: AppLocalizations.supportedLocales,

lib/presentation/settings/view/settings_page.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
import 'package:flutter/material.dart';
2+
import 'package:qack/presentation/settings/view/edit_translator_page.dart';
3+
/*
24
import 'package:gap/gap.dart';
35
import 'package:lucide_icons/lucide_icons.dart';
46
import 'package:qack/layout/layout_handler.dart';
57
import 'package:qack/presentation/settings/components/edit_settings_list_tile.dart';
6-
import 'package:qack/presentation/settings/view/edit_translator_page.dart';
78
import 'package:qack/theme/theme.dart';
89
import 'package:qack/utils/routes/slide_transition.dart';
910
import 'package:qack/widgets/divider.dart';
11+
*/
12+
13+
class SettingsPage extends StatelessWidget {
14+
const SettingsPage({super.key});
15+
16+
@override
17+
Widget build(BuildContext context) {
18+
return const EditTranslatorPage();
19+
}
20+
}
1021

22+
/*
1123
class SettingsPage extends StatelessWidget {
1224
const SettingsPage({super.key});
1325
@@ -102,3 +114,4 @@ class SettingsView extends StatelessWidget {
102114
);
103115
}
104116
}
117+
*/

lib/widgets/app_bar/back_button_app_bar.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ class BackButtonAppBar extends StatelessWidget implements PreferredSizeWidget {
1010
super.key,
1111
this.title,
1212
this.actions,
13+
this.showBackButton = true,
1314
});
1415

1516
final VoidCallback onBack;
1617
final String? title;
1718
final List<Widget>? actions;
1819

20+
final bool showBackButton;
21+
1922
@override
2023
Widget build(BuildContext context) {
2124
const theme = LightTheme();
@@ -27,13 +30,15 @@ class BackButtonAppBar extends StatelessWidget implements PreferredSizeWidget {
2730
titleStyle:
2831
AppTextStyle.textLG.semiBold.copyWith(color: theme.textColor1),
2932
actions: actions,
33+
showBackButton: showBackButton,
3034
),
3135
tablet: BackButtonAppBarView(
3236
onBack: onBack,
3337
title: title,
3438
titleStyle:
3539
AppTextStyle.textXL.semiBold.copyWith(color: theme.textColor1),
3640
actions: actions,
41+
showBackButton: showBackButton,
3742
),
3843
);
3944
}
@@ -46,6 +51,7 @@ class BackButtonAppBarView extends StatelessWidget {
4651
const BackButtonAppBarView({
4752
required this.onBack,
4853
required this.titleStyle,
54+
required this.showBackButton,
4955
super.key,
5056
this.title,
5157
this.actions,
@@ -58,16 +64,20 @@ class BackButtonAppBarView extends StatelessWidget {
5864

5965
final List<Widget>? actions;
6066

67+
final bool showBackButton;
68+
6169
@override
6270
Widget build(BuildContext context) {
6371
const theme = LightTheme();
6472

6573
return AppBar(
6674
backgroundColor: AppColors.transparent,
67-
leading: AppBackButton(
68-
onBack: onBack,
69-
color: theme.textColor1,
70-
),
75+
leading: showBackButton
76+
? AppBackButton(
77+
onBack: onBack,
78+
color: theme.textColor1,
79+
)
80+
: null,
7181
title: title != null
7282
? AutoSizeText(
7383
title!,

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import package_info_plus
1010
import path_provider_foundation
1111
import sentry_flutter
1212
import speech_to_text
13+
import sqlite3_flutter_libs
1314
import url_launcher_macos
1415

1516
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
@@ -18,5 +19,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
1819
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
1920
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
2021
SpeechToTextPlugin.register(with: registry.registrar(forPlugin: "SpeechToTextPlugin"))
22+
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
2123
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
2224
}

macos/Podfile.lock

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
PODS:
2+
- flutter_secure_storage_macos (6.1.3):
3+
- FlutterMacOS
4+
- FlutterMacOS (1.0.0)
5+
- package_info_plus (0.0.1):
6+
- FlutterMacOS
7+
- path_provider_foundation (0.0.1):
8+
- Flutter
9+
- FlutterMacOS
10+
- Sentry/HybridSDK (8.46.0)
11+
- sentry_flutter (8.14.2):
12+
- Flutter
13+
- FlutterMacOS
14+
- Sentry/HybridSDK (= 8.46.0)
15+
- speech_to_text (0.0.1):
16+
- Flutter
17+
- FlutterMacOS
18+
- Try
19+
- Try (2.1.1)
20+
- url_launcher_macos (0.0.1):
21+
- FlutterMacOS
22+
23+
DEPENDENCIES:
24+
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
25+
- FlutterMacOS (from `Flutter/ephemeral`)
26+
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
27+
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
28+
- sentry_flutter (from `Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos`)
29+
- speech_to_text (from `Flutter/ephemeral/.symlinks/plugins/speech_to_text/darwin`)
30+
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
31+
32+
SPEC REPOS:
33+
trunk:
34+
- Sentry
35+
- Try
36+
37+
EXTERNAL SOURCES:
38+
flutter_secure_storage_macos:
39+
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
40+
FlutterMacOS:
41+
:path: Flutter/ephemeral
42+
package_info_plus:
43+
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
44+
path_provider_foundation:
45+
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
46+
sentry_flutter:
47+
:path: Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos
48+
speech_to_text:
49+
:path: Flutter/ephemeral/.symlinks/plugins/speech_to_text/darwin
50+
url_launcher_macos:
51+
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
52+
53+
SPEC CHECKSUMS:
54+
flutter_secure_storage_macos: 7f45e30f838cf2659862a4e4e3ee1c347c2b3b54
55+
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
56+
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
57+
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
58+
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
59+
sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684
60+
speech_to_text: 9dc43a5df3cbc2813f8c7cc9bd0fbf94268ed7ac
61+
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
62+
url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
63+
64+
PODFILE CHECKSUM: 7eb978b976557c8c1cd717d8185ec483fd090a82
65+
66+
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)