Skip to content

Commit 2f91180

Browse files
committed
v6.9.1
1 parent c620aa7 commit 2f91180

File tree

11 files changed

+183
-45
lines changed

11 files changed

+183
-45
lines changed

LabelStoreMax/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [6.10.1] - 2023-08-28
2+
3+
* Refactor project for Nylo 5.x.
4+
* Fix AndroidManifest splash screen
5+
* Pubspec.yaml dependency updates
6+
17
## [6.10.0] - 2023-08-21
28

39
* Small refactor to project

LabelStoreMax/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@
3131
android:name="io.flutter.embedding.android.NormalTheme"
3232
android:resource="@style/NormalTheme"
3333
/>
34-
<!-- Displays an Android View that continues showing the launch screen
35-
Drawable until Flutter paints its first frame, then this splash
36-
screen fades out. A splash screen is useful to avoid any visual
37-
gap between the end of Android's launch screen and the painting of
38-
Flutter's first frame. -->
39-
<meta-data
40-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
41-
android:resource="@drawable/launch_background"
42-
/>
34+
4335
<intent-filter>
4436
<action android:name="android.intent.action.MAIN"/>
4537
<category android:name="android.intent.category.LAUNCHER"/>

LabelStoreMax/lib/app/providers/app_provider.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class AppProvider implements NyProvider {
9595

9696
nylo.addModelDecoders(modelDecoders);
9797
nylo.addValidationRules(validationRules);
98+
nylo.toastNotification = getToastNotificationWidget;
9899

99100
return nylo;
100101
}

LabelStoreMax/lib/config/design.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import 'package:flutter/cupertino.dart';
2+
import 'package:flutter_app/config/toast_notification.dart';
23
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
4+
import 'package:flutter_app/resources/widgets/toast_notification_widget.dart';
35
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
6+
import 'package:nylo_framework/nylo_framework.dart';
47

58
/*
69
|--------------------------------------------------------------------------
@@ -16,3 +19,14 @@ Widget logo = StoreLogo();
1619

1720
Widget loader = AppLoaderWidget();
1821
// resources/widgets/app_loader_widget.dart
22+
23+
Widget getToastNotificationWidget({
24+
required ToastNotificationStyleType style,
25+
Function(ToastNotificationStyleMetaHelper helper)? toastNotificationStyleMeta, Function? onDismiss}) {
26+
if (toastNotificationStyleMeta == null) return SizedBox.shrink();
27+
28+
ToastMeta toastMeta = toastNotificationStyleMeta(NyToastNotificationStyleMetaHelper(style));
29+
30+
return ToastNotification(toastMeta, onDismiss: onDismiss);
31+
// resources/widgets/toast_notification.dart
32+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import 'package:nylo_framework/nylo_framework.dart';
2+
3+
/// ToastNotificationStyleMetaHelper is used to return
4+
/// the correct value for the [ToastNotificationStyleType] toast style.
5+
class NyToastNotificationStyleMetaHelper extends ToastNotificationStyleMetaHelper {
6+
7+
NyToastNotificationStyleMetaHelper(ToastNotificationStyleType? style) : super(style);
8+
9+
onSuccess() {
10+
return ToastMeta.success();
11+
}
12+
13+
onWarning() {
14+
return ToastMeta.warning();
15+
}
16+
17+
onInfo() {
18+
return ToastMeta.info();
19+
}
20+
21+
onDanger() {
22+
return ToastMeta.danger();
23+
}
24+
25+
// Example customizing a notification
26+
// onSuccess() {
27+
// return ToastMeta.success(
28+
// title: "Hello",
29+
// description: "World",
30+
// action: () {},
31+
// backgroundColor: Colors.Yellow
32+
// );
33+
// }
34+
}

LabelStoreMax/lib/resources/pages/account_order_detail_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
5252
),
5353
margin: EdgeInsets.only(left: 0),
5454
),
55-
title: afterNotNull(_orderId, child: () => Text("${trans("Order").capitalize()} #${_orderId.toString()}"), loadingPlaceholder: CupertinoActivityIndicator()),
55+
title: afterNotNull(_orderId, child: () => Text("${trans("Order").capitalize()} #${_orderId.toString()}"), loading: CupertinoActivityIndicator()),
5656
centerTitle: true,
5757
),
5858
resizeToAvoidBottomInset: false,

LabelStoreMax/lib/resources/pages/browse_category_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _BrowseCategoryPageState extends NyState<BrowseCategoryPage> {
6565
children: <Widget>[
6666
Text(trans("Browse"),
6767
style: Theme.of(context).textTheme.titleMedium),
68-
afterNotNull(productCategory, child: () => Text(parseHtmlString(productCategory!.name)), loadingPlaceholder: CupertinoActivityIndicator())
68+
afterNotNull(productCategory, child: () => Text(parseHtmlString(productCategory!.name)), loading: CupertinoActivityIndicator())
6969
],
7070
),
7171
centerTitle: true,

LabelStoreMax/lib/resources/pages/browse_search_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class _BrowseSearchState extends NyState<BrowseSearchPage> {
5757
children: <Widget>[
5858
Text(trans("Search results for"),
5959
style: Theme.of(context).textTheme.titleMedium),
60-
afterNotNull(_search, child: () => Text("\"" + _search! + "\""), loadingPlaceholder: CupertinoActivityIndicator())
60+
afterNotNull(_search, child: () => Text("\"" + _search! + "\""), loading: CupertinoActivityIndicator())
6161
],
6262
),
6363
centerTitle: true,
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import 'package:animate_do/animate_do.dart';
2+
import 'package:flutter/material.dart';
3+
import 'package:nylo_framework/nylo_framework.dart';
4+
5+
class ToastNotification extends StatelessWidget {
6+
const ToastNotification(ToastMeta toastMeta, {Function? onDismiss, Key? key}) : _toastMeta = toastMeta, _dismiss = onDismiss, super(key: key);
7+
8+
final Function? _dismiss;
9+
final ToastMeta _toastMeta;
10+
11+
@override
12+
Widget build(BuildContext context) {
13+
return Stack(children: [
14+
InkWell(
15+
onTap: () {
16+
if (_toastMeta.action != null) {
17+
_toastMeta.action!();
18+
}
19+
},
20+
child: Container(
21+
padding: EdgeInsets.symmetric(horizontal: 18.0),
22+
margin: EdgeInsets.symmetric(horizontal: 8.0),
23+
height: 100,
24+
decoration: ShapeDecoration(
25+
shape: RoundedRectangleBorder(
26+
borderRadius: BorderRadius.circular(4),
27+
),
28+
color: _toastMeta.color,
29+
),
30+
child: Row(
31+
mainAxisAlignment: MainAxisAlignment.center,
32+
crossAxisAlignment: CrossAxisAlignment.center,
33+
children: [
34+
Pulse(
35+
child: Container(
36+
child: Center(
37+
child: IconButton(
38+
onPressed: () {},
39+
icon: _toastMeta.icon ?? SizedBox.shrink(),
40+
padding: EdgeInsets.only(right: 16),
41+
),
42+
),
43+
),
44+
infinite: true,
45+
duration: Duration(milliseconds: 1500),
46+
),
47+
Expanded(
48+
child: Column(
49+
crossAxisAlignment: CrossAxisAlignment.start,
50+
mainAxisAlignment: MainAxisAlignment.center,
51+
children: [
52+
Text(
53+
_toastMeta.title.tr(),
54+
style: Theme.of(context)
55+
.textTheme
56+
.headlineSmall!
57+
.copyWith(color: Colors.white),
58+
),
59+
Text(
60+
_toastMeta.description.tr(),
61+
style: Theme.of(context)
62+
.textTheme
63+
.bodyLarge!
64+
.copyWith(color: Colors.white),
65+
),
66+
],
67+
),
68+
),
69+
],
70+
),
71+
),
72+
),
73+
Positioned(
74+
top: 0,
75+
right: 0,
76+
child: IconButton(
77+
onPressed: () {
78+
if (_dismiss != null) {
79+
_dismiss!();
80+
}
81+
},
82+
icon: Icon(
83+
Icons.close,
84+
color: Colors.white,
85+
)),
86+
)
87+
]);
88+
}
89+
}
90+

LabelStoreMax/pubspec.lock

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ packages:
1313
dependency: transitive
1414
description:
1515
name: _flutterfire_internals
16-
sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8
16+
sha256: "1a5e13736d59235ce0139621b4bbe29bc89839e202409081bc667eb3cd20674c"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "1.3.3"
19+
version: "1.3.5"
2020
analyzer:
2121
dependency: "direct main"
2222
description:
@@ -26,7 +26,7 @@ packages:
2626
source: hosted
2727
version: "5.12.0"
2828
animate_do:
29-
dependency: transitive
29+
dependency: "direct main"
3030
description:
3131
name: animate_do
3232
sha256: "9aeacc1a7238f971c039bdf45d13c628be554a242e0251c4ddda09d19a1a923f"
@@ -269,10 +269,10 @@ packages:
269269
dependency: "direct main"
270270
description:
271271
name: firebase_core
272-
sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be
272+
sha256: c78132175edda4bc532a71e01a32964e4b4fcf53de7853a422d96dac3725f389
273273
url: "https://pub.dev"
274274
source: hosted
275-
version: "2.14.0"
275+
version: "2.15.1"
276276
firebase_core_platform_interface:
277277
dependency: transitive
278278
description:
@@ -285,34 +285,34 @@ packages:
285285
dependency: transitive
286286
description:
287287
name: firebase_core_web
288-
sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa"
288+
sha256: "4cf4d2161530332ddc3c562f19823fb897ff37a9a774090d28df99f47370e973"
289289
url: "https://pub.dev"
290290
source: hosted
291-
version: "2.6.0"
291+
version: "2.7.0"
292292
firebase_messaging:
293293
dependency: "direct main"
294294
description:
295295
name: firebase_messaging
296-
sha256: "7a09d8c21147f009882a27c96de1918ea283f974d73cb6fae1d234bb9ec18d8b"
296+
sha256: "6c1a2a047d6f165b7c5f947467ac5138731a2af82c7af1c12d691dbb834f6b73"
297297
url: "https://pub.dev"
298298
source: hosted
299-
version: "14.6.4"
299+
version: "14.6.7"
300300
firebase_messaging_platform_interface:
301301
dependency: transitive
302302
description:
303303
name: firebase_messaging_platform_interface
304-
sha256: e9e9dc48a3d8ffa67aaba3d6b1ebf74bc7d7d8c83d10b1458ff97878b9d8a2b0
304+
sha256: bcba58d28f8cda607a323240c6d314c2c62b62ebfbb0f2d704ebefef07b52b5f
305305
url: "https://pub.dev"
306306
source: hosted
307-
version: "4.5.3"
307+
version: "4.5.6"
308308
firebase_messaging_web:
309309
dependency: transitive
310310
description:
311311
name: firebase_messaging_web
312-
sha256: "381f217e41e0e407baf8df21787b97e46fabfacefd6a953425be3a6cdf2269f4"
312+
sha256: "962d09ec9dfa486cbbc218258ad41e8ec7997a2eba46919049496e1cafd960c5"
313313
url: "https://pub.dev"
314314
source: hosted
315-
version: "3.5.3"
315+
version: "3.5.6"
316316
flare_flutter:
317317
dependency: transitive
318318
description:
@@ -439,10 +439,10 @@ packages:
439439
dependency: "direct main"
440440
description:
441441
name: flutter_stripe
442-
sha256: fb1a0647867a26b1fced98706ef96c664a5ae2579e29b67af5ddd054e01d83df
442+
sha256: "2acc4a31f9fed946a1fb230d708169ff0448f2a356fc728780ced52eb0df7712"
443443
url: "https://pub.dev"
444444
source: hosted
445-
version: "9.2.2"
445+
version: "9.3.0"
446446
flutter_styled_toast:
447447
dependency: transitive
448448
description:
@@ -641,18 +641,18 @@ packages:
641641
dependency: "direct main"
642642
description:
643643
name: nylo_framework
644-
sha256: e84667df8af356072e089b9ac2e9ab7dc8e22a3b41e7e59bf83f45ce6bd6c51c
644+
sha256: "535684c9fd422f7a45ad83b1228ea42a87782a0655aa227c44fe75b9d3bcb8c5"
645645
url: "https://pub.dev"
646646
source: hosted
647-
version: "5.2.0"
647+
version: "5.3.2"
648648
nylo_support:
649649
dependency: transitive
650650
description:
651651
name: nylo_support
652-
sha256: c036f49f235fa06e42f0d7615f98d522762f428b8f912d2ce819b2d99c3ae780
652+
sha256: "903f510366ca1af7982ec69d45fd8b9bd25c9cdbf6380f8736cd50fa37eed8cd"
653653
url: "https://pub.dev"
654654
source: hosted
655-
version: "5.5.0"
655+
version: "5.7.0"
656656
octo_image:
657657
dependency: transitive
658658
description:
@@ -673,10 +673,10 @@ packages:
673673
dependency: "direct main"
674674
description:
675675
name: package_info_plus
676-
sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b
676+
sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a"
677677
url: "https://pub.dev"
678678
source: hosted
679-
version: "4.0.2"
679+
version: "4.1.0"
680680
package_info_plus_platform_interface:
681681
dependency: transitive
682682
description:
@@ -958,26 +958,26 @@ packages:
958958
dependency: transitive
959959
description:
960960
name: stripe_android
961-
sha256: e5557f2a81cb5070d48edf33168ca3891a22c63f0be98d90edeba54c4328dd21
961+
sha256: "0396c877823e84f0053f7d57fed506798635a9d48f0f044859c85216db6194fd"
962962
url: "https://pub.dev"
963963
source: hosted
964-
version: "9.2.1"
964+
version: "9.3.0"
965965
stripe_ios:
966966
dependency: transitive
967967
description:
968968
name: stripe_ios
969-
sha256: e397609a5083b79706814342b40a2a58f1b97ecab2b9d6cae8d8e9f59646fc8c
969+
sha256: "81092043f0ae86ba6f5c16f76b16bbc97c4579eee58130e84cf4b30e36b4b649"
970970
url: "https://pub.dev"
971971
source: hosted
972-
version: "9.2.1"
972+
version: "9.3.1"
973973
stripe_platform_interface:
974974
dependency: transitive
975975
description:
976976
name: stripe_platform_interface
977-
sha256: "321de409f41088e842140a8e8b334b1111cc6072dfb2fa9e6452155187e8ff2d"
977+
sha256: "554380d197004cff235ae0327f1c3b596a3d22575af83e07c15ed07b6b62c45e"
978978
url: "https://pub.dev"
979979
source: hosted
980-
version: "9.2.2"
980+
version: "9.3.0"
981981
synchronized:
982982
dependency: transitive
983983
description:

0 commit comments

Comments
 (0)