kasy-cli 1.17.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/kasy.js +16 -2
- package/lib/commands/add.js +7 -7
- package/lib/commands/configure.js +548 -0
- package/lib/commands/deploy.js +4 -4
- package/lib/commands/doctor.js +17 -0
- package/lib/commands/favicon.js +4 -4
- package/lib/commands/icon.js +5 -5
- package/lib/commands/new.js +483 -324
- package/lib/commands/run.js +17 -4
- package/lib/commands/splash.js +5 -5
- package/lib/commands/update.js +9 -9
- package/lib/scaffold/CHANGELOG.json +14 -0
- package/lib/scaffold/backends/firebase/enable-auth-via-cli.js +108 -0
- package/lib/scaffold/backends/firebase/setup-from-scratch.js +123 -5
- package/lib/scaffold/generate.js +24 -8
- package/lib/scaffold/shared/post-build.js +8 -0
- package/lib/utils/brand.js +16 -12
- package/lib/utils/flutter-run.js +139 -11
- package/lib/utils/i18n/messages-en.js +62 -5
- package/lib/utils/i18n/messages-es.js +62 -5
- package/lib/utils/i18n/messages-pt.js +63 -6
- package/lib/utils/ui.js +79 -4
- package/package.json +1 -2
- package/templates/firebase/README.en.md +1 -1
- package/templates/firebase/README.es.md +1 -1
- package/templates/firebase/README.md +1 -1
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MainActivity.kt +0 -15
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidget.kt +65 -26
- package/templates/firebase/android/app/src/main/res/drawable/widget_add_button.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_bg.xml +7 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_inner.xml +6 -6
- package/templates/firebase/android/app/src/main/res/drawable/widget_plan_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable/widget_preview_image.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_pro_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/layout/widget_preview.xml +3 -3
- package/templates/firebase/android/app/src/main/res/values/colors.xml +32 -0
- package/templates/firebase/assets/images/splash_logo_dark.png +0 -0
- package/templates/firebase/assets/images/splash_logo_dark_android12.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light_android12.png +0 -0
- package/templates/firebase/ios/HomeWidgetExtension/MyWidget.swift +75 -29
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png +0 -0
- package/templates/firebase/ios/Runner/Base.lproj/LaunchScreen.storyboard +1 -1
- package/templates/firebase/lib/components/components.dart +1 -0
- package/templates/firebase/lib/components/kasy_avatar.dart +65 -17
- package/templates/firebase/lib/components/kasy_avatar_presets.dart +121 -97
- package/templates/firebase/lib/components/kasy_button.dart +8 -8
- package/templates/firebase/lib/components/kasy_date_picker.dart +2173 -0
- package/templates/firebase/lib/components/kasy_tabs.dart +214 -91
- package/templates/firebase/lib/components/kasy_text_area.dart +9 -4
- package/templates/firebase/lib/components/kasy_text_field.dart +96 -36
- package/templates/firebase/lib/components/kasy_text_field_otp.dart +1 -2
- package/templates/firebase/lib/core/bottom_menu/bottom_menu.dart +88 -35
- package/templates/firebase/lib/core/bottom_menu/bottom_router.dart +7 -43
- package/templates/firebase/lib/core/dev_inspector/dev_inspector.dart +118 -16
- package/templates/firebase/lib/core/dev_inspector/dev_inspector_service.dart +14 -20
- package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +12 -18
- package/templates/firebase/lib/core/security/secured_storage.dart +56 -15
- package/templates/firebase/lib/core/theme/providers/theme_provider.dart +3 -0
- package/templates/firebase/lib/core/theme/web_background_sync.dart +3 -0
- package/templates/firebase/lib/core/theme/web_background_sync_web.dart +18 -0
- package/templates/firebase/lib/core/web_device_preview/web_device_preview.dart +3 -6
- package/templates/firebase/lib/features/authentication/api/authentication_api.dart +6 -0
- package/templates/firebase/lib/features/home/home_components_page.dart +3 -2
- package/templates/firebase/lib/features/home/home_components_preview_registry.dart +949 -77
- package/templates/firebase/lib/features/home/home_page.dart +17 -40
- package/templates/firebase/lib/features/notifications/ui/notifications_page.dart +1 -16
- package/templates/firebase/lib/features/notifications/ui/widgets/empty_notifications.dart +0 -4
- package/templates/firebase/lib/features/settings/ui/components/language_switcher.dart +10 -5
- package/templates/firebase/lib/i18n/en.i18n.json +2 -1
- package/templates/firebase/lib/i18n/es.i18n.json +2 -1
- package/templates/firebase/lib/i18n/pt.i18n.json +2 -1
- package/templates/firebase/lib/main.dart +34 -34
- package/templates/firebase/pubspec.yaml +2 -1
- package/templates/firebase/storage.cors.json +8 -0
- package/templates/firebase/web/index.html +24 -2
- package/templates/firebase/web/splash/img/dark-1x.png +0 -0
- package/templates/firebase/web/splash/img/dark-2x.png +0 -0
- package/templates/firebase/web/splash/img/dark-3x.png +0 -0
- package/templates/firebase/web/splash/img/dark-4x.png +0 -0
- package/templates/firebase/web/splash/img/light-1x.png +0 -0
- package/templates/firebase/web/splash/img/light-2x.png +0 -0
- package/templates/firebase/web/splash/img/light-3x.png +0 -0
- package/templates/firebase/web/splash/img/light-4x.png +0 -0
- package/templates/firebase/lib/core/bottom_menu/kasy_bart_navigation.dart +0 -22
|
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|
|
2
2
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
3
3
|
import 'package:kasy_kit/components/kasy_app_bar.dart';
|
|
4
4
|
import 'package:kasy_kit/core/bottom_menu/bart_inner_paths.dart';
|
|
5
|
-
import 'package:kasy_kit/core/bottom_menu/kasy_bart_navigation.dart';
|
|
6
5
|
import 'package:kasy_kit/core/haptics/kasy_haptics.dart';
|
|
7
6
|
import 'package:kasy_kit/core/states/components/maybe_ask_rating.dart';
|
|
8
7
|
import 'package:kasy_kit/core/states/components/maybe_show_update_bottom_sheet.dart';
|
|
@@ -60,13 +59,9 @@ class HomePage extends ConsumerWidget {
|
|
|
60
59
|
gradient: _featuresGradient(context, isDark),
|
|
61
60
|
onOpen: () {
|
|
62
61
|
KasyHaptics.medium(context);
|
|
63
|
-
Navigator.of(context)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (context.mounted) {
|
|
67
|
-
kasyShowBottomBar(context);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
62
|
+
Navigator.of(context).pushNamed(
|
|
63
|
+
bartInnerPath('home', 'features'),
|
|
64
|
+
);
|
|
70
65
|
},
|
|
71
66
|
);
|
|
72
67
|
final componentsCard = _DashboardGradientCard(
|
|
@@ -79,15 +74,9 @@ class HomePage extends ConsumerWidget {
|
|
|
79
74
|
gradient: _componentsGradient(context, isDark),
|
|
80
75
|
onOpen: () {
|
|
81
76
|
KasyHaptics.medium(context);
|
|
82
|
-
Navigator.of(context)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
)
|
|
86
|
-
.then((_) {
|
|
87
|
-
if (context.mounted) {
|
|
88
|
-
kasyShowBottomBar(context);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
77
|
+
Navigator.of(context).pushNamed(
|
|
78
|
+
bartInnerPath('home', 'components'),
|
|
79
|
+
);
|
|
91
80
|
},
|
|
92
81
|
);
|
|
93
82
|
if (isWide) {
|
|
@@ -135,10 +124,7 @@ class HomePage extends ConsumerWidget {
|
|
|
135
124
|
}
|
|
136
125
|
|
|
137
126
|
/// Soft product-style gradients (calm blues / lilac); same geometry, distinct hue.
|
|
138
|
-
static LinearGradient _componentsGradient(
|
|
139
|
-
BuildContext context,
|
|
140
|
-
bool isDark,
|
|
141
|
-
) {
|
|
127
|
+
static LinearGradient _componentsGradient(BuildContext context, bool isDark) {
|
|
142
128
|
if (isDark) {
|
|
143
129
|
return LinearGradient(
|
|
144
130
|
begin: Alignment.topLeft,
|
|
@@ -153,11 +139,7 @@ class HomePage extends ConsumerWidget {
|
|
|
153
139
|
return const LinearGradient(
|
|
154
140
|
begin: Alignment.topLeft,
|
|
155
141
|
end: Alignment.bottomRight,
|
|
156
|
-
colors: [
|
|
157
|
-
Color(0xFFDCE6FF),
|
|
158
|
-
Color(0xFFF0F6FF),
|
|
159
|
-
Color(0xFFE2E8F6),
|
|
160
|
-
],
|
|
142
|
+
colors: [Color(0xFFDCE6FF), Color(0xFFF0F6FF), Color(0xFFE2E8F6)],
|
|
161
143
|
);
|
|
162
144
|
}
|
|
163
145
|
|
|
@@ -176,11 +158,7 @@ class HomePage extends ConsumerWidget {
|
|
|
176
158
|
return const LinearGradient(
|
|
177
159
|
begin: Alignment.topLeft,
|
|
178
160
|
end: Alignment.bottomRight,
|
|
179
|
-
colors: [
|
|
180
|
-
Color(0xFFE2D8FC),
|
|
181
|
-
Color(0xFFF5ECFA),
|
|
182
|
-
Color(0xFFDCE8FF),
|
|
183
|
-
],
|
|
161
|
+
colors: [Color(0xFFE2D8FC), Color(0xFFF5ECFA), Color(0xFFDCE8FF)],
|
|
184
162
|
);
|
|
185
163
|
}
|
|
186
164
|
}
|
|
@@ -205,22 +183,23 @@ class _DashboardGradientCard extends StatelessWidget {
|
|
|
205
183
|
@override
|
|
206
184
|
Widget build(BuildContext context) {
|
|
207
185
|
final bool isDark = Theme.of(context).brightness == Brightness.dark;
|
|
208
|
-
final Color titleColor =
|
|
209
|
-
isDark ? Colors.white : const Color(0xFF1A1D26);
|
|
186
|
+
final Color titleColor = isDark ? Colors.white : const Color(0xFF1A1D26);
|
|
210
187
|
final Color subtitleColor = titleColor.withValues(alpha: 0.62);
|
|
211
188
|
final Color arrowCircleColor = isDark
|
|
212
189
|
? Colors.black.withValues(alpha: 0.38)
|
|
213
190
|
: Colors.white.withValues(alpha: 0.82);
|
|
214
|
-
final Color arrowIconColor =
|
|
215
|
-
|
|
191
|
+
final Color arrowIconColor = isDark
|
|
192
|
+
? Colors.white
|
|
193
|
+
: const Color(0xFF1A1D26);
|
|
216
194
|
final Color countBadgeFill = isDark
|
|
217
195
|
? Colors.white.withValues(alpha: 0.14)
|
|
218
196
|
: Colors.white.withValues(alpha: 0.38);
|
|
219
197
|
final Color countBadgeBorder = isDark
|
|
220
198
|
? Colors.white.withValues(alpha: 0.24)
|
|
221
199
|
: Colors.black.withValues(alpha: 0.06);
|
|
222
|
-
final Color countBadgeLabelColor =
|
|
223
|
-
|
|
200
|
+
final Color countBadgeLabelColor = isDark
|
|
201
|
+
? Colors.white.withValues(alpha: 0.94)
|
|
202
|
+
: countBadgeTextColor;
|
|
224
203
|
final Color cardOutlineColor = context.colors.outline.withValues(
|
|
225
204
|
alpha: isDark ? 0.34 : 0.30,
|
|
226
205
|
);
|
|
@@ -246,9 +225,7 @@ class _DashboardGradientCard extends StatelessWidget {
|
|
|
246
225
|
child: DecoratedBox(
|
|
247
226
|
decoration: BoxDecoration(
|
|
248
227
|
color: countBadgeFill,
|
|
249
|
-
borderRadius: BorderRadius.circular(
|
|
250
|
-
KasyRadius.full,
|
|
251
|
-
),
|
|
228
|
+
borderRadius: BorderRadius.circular(KasyRadius.full),
|
|
252
229
|
border: Border.all(color: countBadgeBorder),
|
|
253
230
|
),
|
|
254
231
|
child: Padding(
|
|
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|
|
4
4
|
import 'package:flutter/rendering.dart';
|
|
5
5
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
6
6
|
import 'package:kasy_kit/components/components.dart';
|
|
7
|
-
import 'package:kasy_kit/core/bottom_menu/kasy_bart_navigation.dart';
|
|
8
7
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
9
8
|
import 'package:kasy_kit/features/notifications/providers/models/notification.dart'
|
|
10
9
|
as app;
|
|
@@ -21,39 +20,25 @@ class NotificationsPage extends ConsumerStatefulWidget {
|
|
|
21
20
|
ConsumerState<NotificationsPage> createState() => _NotificationsPageState();
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
class _NotificationsPageState extends ConsumerState<NotificationsPage>
|
|
25
|
-
with WidgetsBindingObserver {
|
|
23
|
+
class _NotificationsPageState extends ConsumerState<NotificationsPage> {
|
|
26
24
|
final ScrollController _scrollController = ScrollController();
|
|
27
25
|
Timer? _autoReadTimer;
|
|
28
26
|
|
|
29
27
|
@override
|
|
30
28
|
void initState() {
|
|
31
29
|
super.initState();
|
|
32
|
-
WidgetsBinding.instance.addObserver(this);
|
|
33
30
|
_scrollController.addListener(_onScrollChange);
|
|
34
31
|
requestReadAll();
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
@override
|
|
38
35
|
void dispose() {
|
|
39
|
-
WidgetsBinding.instance.removeObserver(this);
|
|
40
36
|
_autoReadTimer?.cancel();
|
|
41
37
|
_scrollController.removeListener(_onScrollChange);
|
|
42
38
|
_scrollController.dispose();
|
|
43
39
|
super.dispose();
|
|
44
40
|
}
|
|
45
41
|
|
|
46
|
-
@override
|
|
47
|
-
void didChangeAppLifecycleState(AppLifecycleState state) {
|
|
48
|
-
super.didChangeAppLifecycleState(state);
|
|
49
|
-
if (state == AppLifecycleState.resumed && mounted) {
|
|
50
|
-
// Native permission dialogs push the app to the background briefly. When
|
|
51
|
-
// we come back, the Bart bottom bar can stay hidden because its internal
|
|
52
|
-
// visibility state is reset. Force it back so the user is never stranded.
|
|
53
|
-
kasyShowBottomBar(context);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
42
|
void _onScrollChange() {
|
|
58
43
|
final direction = _scrollController.position.userScrollDirection;
|
|
59
44
|
final isScrollingDown = direction == ScrollDirection.reverse;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import 'package:flutter/material.dart';
|
|
2
2
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
3
3
|
import 'package:kasy_kit/components/components.dart';
|
|
4
|
-
import 'package:kasy_kit/core/bottom_menu/kasy_bart_navigation.dart';
|
|
5
4
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
6
5
|
import 'package:kasy_kit/features/notifications/providers/models/notification.dart';
|
|
7
6
|
import 'package:kasy_kit/features/notifications/repositories/notifications_repository.dart';
|
|
@@ -30,9 +29,6 @@ class _EmptyNotificationsState extends ConsumerState<EmptyNotifications> {
|
|
|
30
29
|
Future<void> _onAskPressed(NotificationPermission permission) async {
|
|
31
30
|
await permission.maybeAsk();
|
|
32
31
|
if (!mounted) return;
|
|
33
|
-
// The native permission dialog pulls the app out of focus; restore the
|
|
34
|
-
// bottom bar defensively before refreshing the local state.
|
|
35
|
-
kasyShowBottomBar(context);
|
|
36
32
|
setState(() {
|
|
37
33
|
_permissionFuture = _loadPermission();
|
|
38
34
|
});
|
|
@@ -96,15 +96,20 @@ class LanguageSwitcher extends ConsumerWidget {
|
|
|
96
96
|
return _LocaleOptionTile(
|
|
97
97
|
locale: locale,
|
|
98
98
|
isSelected: isSelected,
|
|
99
|
-
onTap: () {
|
|
99
|
+
onTap: () async {
|
|
100
100
|
// Close the sheet FIRST. Awaiting work before pop
|
|
101
101
|
// races with the rebuild triggered by setLocale and
|
|
102
102
|
// crashed Navigator.pop with !_debugLocked.
|
|
103
103
|
Navigator.pop(sheetContext);
|
|
104
|
-
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
104
|
+
// Await setLocale so the locale bundle finishes loading
|
|
105
|
+
// BEFORE the widget tries to read its translations.
|
|
106
|
+
// Slang lazy-loads non-base locales and its loadLocale
|
|
107
|
+
// returns immediately when another caller (this setLocale)
|
|
108
|
+
// is already loading — so a parallel updateForLocale would
|
|
109
|
+
// see translations not yet in the map and silently fall
|
|
110
|
+
// back to the base locale (English). That was the root
|
|
111
|
+
// cause of "first language tap doesn't update the widget".
|
|
112
|
+
await LocaleSettings.setLocale(locale);
|
|
108
113
|
unawaited(
|
|
109
114
|
ref
|
|
110
115
|
.read(sharedPreferencesProvider)
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "We'll be here when you're back",
|
|
532
532
|
"plan_free": "Free plan",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Your time is limited.\nDon't live someone else's life.\nHave the courage to follow your intuition.\nEverything else is secondary.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "Te esperamos de vuelta",
|
|
532
532
|
"plan_free": "Plan gratuito",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Tu tiempo es limitado.\nNo vivas la vida de otra persona.\nTen el coraje de seguir tu intuición.\nTodo lo demás es secundario.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -531,7 +531,8 @@
|
|
|
531
531
|
"title_logged_out": "Aguardamos seu retorno",
|
|
532
532
|
"plan_free": "Plano grátis",
|
|
533
533
|
"plan_pro": "PRO",
|
|
534
|
-
"quote": "
|
|
534
|
+
"quote": "Seu tempo é limitado.\nNão viva a vida de outra pessoa.\nTenha coragem de seguir sua intuição.\nTodo o resto é secundário.",
|
|
535
|
+
"quote_author": "Steve Jobs"
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -161,47 +161,47 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|
|
161
161
|
return WebDevicePreview.wrap(
|
|
162
162
|
child: DevInspector.wrap(
|
|
163
163
|
child: MaterialApp.router(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
],
|
|
176
|
-
locale: TranslationProvider.of(context).flutterLocale,
|
|
177
|
-
supportedLocales: AppLocaleUtils.supportedLocales,
|
|
178
|
-
builder: (context, child) => Initializer(
|
|
179
|
-
services: [
|
|
180
|
-
authenticationApiProvider,
|
|
181
|
-
sharedPreferencesProvider,
|
|
182
|
-
remoteConfigApiProvider,
|
|
183
|
-
notificationsSettingsProvider,
|
|
184
|
-
notificationRepositoryProvider,
|
|
185
|
-
subscriptionRepositoryProvider,
|
|
186
|
-
userStateNotifierProvider.notifier,
|
|
187
|
-
homeWidgetsManagerProvider,
|
|
188
|
-
analyticsApiProvider,
|
|
189
|
-
facebookEventApiProvider,
|
|
164
|
+
title: 'Kasy',
|
|
165
|
+
scaffoldMessengerKey: devInspectorRootScaffoldMessengerKey,
|
|
166
|
+
theme: ThemeProvider.of(context).light,
|
|
167
|
+
darkTheme: ThemeProvider.of(context).dark,
|
|
168
|
+
themeMode: ThemeProvider.of(context).mode,
|
|
169
|
+
themeAnimationDuration: Duration.zero,
|
|
170
|
+
routerConfig: goRouter,
|
|
171
|
+
localizationsDelegates: const [
|
|
172
|
+
GlobalMaterialLocalizations.delegate,
|
|
173
|
+
GlobalWidgetsLocalizations.delegate,
|
|
174
|
+
GlobalCupertinoLocalizations.delegate,
|
|
190
175
|
],
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
176
|
+
locale: TranslationProvider.of(context).flutterLocale,
|
|
177
|
+
supportedLocales: AppLocaleUtils.supportedLocales,
|
|
178
|
+
builder: (context, child) => Initializer(
|
|
179
|
+
services: [
|
|
180
|
+
authenticationApiProvider,
|
|
181
|
+
sharedPreferencesProvider,
|
|
182
|
+
remoteConfigApiProvider,
|
|
183
|
+
notificationsSettingsProvider,
|
|
184
|
+
notificationRepositoryProvider,
|
|
185
|
+
subscriptionRepositoryProvider,
|
|
186
|
+
userStateNotifierProvider.notifier,
|
|
187
|
+
homeWidgetsManagerProvider,
|
|
188
|
+
analyticsApiProvider,
|
|
189
|
+
facebookEventApiProvider,
|
|
190
|
+
],
|
|
191
|
+
onReady: DevicePreview.appBuilder(context, child),
|
|
192
|
+
onError: (_, error) => InitializationErrorPage(error: error),
|
|
193
|
+
onLoading: Scaffold(
|
|
194
|
+
body: Center(
|
|
195
|
+
child: CircularProgressIndicator.adaptive(
|
|
196
|
+
valueColor: AlwaysStoppedAnimation<Color>(
|
|
197
|
+
context.colors.primary,
|
|
198
|
+
),
|
|
198
199
|
),
|
|
199
200
|
),
|
|
200
201
|
),
|
|
201
202
|
),
|
|
202
203
|
),
|
|
203
204
|
),
|
|
204
|
-
),
|
|
205
205
|
);
|
|
206
206
|
},
|
|
207
207
|
),
|
|
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|
|
16
16
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
|
17
17
|
# In Windows, build-name is used as the major, minor, and patch parts
|
|
18
18
|
# of the product and file versions while build-number is used as the build suffix.
|
|
19
|
-
version: 1.0.0+
|
|
19
|
+
version: 1.0.0+33
|
|
20
20
|
|
|
21
21
|
environment:
|
|
22
22
|
sdk: ^3.11.0
|
|
@@ -93,6 +93,7 @@ dependencies:
|
|
|
93
93
|
universal_html: ^2.3.0
|
|
94
94
|
universal_io: ^2.3.1
|
|
95
95
|
url_launcher: ^6.3.2
|
|
96
|
+
web: ^1.1.1
|
|
96
97
|
|
|
97
98
|
dev_dependencies:
|
|
98
99
|
# The "flutter_lints" package below contains a set of recommended lints to
|
|
@@ -40,9 +40,17 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
43
49
|
<style id="splash-screen-style">
|
|
44
50
|
html {
|
|
45
|
-
height: 100
|
|
51
|
+
height: 100%;
|
|
52
|
+
background-color: #FFFFFF;
|
|
53
|
+
color-scheme: light dark;
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
body {
|
|
@@ -52,6 +60,10 @@
|
|
|
52
60
|
background-size: 100% 100%;
|
|
53
61
|
}
|
|
54
62
|
|
|
63
|
+
flutter-view, flt-glass-pane, flt-scene-host {
|
|
64
|
+
background-color: #FFFFFF;
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
.center {
|
|
56
68
|
margin: 0;
|
|
57
69
|
position: absolute;
|
|
@@ -99,16 +111,23 @@
|
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
@media (prefers-color-scheme: dark) {
|
|
114
|
+
html {
|
|
115
|
+
background-color: #000000;
|
|
116
|
+
}
|
|
102
117
|
body {
|
|
103
118
|
background-color: #000000;
|
|
104
119
|
}
|
|
120
|
+
flutter-view, flt-glass-pane, flt-scene-host {
|
|
121
|
+
background-color: #000000;
|
|
122
|
+
}
|
|
105
123
|
}
|
|
106
124
|
</style>
|
|
107
125
|
<script id="splash-screen-script">
|
|
108
126
|
function removeSplashFromWeb() {
|
|
109
127
|
document.getElementById("splash")?.remove();
|
|
110
128
|
document.getElementById("splash-branding")?.remove();
|
|
111
|
-
|
|
129
|
+
const isDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
130
|
+
document.body.style.backgroundColor = isDark ? "#000000" : "#FFFFFF";
|
|
112
131
|
}
|
|
113
132
|
</script>
|
|
114
133
|
</head>
|
|
@@ -123,6 +142,9 @@
|
|
|
123
142
|
|
|
124
143
|
|
|
125
144
|
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
126
148
|
<script src="flutter_bootstrap.js" async=""></script>
|
|
127
149
|
<script src="./local_notifications.js"></script>
|
|
128
150
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import 'package:bart/bart/bart_bottombar_actions.dart';
|
|
2
|
-
import 'package:flutter/material.dart';
|
|
3
|
-
|
|
4
|
-
/// Restores the Bart bottom bar after leaving a home inner route.
|
|
5
|
-
void kasyShowBottomBar(BuildContext context) {
|
|
6
|
-
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
7
|
-
if (!context.mounted) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
Actions.invoke(context, BottomBarIntent.show());
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/// Hides the Bart bottom bar for home inner routes, including web reloads.
|
|
15
|
-
void kasyHideBottomBar(BuildContext context) {
|
|
16
|
-
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
17
|
-
if (!context.mounted) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
Actions.invoke(context, BottomBarIntent.hide());
|
|
21
|
-
});
|
|
22
|
-
}
|