Skip to content

Commit

Permalink
v6.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Aug 28, 2023
1 parent c620aa7 commit 2f91180
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 45 deletions.
6 changes: 6 additions & 0 deletions LabelStoreMax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [6.10.1] - 2023-08-28

* Refactor project for Nylo 5.x.
* Fix AndroidManifest splash screen
* Pubspec.yaml dependency updates

## [6.10.0] - 2023-08-21

* Small refactor to project
Expand Down
10 changes: 1 addition & 9 deletions LabelStoreMax/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,7 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
1 change: 1 addition & 0 deletions LabelStoreMax/lib/app/providers/app_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class AppProvider implements NyProvider {

nylo.addModelDecoders(modelDecoders);
nylo.addValidationRules(validationRules);
nylo.toastNotification = getToastNotificationWidget;

return nylo;
}
Expand Down
14 changes: 14 additions & 0 deletions LabelStoreMax/lib/config/design.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_app/config/toast_notification.dart';
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
import 'package:flutter_app/resources/widgets/toast_notification_widget.dart';
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
import 'package:nylo_framework/nylo_framework.dart';

/*
|--------------------------------------------------------------------------
Expand All @@ -16,3 +19,14 @@ Widget logo = StoreLogo();

Widget loader = AppLoaderWidget();
// resources/widgets/app_loader_widget.dart

Widget getToastNotificationWidget({
required ToastNotificationStyleType style,
Function(ToastNotificationStyleMetaHelper helper)? toastNotificationStyleMeta, Function? onDismiss}) {
if (toastNotificationStyleMeta == null) return SizedBox.shrink();

ToastMeta toastMeta = toastNotificationStyleMeta(NyToastNotificationStyleMetaHelper(style));

return ToastNotification(toastMeta, onDismiss: onDismiss);
// resources/widgets/toast_notification.dart
}
34 changes: 34 additions & 0 deletions LabelStoreMax/lib/config/toast_notification.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'package:nylo_framework/nylo_framework.dart';

/// ToastNotificationStyleMetaHelper is used to return
/// the correct value for the [ToastNotificationStyleType] toast style.
class NyToastNotificationStyleMetaHelper extends ToastNotificationStyleMetaHelper {

NyToastNotificationStyleMetaHelper(ToastNotificationStyleType? style) : super(style);

onSuccess() {
return ToastMeta.success();
}

onWarning() {
return ToastMeta.warning();
}

onInfo() {
return ToastMeta.info();
}

onDanger() {
return ToastMeta.danger();
}

// Example customizing a notification
// onSuccess() {
// return ToastMeta.success(
// title: "Hello",
// description: "World",
// action: () {},
// backgroundColor: Colors.Yellow
// );
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
),
margin: EdgeInsets.only(left: 0),
),
title: afterNotNull(_orderId, child: () => Text("${trans("Order").capitalize()} #${_orderId.toString()}"), loadingPlaceholder: CupertinoActivityIndicator()),
title: afterNotNull(_orderId, child: () => Text("${trans("Order").capitalize()} #${_orderId.toString()}"), loading: CupertinoActivityIndicator()),
centerTitle: true,
),
resizeToAvoidBottomInset: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _BrowseCategoryPageState extends NyState<BrowseCategoryPage> {
children: <Widget>[
Text(trans("Browse"),
style: Theme.of(context).textTheme.titleMedium),
afterNotNull(productCategory, child: () => Text(parseHtmlString(productCategory!.name)), loadingPlaceholder: CupertinoActivityIndicator())
afterNotNull(productCategory, child: () => Text(parseHtmlString(productCategory!.name)), loading: CupertinoActivityIndicator())
],
),
centerTitle: true,
Expand Down
2 changes: 1 addition & 1 deletion LabelStoreMax/lib/resources/pages/browse_search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class _BrowseSearchState extends NyState<BrowseSearchPage> {
children: <Widget>[
Text(trans("Search results for"),
style: Theme.of(context).textTheme.titleMedium),
afterNotNull(_search, child: () => Text("\"" + _search! + "\""), loadingPlaceholder: CupertinoActivityIndicator())
afterNotNull(_search, child: () => Text("\"" + _search! + "\""), loading: CupertinoActivityIndicator())
],
),
centerTitle: true,
Expand Down
90 changes: 90 additions & 0 deletions LabelStoreMax/lib/resources/widgets/toast_notification_widget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import 'package:animate_do/animate_do.dart';
import 'package:flutter/material.dart';
import 'package:nylo_framework/nylo_framework.dart';

class ToastNotification extends StatelessWidget {
const ToastNotification(ToastMeta toastMeta, {Function? onDismiss, Key? key}) : _toastMeta = toastMeta, _dismiss = onDismiss, super(key: key);

final Function? _dismiss;
final ToastMeta _toastMeta;

@override
Widget build(BuildContext context) {
return Stack(children: [
InkWell(
onTap: () {
if (_toastMeta.action != null) {
_toastMeta.action!();
}
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 18.0),
margin: EdgeInsets.symmetric(horizontal: 8.0),
height: 100,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
color: _toastMeta.color,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Pulse(
child: Container(
child: Center(
child: IconButton(
onPressed: () {},
icon: _toastMeta.icon ?? SizedBox.shrink(),
padding: EdgeInsets.only(right: 16),
),
),
),
infinite: true,
duration: Duration(milliseconds: 1500),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
_toastMeta.title.tr(),
style: Theme.of(context)
.textTheme
.headlineSmall!
.copyWith(color: Colors.white),
),
Text(
_toastMeta.description.tr(),
style: Theme.of(context)
.textTheme
.bodyLarge!
.copyWith(color: Colors.white),
),
],
),
),
],
),
),
),
Positioned(
top: 0,
right: 0,
child: IconButton(
onPressed: () {
if (_dismiss != null) {
_dismiss!();
}
},
icon: Icon(
Icons.close,
color: Colors.white,
)),
)
]);
}
}

54 changes: 27 additions & 27 deletions LabelStoreMax/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8
sha256: "1a5e13736d59235ce0139621b4bbe29bc89839e202409081bc667eb3cd20674c"
url: "https://pub.dev"
source: hosted
version: "1.3.3"
version: "1.3.5"
analyzer:
dependency: "direct main"
description:
Expand All @@ -26,7 +26,7 @@ packages:
source: hosted
version: "5.12.0"
animate_do:
dependency: transitive
dependency: "direct main"
description:
name: animate_do
sha256: "9aeacc1a7238f971c039bdf45d13c628be554a242e0251c4ddda09d19a1a923f"
Expand Down Expand Up @@ -269,10 +269,10 @@ packages:
dependency: "direct main"
description:
name: firebase_core
sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be
sha256: c78132175edda4bc532a71e01a32964e4b4fcf53de7853a422d96dac3725f389
url: "https://pub.dev"
source: hosted
version: "2.14.0"
version: "2.15.1"
firebase_core_platform_interface:
dependency: transitive
description:
Expand All @@ -285,34 +285,34 @@ packages:
dependency: transitive
description:
name: firebase_core_web
sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa"
sha256: "4cf4d2161530332ddc3c562f19823fb897ff37a9a774090d28df99f47370e973"
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.7.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: "7a09d8c21147f009882a27c96de1918ea283f974d73cb6fae1d234bb9ec18d8b"
sha256: "6c1a2a047d6f165b7c5f947467ac5138731a2af82c7af1c12d691dbb834f6b73"
url: "https://pub.dev"
source: hosted
version: "14.6.4"
version: "14.6.7"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: e9e9dc48a3d8ffa67aaba3d6b1ebf74bc7d7d8c83d10b1458ff97878b9d8a2b0
sha256: bcba58d28f8cda607a323240c6d314c2c62b62ebfbb0f2d704ebefef07b52b5f
url: "https://pub.dev"
source: hosted
version: "4.5.3"
version: "4.5.6"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "381f217e41e0e407baf8df21787b97e46fabfacefd6a953425be3a6cdf2269f4"
sha256: "962d09ec9dfa486cbbc218258ad41e8ec7997a2eba46919049496e1cafd960c5"
url: "https://pub.dev"
source: hosted
version: "3.5.3"
version: "3.5.6"
flare_flutter:
dependency: transitive
description:
Expand Down Expand Up @@ -439,10 +439,10 @@ packages:
dependency: "direct main"
description:
name: flutter_stripe
sha256: fb1a0647867a26b1fced98706ef96c664a5ae2579e29b67af5ddd054e01d83df
sha256: "2acc4a31f9fed946a1fb230d708169ff0448f2a356fc728780ced52eb0df7712"
url: "https://pub.dev"
source: hosted
version: "9.2.2"
version: "9.3.0"
flutter_styled_toast:
dependency: transitive
description:
Expand Down Expand Up @@ -641,18 +641,18 @@ packages:
dependency: "direct main"
description:
name: nylo_framework
sha256: e84667df8af356072e089b9ac2e9ab7dc8e22a3b41e7e59bf83f45ce6bd6c51c
sha256: "535684c9fd422f7a45ad83b1228ea42a87782a0655aa227c44fe75b9d3bcb8c5"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.3.2"
nylo_support:
dependency: transitive
description:
name: nylo_support
sha256: c036f49f235fa06e42f0d7615f98d522762f428b8f912d2ce819b2d99c3ae780
sha256: "903f510366ca1af7982ec69d45fd8b9bd25c9cdbf6380f8736cd50fa37eed8cd"
url: "https://pub.dev"
source: hosted
version: "5.5.0"
version: "5.7.0"
octo_image:
dependency: transitive
description:
Expand All @@ -673,10 +673,10 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b
sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
version: "4.1.0"
package_info_plus_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -958,26 +958,26 @@ packages:
dependency: transitive
description:
name: stripe_android
sha256: e5557f2a81cb5070d48edf33168ca3891a22c63f0be98d90edeba54c4328dd21
sha256: "0396c877823e84f0053f7d57fed506798635a9d48f0f044859c85216db6194fd"
url: "https://pub.dev"
source: hosted
version: "9.2.1"
version: "9.3.0"
stripe_ios:
dependency: transitive
description:
name: stripe_ios
sha256: e397609a5083b79706814342b40a2a58f1b97ecab2b9d6cae8d8e9f59646fc8c
sha256: "81092043f0ae86ba6f5c16f76b16bbc97c4579eee58130e84cf4b30e36b4b649"
url: "https://pub.dev"
source: hosted
version: "9.2.1"
version: "9.3.1"
stripe_platform_interface:
dependency: transitive
description:
name: stripe_platform_interface
sha256: "321de409f41088e842140a8e8b334b1111cc6072dfb2fa9e6452155187e8ff2d"
sha256: "554380d197004cff235ae0327f1c3b596a3d22575af83e07c15ed07b6b62c45e"
url: "https://pub.dev"
source: hosted
version: "9.2.2"
version: "9.3.0"
synchronized:
dependency: transitive
description:
Expand Down
Loading

0 comments on commit 2f91180

Please sign in to comment.