Skip to content

Commit 5184692

Browse files
author
WooSignal
committed
Changes and tweaks
1 parent 6758875 commit 5184692

25 files changed

+124
-121
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_money_formatter","dependencies":[]},{"name":"flutter_web_browser","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"woosignal_stripe","dependencies":[]}]}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.2+1/","dependencies":[]},{"name":"flutter_money_formatter","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_money_formatter-0.8.3/","dependencies":[]},{"name":"flutter_web_browser","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_browser-0.11.0/","dependencies":[]},{"name":"package_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/","dependencies":[]},{"name":"path_provider","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/","dependencies":[]},{"name":"shared_preferences","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.6+5/","dependencies":[]},{"name":"woosignal_stripe","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/woosignal_stripe-0.0.4/","dependencies":[]}],"android":[{"name":"device_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.2+1/","dependencies":[]},{"name":"flutter_money_formatter","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_money_formatter-0.8.3/","dependencies":[]},{"name":"flutter_web_browser","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_web_browser-0.11.0/","dependencies":[]},{"name":"package_info","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/","dependencies":[]},{"name":"path_provider","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/","dependencies":[]},{"name":"shared_preferences","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.6+5/","dependencies":[]},{"name":"woosignal_stripe","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/woosignal_stripe-0.0.4/","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+6/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/anthony/Documents/config/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+4/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_money_formatter","dependencies":[]},{"name":"flutter_web_browser","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"woosignal_stripe","dependencies":[]}],"date_created":"2020-04-09 03:26:04.771408","version":"1.18.0-5.0.pre.38"}

LabelStoreMax/lib/helpers/app_themes.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ TextTheme textThemeAccent() {
4040
color: Colors.black,
4141
fontFamily: appFontFamily,
4242
fontWeight: FontWeight.w800),
43-
body2: new TextStyle(
43+
bodyText1: new TextStyle(
4444
color: HexColor("#606060"),
4545
fontFamily: appFontFamily,
4646
fontWeight: FontWeight.w700),
@@ -89,7 +89,7 @@ TextTheme textThemePrimary() {
8989
color: Colors.black,
9090
fontFamily: appFontFamily,
9191
fontWeight: FontWeight.w800),
92-
body2: new TextStyle(
92+
bodyText1: new TextStyle(
9393
color: HexColor("#606060"),
9494
fontFamily: appFontFamily,
9595
fontWeight: FontWeight.w700),
@@ -122,7 +122,7 @@ TextTheme textThemeMain() {
122122
headline: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
123123
title: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
124124
subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
125-
body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
125+
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
126126
body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
127127
caption: new TextStyle(
128128
color: Colors.redAccent, fontSize: 16, fontFamily: appFontFamily),
@@ -142,7 +142,7 @@ TextTheme textThemeAppBar() {
142142
fontFamily: appFontFamily,
143143
fontWeight: FontWeight.w900),
144144
subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
145-
body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
145+
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
146146
body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
147147
caption: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
148148
button: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Label StoreMAX
2+
//
3+
// Created by Anthony Gordon.
4+
// Copyright © 2020 WooSignal. All rights reserved.
5+
//
6+
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
11+
import 'package:flutter/cupertino.dart';
12+
import 'package:flutter/foundation.dart';
13+
14+
class LifecycleEventHandler extends WidgetsBindingObserver {
15+
final AsyncCallback resumeCallBack;
16+
final AsyncCallback suspendingCallBack;
17+
18+
LifecycleEventHandler({
19+
this.resumeCallBack,
20+
this.suspendingCallBack,
21+
});
22+
23+
@override
24+
Future<Null> didChangeAppLifecycleState(AppLifecycleState state) async {
25+
switch (state) {
26+
case AppLifecycleState.resumed:
27+
if (resumeCallBack != null) {
28+
await resumeCallBack();
29+
}
30+
break;
31+
case AppLifecycleState.inactive:
32+
case AppLifecycleState.paused:
33+
case AppLifecycleState.detached:
34+
if (suspendingCallBack != null) {
35+
await suspendingCallBack();
36+
}
37+
break;
38+
}
39+
}
40+
}

LabelStoreMax/lib/helpers/tools.dart

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import 'package:label_storemax/app_payment_methods.dart';
1212
import 'package:label_storemax/helpers/app_localizations.dart';
1313
import 'package:flutter/material.dart';
14-
import 'package:fluttertoast/fluttertoast.dart';
1514
import 'package:label_storemax/labelconfig.dart';
1615
import 'package:edge_alert/edge_alert.dart';
1716
import 'package:label_storemax/models/billing_details.dart';
@@ -59,22 +58,6 @@ String truncateWithEllipsis(int cutoff, String myString) {
5958
: '${myString.substring(0, cutoff)}...';
6059
}
6160

62-
void showToastWith({String message, String statusType}) {
63-
Fluttertoast.showToast(
64-
msg: message,
65-
toastLength: Toast.LENGTH_SHORT,
66-
gravity: ToastGravity.CENTER,
67-
timeInSecForIosWeb: 3,
68-
backgroundColor:
69-
(statusType == "error" ? HexColor("#b5123a") : Colors.grey),
70-
textColor: (statusType == "error" ? Colors.white : Colors.black),
71-
fontSize: 16.0);
72-
}
73-
74-
void showToastNetworkError() {
75-
showToastWith(message: "Oops, something went wrong");
76-
}
77-
7861
showStatusAlert(context,
7962
{@required String title, String subtitle, IconData icon, int duration}) {
8063
StatusAlert.show(

LabelStoreMax/lib/labelconfig.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
const app_name = "MyApp";
2424

25-
const app_key = "My App Key";
25+
const app_key = "Your App Key";
2626

2727
const app_logo_url = "https://woosignal.com/images/120x120_woosignal.png";
2828

LabelStoreMax/lib/pages/about.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class _AboutPageState extends State<AboutPage> {
4242
},
4343
),
4444
title: Text(trans(context, "About"),
45-
style: Theme.of(context).primaryTextTheme.subhead),
45+
style: Theme.of(context).primaryTextTheme.subtitle1),
4646
centerTitle: true,
4747
),
4848
body: SafeArea(
@@ -86,7 +86,7 @@ class _AboutPageState extends State<AboutPage> {
8686
": " +
8787
snapshot.data.version,
8888
style:
89-
Theme.of(context).primaryTextTheme.body2),
89+
Theme.of(context).primaryTextTheme.bodyText1),
9090
padding: EdgeInsets.only(top: 15, bottom: 15),
9191
);
9292
}

LabelStoreMax/lib/pages/browse_category.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class _BrowseCategoryPageState extends State<BrowseCategoryPage> {
109109
mainAxisAlignment: MainAxisAlignment.center,
110110
children: <Widget>[
111111
Text(trans(context, "Browse"),
112-
style: Theme.of(context).primaryTextTheme.subhead),
112+
style: Theme.of(context).primaryTextTheme.subtitle1),
113113
Text(_selectedCategory.name,
114114
style: Theme.of(context).primaryTextTheme.title)
115115
],

LabelStoreMax/lib/pages/browse_search.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class _BrowseSearchState extends State<BrowseSearchPage> {
9494
mainAxisAlignment: MainAxisAlignment.center,
9595
children: <Widget>[
9696
Text(trans(context, "Search results for"),
97-
style: Theme.of(context).primaryTextTheme.subhead),
97+
style: Theme.of(context).primaryTextTheme.subtitle1),
9898
Text("\"" + _search + "\"",
9999
style: Theme.of(context).primaryTextTheme.title)
100100
],

LabelStoreMax/lib/pages/cart.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class _CartPageState extends State<CartPage> {
161161
child: Align(
162162
child: Padding(
163163
child: Text(trans(context, "Clear Cart"),
164-
style: Theme.of(context).primaryTextTheme.body2),
164+
style: Theme.of(context).primaryTextTheme.bodyText1),
165165
padding: EdgeInsets.only(right: 8),
166166
),
167167
alignment: Alignment.centerLeft,
@@ -190,7 +190,7 @@ class _CartPageState extends State<CartPage> {
190190
alignment: Alignment.center),
191191
Padding(
192192
child: Text(trans(context, "Empty Basket"),
193-
style: Theme.of(context).primaryTextTheme.body1),
193+
style: Theme.of(context).primaryTextTheme.bodyText2),
194194
padding: EdgeInsets.only(top: 10),
195195
)
196196
],

LabelStoreMax/lib/pages/checkout_confirmation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
131131
children: <Widget>[
132132
Center(
133133
child: Text(trans(context, "Checkout"),
134-
style: Theme.of(context).primaryTextTheme.subhead),
134+
style: Theme.of(context).primaryTextTheme.subtitle1),
135135
),
136136
Expanded(
137137
child: Container(
@@ -251,7 +251,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
251251
padding: const EdgeInsets.only(top: 15),
252252
child: Text(
253253
trans(context, "One moment") + "...",
254-
style: Theme.of(context).primaryTextTheme.subhead,
254+
style: Theme.of(context).primaryTextTheme.subtitle1,
255255
),
256256
)
257257
],

0 commit comments

Comments
 (0)