Changes and tweaks
This commit is contained in:
parent
6758875a65
commit
5184692657
@ -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":[]}]}
|
||||
{"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"}
|
||||
@ -40,7 +40,7 @@ TextTheme textThemeAccent() {
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800),
|
||||
body2: new TextStyle(
|
||||
bodyText1: new TextStyle(
|
||||
color: HexColor("#606060"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
@ -89,7 +89,7 @@ TextTheme textThemePrimary() {
|
||||
color: Colors.black,
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w800),
|
||||
body2: new TextStyle(
|
||||
bodyText1: new TextStyle(
|
||||
color: HexColor("#606060"),
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w700),
|
||||
@ -122,7 +122,7 @@ TextTheme textThemeMain() {
|
||||
headline: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
title: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
caption: new TextStyle(
|
||||
color: Colors.redAccent, fontSize: 16, fontFamily: appFontFamily),
|
||||
@ -142,7 +142,7 @@ TextTheme textThemeAppBar() {
|
||||
fontFamily: appFontFamily,
|
||||
fontWeight: FontWeight.w900),
|
||||
subhead: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
body2: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
bodyText1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
body1: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
caption: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
button: new TextStyle(color: Colors.black, fontFamily: appFontFamily),
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
// Label StoreMAX
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// Copyright © 2020 WooSignal. All rights reserved.
|
||||
//
|
||||
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class LifecycleEventHandler extends WidgetsBindingObserver {
|
||||
final AsyncCallback resumeCallBack;
|
||||
final AsyncCallback suspendingCallBack;
|
||||
|
||||
LifecycleEventHandler({
|
||||
this.resumeCallBack,
|
||||
this.suspendingCallBack,
|
||||
});
|
||||
|
||||
@override
|
||||
Future<Null> didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||
switch (state) {
|
||||
case AppLifecycleState.resumed:
|
||||
if (resumeCallBack != null) {
|
||||
await resumeCallBack();
|
||||
}
|
||||
break;
|
||||
case AppLifecycleState.inactive:
|
||||
case AppLifecycleState.paused:
|
||||
case AppLifecycleState.detached:
|
||||
if (suspendingCallBack != null) {
|
||||
await suspendingCallBack();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,6 @@
|
||||
import 'package:label_storemax/app_payment_methods.dart';
|
||||
import 'package:label_storemax/helpers/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
import 'package:edge_alert/edge_alert.dart';
|
||||
import 'package:label_storemax/models/billing_details.dart';
|
||||
@ -59,22 +58,6 @@ String truncateWithEllipsis(int cutoff, String myString) {
|
||||
: '${myString.substring(0, cutoff)}...';
|
||||
}
|
||||
|
||||
void showToastWith({String message, String statusType}) {
|
||||
Fluttertoast.showToast(
|
||||
msg: message,
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.CENTER,
|
||||
timeInSecForIosWeb: 3,
|
||||
backgroundColor:
|
||||
(statusType == "error" ? HexColor("#b5123a") : Colors.grey),
|
||||
textColor: (statusType == "error" ? Colors.white : Colors.black),
|
||||
fontSize: 16.0);
|
||||
}
|
||||
|
||||
void showToastNetworkError() {
|
||||
showToastWith(message: "Oops, something went wrong");
|
||||
}
|
||||
|
||||
showStatusAlert(context,
|
||||
{@required String title, String subtitle, IconData icon, int duration}) {
|
||||
StatusAlert.show(
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
const app_name = "MyApp";
|
||||
|
||||
const app_key = "My App Key";
|
||||
const app_key = "Your App Key";
|
||||
|
||||
const app_logo_url = "https://woosignal.com/images/120x120_woosignal.png";
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ class _AboutPageState extends State<AboutPage> {
|
||||
},
|
||||
),
|
||||
title: Text(trans(context, "About"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
@ -86,7 +86,7 @@ class _AboutPageState extends State<AboutPage> {
|
||||
": " +
|
||||
snapshot.data.version,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.body2),
|
||||
Theme.of(context).primaryTextTheme.bodyText1),
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
);
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ class _BrowseCategoryPageState extends State<BrowseCategoryPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Browse"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
Text(_selectedCategory.name,
|
||||
style: Theme.of(context).primaryTextTheme.title)
|
||||
],
|
||||
|
||||
@ -94,7 +94,7 @@ class _BrowseSearchState extends State<BrowseSearchPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Search results for"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
Text("\"" + _search + "\"",
|
||||
style: Theme.of(context).primaryTextTheme.title)
|
||||
],
|
||||
|
||||
@ -161,7 +161,7 @@ class _CartPageState extends State<CartPage> {
|
||||
child: Align(
|
||||
child: Padding(
|
||||
child: Text(trans(context, "Clear Cart"),
|
||||
style: Theme.of(context).primaryTextTheme.body2),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
padding: EdgeInsets.only(right: 8),
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
@ -190,7 +190,7 @@ class _CartPageState extends State<CartPage> {
|
||||
alignment: Alignment.center),
|
||||
Padding(
|
||||
child: Text(trans(context, "Empty Basket"),
|
||||
style: Theme.of(context).primaryTextTheme.body1),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2),
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
)
|
||||
],
|
||||
|
||||
@ -131,7 +131,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
children: <Widget>[
|
||||
Center(
|
||||
child: Text(trans(context, "Checkout"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
@ -251,7 +251,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
padding: const EdgeInsets.only(top: 15),
|
||||
child: Text(
|
||||
trans(context, "One moment") + "...",
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@ -94,7 +94,7 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
return InkWell(
|
||||
child: Container(
|
||||
child: Text(strName["name"],
|
||||
style: Theme.of(context).primaryTextTheme.body2),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
padding: EdgeInsets.only(top: 25, bottom: 25),
|
||||
),
|
||||
splashColor: Colors.grey,
|
||||
@ -124,7 +124,7 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(trans(context, "Billing & Shipping Details"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
),
|
||||
body: SafeArea(
|
||||
minimum: safeAreaDefault(),
|
||||
@ -228,7 +228,7 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Remember my details"),
|
||||
style: Theme.of(context).primaryTextTheme.body2),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
Checkbox(
|
||||
value: valRememberDetails,
|
||||
onChanged: (bool value) {
|
||||
|
||||
@ -43,7 +43,7 @@ class _CheckoutPaymentTypePageState extends State<CheckoutPaymentTypePage> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(trans(context, "Payment Method"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
),
|
||||
|
||||
@ -179,7 +179,7 @@ class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(trans(context, "Shipping Methods"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
),
|
||||
|
||||
@ -60,7 +60,7 @@ class _CheckoutStatusState extends State<CheckoutStatusPage> {
|
||||
Padding(
|
||||
child: Text(
|
||||
trans(context, "Order Status"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 15),
|
||||
),
|
||||
@ -71,14 +71,14 @@ class _CheckoutStatusState extends State<CheckoutStatusPage> {
|
||||
),
|
||||
Text(
|
||||
trans(context, "Your transaction details"),
|
||||
style: Theme.of(context).primaryTextTheme.body1,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
Text(
|
||||
trans(context, "Order Ref") +
|
||||
". #" +
|
||||
_order.id.toString(),
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
],
|
||||
@ -104,7 +104,7 @@ class _CheckoutStatusState extends State<CheckoutStatusPage> {
|
||||
child: Padding(
|
||||
child: Text(
|
||||
trans(context, "Items"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
@ -130,21 +130,21 @@ class _CheckoutStatusState extends State<CheckoutStatusPage> {
|
||||
Text(lineItem.name,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.body2,
|
||||
.bodyText1,
|
||||
softWrap: false,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis),
|
||||
Text("x" + lineItem.quantity.toString(),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.body1),
|
||||
.bodyText2),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatStringCurrency(
|
||||
total: lineItem.total.toString()),
|
||||
style: Theme.of(context).primaryTextTheme.body2)
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1)
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(color: Colors.white),
|
||||
|
||||
@ -46,7 +46,7 @@ class _ErrorPageState extends State<ErrorPage> {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
trans(context, "Sorry, something went wrong"),
|
||||
style: Theme.of(context).primaryTextTheme.body1,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
@ -115,12 +115,12 @@ class _HomePageState extends State<HomePage> {
|
||||
color: Colors.white,
|
||||
borderRadius: new BorderRadius.only(
|
||||
topLeft: const Radius.circular(10.0),
|
||||
topRight: const Radius.circular(10.0)),
|
||||
topRight: const Radius.circular(10.0),),
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Categories"),
|
||||
style: Theme.of(context).primaryTextTheme.display1,
|
||||
style: Theme.of(context).primaryTextTheme.headline4,
|
||||
textAlign: TextAlign.left),
|
||||
Expanded(
|
||||
child: new ListView.builder(
|
||||
@ -197,10 +197,10 @@ class _HomePageState extends State<HomePage> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Shop") + " / ",
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
Text(
|
||||
trans(context, "Newest"),
|
||||
style: Theme.of(context).primaryTextTheme.body1,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -209,7 +209,7 @@ class _HomePageState extends State<HomePage> {
|
||||
height: 60,
|
||||
child: Text(
|
||||
trans(context, "Browse categories"),
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
),
|
||||
onPressed: () {
|
||||
_modalBottomSheetMenu();
|
||||
|
||||
@ -36,7 +36,7 @@ class _HomeMenuPageState extends State<HomeMenuPage> {
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0.0,
|
||||
title: Text(trans(context, "Menu"),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () {
|
||||
|
||||
@ -95,7 +95,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ListTile(
|
||||
title: Text(_product.attributes[attributeIndex].options[index],
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
trailing: (_tmpAttributeObj.isNotEmpty &&
|
||||
_tmpAttributeObj.containsKey(attributeIndex) &&
|
||||
_tmpAttributeObj[attributeIndex]["value"] ==
|
||||
@ -115,7 +115,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
},
|
||||
),
|
||||
flex: 1,
|
||||
));
|
||||
),);
|
||||
}
|
||||
|
||||
_itemAddToCart({CartLineItem cartLineItem}) {
|
||||
@ -142,11 +142,11 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ListTile(
|
||||
title: Text(_product.attributes[index].name,
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
subtitle: (_tmpAttributeObj.isNotEmpty &&
|
||||
_tmpAttributeObj.containsKey(index))
|
||||
? Text(_tmpAttributeObj[index]["value"],
|
||||
style: Theme.of(context).primaryTextTheme.body2)
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1)
|
||||
: Text(trans(context, "Select a") +
|
||||
" " +
|
||||
_product.attributes[index].name),
|
||||
@ -177,14 +177,14 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
findProductVariation() == null)
|
||||
? trans(context, "This variation is unavailable")
|
||||
: trans(context, "Choose your options"))),
|
||||
style: Theme.of(context).primaryTextTheme.subhead),
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1),
|
||||
Text(
|
||||
(findProductVariation() != null
|
||||
? findProductVariation().stockStatus != "instock"
|
||||
? trans(context, "Out of stock")
|
||||
: ""
|
||||
: ""),
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
),
|
||||
wsPrimaryButton(context, title: trans(context, "Add to cart"),
|
||||
action: () {
|
||||
@ -321,7 +321,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
child: Text(
|
||||
_product.name,
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.body2,
|
||||
Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.left,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
@ -338,7 +338,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
total: _product.price),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.display1
|
||||
.headline2
|
||||
.copyWith(
|
||||
fontSize: 20,
|
||||
),
|
||||
@ -378,7 +378,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
trans(context, "Full description"),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.body1
|
||||
.bodyText2
|
||||
.copyWith(fontSize: 14),
|
||||
textAlign: TextAlign.right,
|
||||
),
|
||||
@ -432,7 +432,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"Quantity",
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
@ -452,7 +452,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
Text(
|
||||
_quantityIndicator.toString(),
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.body2,
|
||||
Theme.of(context).primaryTextTheme.bodyText1,
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
@ -483,7 +483,7 @@ class _ProductDetailState extends State<ProductDetailPage> {
|
||||
_quantityIndicator)
|
||||
.toString()),
|
||||
style:
|
||||
Theme.of(context).primaryTextTheme.display1,
|
||||
Theme.of(context).primaryTextTheme.headline2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
|
||||
@ -9,8 +9,9 @@
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
//
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:label_storemax/helpers/data/order_wc.dart';
|
||||
import 'package:label_storemax/helpers/tools.dart';
|
||||
import 'package:label_storemax/labelconfig.dart';
|
||||
@ -55,7 +56,7 @@ stripePay(context,
|
||||
});
|
||||
|
||||
if (rsp == null) {
|
||||
showToastNetworkError();
|
||||
showEdgeAlertWith(context,title: "Oops!", desc: "Something went wrong, please try again.", icon: Icons.payment, style: EdgeAlertStyle.WARNING);
|
||||
state.reloadState(showLoader: false);
|
||||
return;
|
||||
}
|
||||
@ -100,4 +101,4 @@ stripePay(context,
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ Widget wsSecondaryButton(BuildContext context,
|
||||
child: RaisedButton(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Text(title,
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.center),
|
||||
onPressed: action,
|
||||
color: HexColor("#f6f6f9"),
|
||||
@ -44,7 +44,7 @@ Widget wsLinkButton(BuildContext context,
|
||||
child: MaterialButton(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Text(title,
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.left),
|
||||
onPressed: action,
|
||||
elevation: 0),
|
||||
|
||||
@ -27,7 +27,7 @@ Widget wsCartIcon(BuildContext context) {
|
||||
else
|
||||
return new Text(
|
||||
snapshot.data.length.toString(),
|
||||
style: Theme.of(context).primaryTextTheme.body2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1,
|
||||
textAlign: TextAlign.center,
|
||||
);
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ Widget wsMenuItem(BuildContext context,
|
||||
children: <Widget>[
|
||||
leading,
|
||||
Text(" " + title,
|
||||
style: Theme.of(context).primaryTextTheme.body1),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -37,7 +37,7 @@ Widget wsRow2Text(BuildContext context, {String text1, String text2}) {
|
||||
child: Text(text2,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.body2
|
||||
.bodyText1
|
||||
.copyWith(fontSize: 16, color: Colors.black87)),
|
||||
),
|
||||
flex: 3,
|
||||
@ -50,7 +50,7 @@ Widget wsNoResults(BuildContext context) {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Text(trans(context, "No results"),
|
||||
style: Theme.of(context).primaryTextTheme.body1),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -70,7 +70,7 @@ Widget wsCheckoutRow(BuildContext context,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
child: Text(heading,
|
||||
style: Theme.of(context).primaryTextTheme.body1),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2),
|
||||
padding: EdgeInsets.only(bottom: 8),
|
||||
),
|
||||
Row(
|
||||
@ -84,7 +84,7 @@ Widget wsCheckoutRow(BuildContext context,
|
||||
leadImage,
|
||||
Container(
|
||||
child: Text(leadTitle,
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false),
|
||||
@ -122,12 +122,12 @@ Widget wsTextEditingRow(BuildContext context,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
child: Text(heading, style: Theme.of(context).primaryTextTheme.body2),
|
||||
child: Text(heading, style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
padding: EdgeInsets.only(bottom: 2),
|
||||
),
|
||||
TextField(
|
||||
controller: controller,
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
keyboardType: keyboardType ?? TextInputType.text,
|
||||
autocorrect: false,
|
||||
autofocus: shouldAutoFocus ?? false,
|
||||
@ -146,13 +146,13 @@ Widget widgetCheckoutMeta(BuildContext context, {String title, String amount}) {
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Container(
|
||||
child: Text(title, style: Theme.of(context).primaryTextTheme.body1),
|
||||
child: Text(title, style: Theme.of(context).primaryTextTheme.bodyText2),
|
||||
),
|
||||
flex: 3,
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
child: Text(amount, style: Theme.of(context).primaryTextTheme.body2),
|
||||
child: Text(amount, style: Theme.of(context).primaryTextTheme.bodyText1),
|
||||
),
|
||||
flex: 3,
|
||||
)
|
||||
@ -198,7 +198,7 @@ Widget wsCardProductItem(BuildContext context, {int index, Product product}) {
|
||||
Flexible(
|
||||
child: Text(
|
||||
formatStringCurrency(total: product.price),
|
||||
style: Theme.of(context).textTheme.body2,
|
||||
style: Theme.of(context).textTheme.bodyText1,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
flex: 1,
|
||||
@ -206,7 +206,7 @@ Widget wsCardProductItem(BuildContext context, {int index, Product product}) {
|
||||
Expanded(
|
||||
child: Text(
|
||||
product.name,
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
),
|
||||
@ -244,7 +244,7 @@ void wsModalBottom(BuildContext context,
|
||||
Text(title,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.display1
|
||||
.headline2
|
||||
.copyWith(fontSize: 20),
|
||||
textAlign: TextAlign.left),
|
||||
bodyWidget,
|
||||
@ -414,13 +414,13 @@ Widget wsCardCartItem(BuildContext context,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
cartLineItem.name,
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 3,
|
||||
),
|
||||
(cartLineItem.variationOptions != null
|
||||
? Text(cartLineItem.variationOptions,
|
||||
style: Theme.of(context).primaryTextTheme.body2)
|
||||
style: Theme.of(context).primaryTextTheme.bodyText1)
|
||||
: Container()),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -432,11 +432,11 @@ Widget wsCardCartItem(BuildContext context,
|
||||
: trans(context, "In Stock")),
|
||||
style: (cartLineItem.stockStatus == "outofstock"
|
||||
? Theme.of(context).textTheme.caption
|
||||
: Theme.of(context).primaryTextTheme.body1)),
|
||||
: Theme.of(context).primaryTextTheme.bodyText2)),
|
||||
Text(
|
||||
formatDoubleCurrency(
|
||||
total: double.parse(cartLineItem.total)),
|
||||
style: Theme.of(context).primaryTextTheme.subhead,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle1,
|
||||
textAlign: TextAlign.center)
|
||||
],
|
||||
),
|
||||
|
||||
@ -7,28 +7,28 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.11"
|
||||
version: "2.0.13"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.2"
|
||||
version: "1.6.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
version: "2.4.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
version: "2.0.0"
|
||||
cached_network_image:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -42,14 +42,14 @@ packages:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
version: "1.1.3"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.14.11"
|
||||
version: "1.14.12"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -63,7 +63,7 @@ packages:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
version: "2.1.4"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -182,13 +182,6 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
html:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -216,7 +209,7 @@ packages:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.12"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -286,7 +279,7 @@ packages:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
version: "3.0.2"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -300,7 +293,7 @@ packages:
|
||||
name: quiver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
version: "2.1.3"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -340,7 +333,7 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.5"
|
||||
version: "1.7.0"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -396,7 +389,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.11"
|
||||
version: "0.2.15"
|
||||
transformer_page_view:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -431,7 +424,7 @@ packages:
|
||||
name: woosignal
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.0.6"
|
||||
woosignal_stripe:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -445,7 +438,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.5.0"
|
||||
version: "3.7.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -454,5 +447,5 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
sdks:
|
||||
dart: ">=2.5.0 <3.0.0"
|
||||
dart: ">=2.7.0 <3.0.0"
|
||||
flutter: ">=1.12.13+hotfix.5 <2.0.0"
|
||||
|
||||
@ -23,7 +23,7 @@ environment:
|
||||
sdk: ">=2.1.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
woosignal: ^1.0.3
|
||||
woosignal: ^1.0.6
|
||||
woosignal_stripe: ^0.0.4
|
||||
shared_preferences: ^0.5.6+3
|
||||
cached_network_image: ^2.0.0
|
||||
@ -37,7 +37,6 @@ dependencies:
|
||||
edge_alert: ^0.0.1
|
||||
status_alert: ^0.1.1
|
||||
math_expressions: ^2.0.0
|
||||
fluttertoast: ^4.0.1
|
||||
flutter_spinkit: ^4.1.2+1
|
||||
flutter_launcher_icons: ^0.7.4
|
||||
html: ^0.14.0+3
|
||||
@ -61,15 +60,8 @@ flutter_icons:
|
||||
dependency_overrides:
|
||||
intl:
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter.
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
@ -81,12 +73,6 @@ flutter:
|
||||
- assets/images/cart_empty.png
|
||||
- lang/en.json
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
fonts:
|
||||
- family: Overpass
|
||||
fonts:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user