v5.2.0
This commit is contained in:
parent
35d4e62b24
commit
877dabbb60
@ -23,14 +23,12 @@ APP_KEY="your app key"
|
||||
STRIPE_ACCOUNT="Stripe account key from WooSignal"
|
||||
# Stripe account key from WooSignal https://woosignal.com/dashboard
|
||||
|
||||
STRIPE_COUNTRY_CODE="GB"
|
||||
# Alpha-2 country code list: https://www.iban.com/country-codes
|
||||
|
||||
STRIPE_LIVE_MODE=null
|
||||
# Change to 'true' for live payments and update the "Environment for Stripe" here https://woosignal.com/dashboard
|
||||
|
||||
# *<! ------ RAYZORPAY (OPTIONAL) ------!>*
|
||||
|
||||
RAZORPAY_ID=""
|
||||
# Razorpay ID from https://razorpay.com
|
||||
|
||||
# *<! ------ PAYPAL (OPTIONAL) ------!>*
|
||||
|
||||
PAYPAL_ACCOUNT_EMAIL="mystore@business.com"
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
## [5.2.0] - 2020-10-11
|
||||
|
||||
* Migrate to Nylo 2.1.0
|
||||
* Use flutter_stripe library for payments
|
||||
* Remove RazorPay for build fails
|
||||
* Pubspec.yaml dependency updates
|
||||
* Android compileSdkVersion 30
|
||||
* Bug fixes
|
||||
|
||||
## [5.1.0] - 2020-07-19
|
||||
|
||||
* Add support for simplified Chinese locale (zh)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
### Label StoreMax - v5.1.0
|
||||
### Label StoreMax - v5.2.0
|
||||
|
||||
|
||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||
@ -44,7 +44,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe
|
||||
- Browse products, make orders, customer login (via WordPress)
|
||||
- Change app name, logo, customize default language, currency + more
|
||||
- Light and dark mode
|
||||
- Stripe, Cash On Delivery, RazorPay, PayPal
|
||||
- Stripe, Cash On Delivery, PayPal
|
||||
- Localized for en, es, pt, it, hi, fr, zh
|
||||
- Orders show as normal in WooCommerce
|
||||
|
||||
|
||||
@ -26,7 +26,19 @@ apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
exclude("META-INF/*.kotlin_module")
|
||||
}
|
||||
|
||||
compileSdkVersion 30
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
@ -39,8 +51,8 @@ android {
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.woosignal.android"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 29
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
multiDexEnabled true
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.woosignal.android
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.kotlin_version = '1.5.0'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
|
||||
@ -21,6 +21,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>$(PRODUCT_NAME) photo use</string>
|
||||
<string>You can take photos of your payment details.</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Zahlung storniert",
|
||||
"The payment has been cancelled": "Die Zahlung wurde storniert",
|
||||
"Must have": "Haben müssen",
|
||||
"Our selection of new items": "Unsere Auswahl an Neuheiten"
|
||||
"Our selection of new items": "Unsere Auswahl an Neuheiten",
|
||||
"Register": "Registrieren"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Payment Cancelled",
|
||||
"The payment has been cancelled": "The payment has been cancelled",
|
||||
"Must have": "Must have",
|
||||
"Our selection of new items": "Our selection of new items"
|
||||
"Our selection of new items": "Our selection of new items",
|
||||
"Register": "Register"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Pago cancelado",
|
||||
"The payment has been cancelled": "El pago ha sido cancelado",
|
||||
"Must have": "Debe tener",
|
||||
"Our selection of new items": "Nuestra selección de novedades"
|
||||
"Our selection of new items": "Nuestra selección de novedades",
|
||||
"Register": "Registrarse"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Paiement annulé",
|
||||
"The payment has been cancelled": "Le paiement a été annulé",
|
||||
"Must have": "Doit avoir",
|
||||
"Our selection of new items": "Notre sélection de nouveautés"
|
||||
"Our selection of new items": "Notre sélection de nouveautés",
|
||||
"Register": "S'inscrire"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "bhugataan radd kiya gaya",
|
||||
"The payment has been cancelled": "bhugataan radd kar diya gaya hai",
|
||||
"Must have": "hona aavashyak hai",
|
||||
"Our selection of new items": "naee vastuon ka hamaara chayan"
|
||||
"Our selection of new items": "naee vastuon ka hamaara chayan",
|
||||
"Register": "rajistar karen"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Pagamento annullato",
|
||||
"The payment has been cancelled": "Il pagamento è stato annullato",
|
||||
"Must have": "Deve avere",
|
||||
"Our selection of new items": "La nostra selezione di nuovi articoli"
|
||||
"Our selection of new items": "La nostra selezione di nuovi articoli",
|
||||
"Register": "Registrati"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "Pagamento Cancelado",
|
||||
"The payment has been cancelled": "O pagamento foi cancelado",
|
||||
"Must have": "Deve ter",
|
||||
"Our selection of new items": "Nossa seleção de novos itens"
|
||||
"Our selection of new items": "Nossa seleção de novos itens",
|
||||
"Register": "Registro"
|
||||
}
|
||||
@ -184,5 +184,6 @@
|
||||
"Payment Cancelled": "付款已取消",
|
||||
"The payment has been cancelled": "付款已取消",
|
||||
"Must have": "一定有",
|
||||
"Our selection of new items": "我们精选的新品"
|
||||
"Our selection of new items": "我们精选的新品",
|
||||
"Register": "登记"
|
||||
}
|
||||
@ -46,7 +46,7 @@ payPalPay(context,
|
||||
state.reloadState(showLoader: false);
|
||||
return;
|
||||
}
|
||||
|
||||
print(value);
|
||||
state.reloadState(showLoader: true);
|
||||
if (value.containsKey("status") && value["status"] == "success") {
|
||||
OrderWC orderWC =
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
//
|
||||
// LabelCore
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. 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/widgets.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:razorpay_flutter/razorpay_flutter.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
|
||||
razorPay(context,
|
||||
{@required CheckoutConfirmationPageState state, TaxRate taxRate}) async {
|
||||
Razorpay razorPay = Razorpay();
|
||||
|
||||
razorPay.on(Razorpay.EVENT_PAYMENT_SUCCESS,
|
||||
(PaymentSuccessResponse response) async {
|
||||
OrderWC orderWC = await buildOrderWC(taxRate: taxRate);
|
||||
|
||||
Order order = await appWooSignal((api) => api.createOrder(orderWC));
|
||||
|
||||
if (order != null) {
|
||||
razorPay.clear();
|
||||
Navigator.pushNamed(context, "/checkout-status", arguments: order);
|
||||
} else {
|
||||
showToastNotification(context,
|
||||
title: trans(context, "Error"),
|
||||
description: trans(context, "Something went wrong, please contact our store"),
|
||||
style: ToastNotificationStyleType.WARNING);
|
||||
razorPay.clear();
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
});
|
||||
|
||||
razorPay.on(Razorpay.EVENT_PAYMENT_ERROR, (PaymentFailureResponse response) {
|
||||
showToastNotification(context,
|
||||
title: trans(context, "Error"),
|
||||
description: response.message,
|
||||
style: ToastNotificationStyleType.WARNING);
|
||||
razorPay.clear();
|
||||
state.reloadState(showLoader: false);
|
||||
});
|
||||
|
||||
razorPay.on(Razorpay.EVENT_EXTERNAL_WALLET,
|
||||
(ExternalWalletResponse response) {
|
||||
showToastNotification(context,
|
||||
title: trans(context, "Error"),
|
||||
description: trans(context, "Not supported, try a card payment"),
|
||||
style: ToastNotificationStyleType.WARNING);
|
||||
razorPay.clear();
|
||||
state.reloadState(showLoader: false);
|
||||
});
|
||||
|
||||
// CHECKOUT HELPER
|
||||
await checkout(taxRate, (total, billingDetails, cart) async {
|
||||
var options = {
|
||||
'key': getEnv('RAZORPAY_ID'),
|
||||
'amount': (parseWcPrice(total) * 100).toInt(),
|
||||
'name': AppHelper.instance.appConfig.appName,
|
||||
'description': await cart.cartShortDesc(),
|
||||
'prefill': {
|
||||
"name": [
|
||||
billingDetails.billingAddress.firstName,
|
||||
billingDetails.billingAddress.lastName
|
||||
].where((t) => t != null || t != "").toList().join(" "),
|
||||
"method": "card",
|
||||
'email': billingDetails.billingAddress.emailAddress
|
||||
}
|
||||
};
|
||||
|
||||
state.reloadState(showLoader: true);
|
||||
|
||||
razorPay.open(options);
|
||||
});
|
||||
}
|
||||
@ -17,33 +17,29 @@ import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/data/order_wc.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/resources/pages/checkout_confirmation.dart';
|
||||
import 'package:flutter_stripe/flutter_stripe.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:woosignal/models/payload/order_wc.dart';
|
||||
import 'package:woosignal/models/response/order.dart';
|
||||
import 'package:woosignal/models/response/tax_rate.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:woosignal_stripe/woosignal_stripe.dart';
|
||||
|
||||
stripePay(context,
|
||||
{@required CheckoutConfirmationPageState state, TaxRate taxRate}) async {
|
||||
try {
|
||||
WooSignalApp wooSignalApp = AppHelper.instance.appConfig;
|
||||
|
||||
bool liveMode = getEnv('STRIPE_LIVE_MODE') == null
|
||||
? wooSignalApp.stripeLiveMode
|
||||
? !wooSignalApp.stripeLiveMode
|
||||
: getEnv('STRIPE_LIVE_MODE', defaultValue: false);
|
||||
|
||||
// CONFIGURE STRIPE
|
||||
FlutterStripePayment.setStripeSettings(
|
||||
stripeAccount: getEnv('STRIPE_ACCOUNT'), liveMode: liveMode);
|
||||
Stripe.stripeAccountId = getEnv('STRIPE_ACCOUNT');
|
||||
Stripe.publishableKey = liveMode ? "pk_live_IyS4Vt86L49jITSfaUShumzi" : "pk_test_0jMmpBntJ6UkizPkfiB8ZJxH"; // Don't change this value
|
||||
|
||||
PaymentResponse paymentResponse =
|
||||
await FlutterStripePayment.addPaymentMethod();
|
||||
|
||||
// CHECK STATUS FROM STRIPE
|
||||
if (paymentResponse.status == PaymentResponseStatus.succeeded) {
|
||||
state.reloadState(showLoader: true);
|
||||
|
||||
// CHECKOUT HELPER
|
||||
try {
|
||||
dynamic rsp = {};
|
||||
// // CHECKOUT HELPER
|
||||
await checkout(taxRate, (total, billingDetails, cart) async {
|
||||
Map<String, dynamic> address = {
|
||||
"name": billingDetails.billingAddress.nameFull(),
|
||||
@ -56,12 +52,14 @@ stripePay(context,
|
||||
|
||||
String cartShortDesc = await cart.cartShortDesc();
|
||||
|
||||
dynamic rsp = await appWooSignal((api) => api.stripePaymentIntent(
|
||||
rsp = await appWooSignal((api) =>
|
||||
api.stripePaymentIntent(
|
||||
amount: total,
|
||||
email: billingDetails.billingAddress.emailAddress,
|
||||
desc: cartShortDesc,
|
||||
shipping: address,
|
||||
));
|
||||
});
|
||||
|
||||
if (rsp == null) {
|
||||
showToastNotification(context,
|
||||
@ -74,20 +72,24 @@ stripePay(context,
|
||||
return;
|
||||
}
|
||||
|
||||
String clientSecret = rsp["client_secret"];
|
||||
var intentResponse = await FlutterStripePayment.confirmPaymentIntent(
|
||||
clientSecret,
|
||||
paymentResponse.paymentMethodId,
|
||||
(double.parse(total) * 100),
|
||||
);
|
||||
Stripe.instance.initPaymentSheet(paymentSheetParameters: SetupPaymentSheetParameters(
|
||||
applePay: false,
|
||||
googlePay: false,
|
||||
style: Theme.of(state.context).brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark,
|
||||
testEnv: liveMode,
|
||||
merchantCountryCode: getEnv('STRIPE_COUNTRY_CODE', defaultValue: 'GB'),
|
||||
merchantDisplayName: getEnv('APP_NAME'),
|
||||
paymentIntentClientSecret: rsp['client_secret'],
|
||||
));
|
||||
|
||||
await Stripe.instance.presentPaymentSheet();
|
||||
|
||||
state.reloadState(showLoader: true);
|
||||
|
||||
if (intentResponse.status == PaymentResponseStatus.succeeded) {
|
||||
OrderWC orderWC = await buildOrderWC(taxRate: taxRate);
|
||||
Order order = await appWooSignal((api) => api.createOrder(orderWC));
|
||||
|
||||
if (order != null) {
|
||||
Navigator.pushNamed(context, "/checkout-status", arguments: order);
|
||||
} else {
|
||||
if (order == null) {
|
||||
showToastNotification(
|
||||
context,
|
||||
title: trans(context, "Error"),
|
||||
@ -95,25 +97,25 @@ stripePay(context,
|
||||
"Something went wrong, please contact our store"),
|
||||
);
|
||||
state.reloadState(showLoader: false);
|
||||
return;
|
||||
}
|
||||
} else if (intentResponse.status == PaymentResponseStatus.failed) {
|
||||
if (getEnv('APP_DEBUG', defaultValue: true)) {
|
||||
NyLogger.error(intentResponse.errorMessage);
|
||||
|
||||
Navigator.pushNamed(context, "/checkout-status", arguments: order);
|
||||
|
||||
}
|
||||
on StripeException catch(e) {
|
||||
showToastNotification(
|
||||
context,
|
||||
title: trans(context, "Error"),
|
||||
description: intentResponse.errorMessage,
|
||||
title: trans(context, "Oops!"),
|
||||
description: e.error.localizedMessage,
|
||||
icon: Icons.payment,
|
||||
style: ToastNotificationStyleType.WARNING,
|
||||
);
|
||||
state.reloadState(showLoader: false);
|
||||
} else {
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
state.reloadState(showLoader: false);
|
||||
}
|
||||
} catch (ex) {
|
||||
if (getEnv('APP_DEBUG', defaultValue: true)) {
|
||||
NyLogger.error(ex.toString());
|
||||
}
|
||||
showToastNotification(
|
||||
context,
|
||||
title: trans(context, "Oops!"),
|
||||
|
||||
@ -1,25 +1,13 @@
|
||||
// Label StoreMax
|
||||
//
|
||||
// Created by Anthony Gordon.
|
||||
// 2021, WooSignal Ltd. 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:adaptive_theme/adaptive_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:nylo_support/localization/app_localization.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppBuild extends StatelessWidget {
|
||||
final String initialRoute;
|
||||
Brightness defaultBrightness;
|
||||
String initialRoute;
|
||||
ThemeData themeData;
|
||||
ThemeData darkTheme;
|
||||
ThemeData lightTheme;
|
||||
Locale locale;
|
||||
String title;
|
||||
bool debugShowCheckedModeBanner;
|
||||
@ -40,16 +28,15 @@ class AppBuild extends StatelessWidget {
|
||||
InitialRouteListFactory onGenerateInitialRoutes;
|
||||
GlobalKey<NavigatorState> navigatorKey;
|
||||
|
||||
final Route<dynamic> Function(RouteSettings settings) onGenerateRoute;
|
||||
Route<dynamic> Function(RouteSettings settings) onGenerateRoute;
|
||||
|
||||
AppBuild({
|
||||
Key key,
|
||||
this.initialRoute,
|
||||
this.title,
|
||||
this.defaultBrightness,
|
||||
this.locale,
|
||||
@required this.locale,
|
||||
this.themeData,
|
||||
this.onGenerateRoute,
|
||||
@required this.onGenerateRoute,
|
||||
this.navigatorKey,
|
||||
this.onGenerateInitialRoutes,
|
||||
this.onUnknownRoute,
|
||||
@ -57,6 +44,7 @@ class AppBuild extends StatelessWidget {
|
||||
this.builder,
|
||||
this.onGenerateTitle,
|
||||
this.color,
|
||||
this.lightTheme,
|
||||
this.darkTheme,
|
||||
this.themeMode = ThemeMode.system,
|
||||
this.supportedLocales = const <Locale>[Locale('en', 'US')],
|
||||
@ -72,11 +60,20 @@ class AppBuild extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AdaptiveTheme(
|
||||
light: themeData,
|
||||
dark: darkTheme,
|
||||
initial: AdaptiveThemeMode.light,
|
||||
builder: (theme, darkTheme) => ValueListenableBuilder(
|
||||
return ThemeProvider(
|
||||
themes: [
|
||||
AppTheme(
|
||||
id: "default_light_theme",
|
||||
data: this.lightTheme ?? ThemeData.fallback(),
|
||||
description: 'Light theme'),
|
||||
AppTheme(
|
||||
id: "default_dark_theme",
|
||||
data: this.darkTheme ?? ThemeData.fallback(),
|
||||
description: 'Dark theme'),
|
||||
],
|
||||
child: ThemeConsumer(
|
||||
child: Builder(
|
||||
builder: (themeContext) => ValueListenableBuilder(
|
||||
valueListenable: ValueNotifier(locale),
|
||||
builder: (context, Locale locale, _) => MaterialApp(
|
||||
navigatorKey: navigatorKey,
|
||||
@ -101,7 +98,7 @@ class AppBuild extends StatelessWidget {
|
||||
initialRoute: initialRoute,
|
||||
onGenerateRoute: this.onGenerateRoute,
|
||||
locale: locale,
|
||||
theme: theme,
|
||||
theme: themeData ?? ThemeProvider.themeOf(themeContext).data,
|
||||
localizationsDelegates: [
|
||||
AppLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@ -113,6 +110,8 @@ class AppBuild extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
import 'package:flutter_app/app/providers/cash_on_delivery.dart';
|
||||
import 'package:flutter_app/app/providers/paypal_pay.dart';
|
||||
import 'package:flutter_app/app/providers/razor_pay.dart';
|
||||
import 'package:flutter_app/app/providers/stripe_pay.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
|
||||
@ -14,8 +13,8 @@ import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const app_payment_gateways = ["Stripe"];
|
||||
// Available: "Stripe", "CashOnDelivery", "RazorPay", "PayPal"
|
||||
const app_payment_gateways = ["Stripe", "CashOnDelivery", "PayPal"];
|
||||
// Available: "Stripe", "CashOnDelivery", "PayPal"
|
||||
// e.g. app_payment_gateways = ["Stripe", "CashOnDelivery"]; will only use Stripe and Cash on Delivery.
|
||||
|
||||
List<PaymentType> paymentTypeList = [
|
||||
@ -35,14 +34,6 @@ List<PaymentType> paymentTypeList = [
|
||||
pay: cashOnDeliveryPay,
|
||||
),
|
||||
|
||||
addPayment(
|
||||
id: 3,
|
||||
name: "RazorPay",
|
||||
desc: "Debit or Credit Card",
|
||||
assetImage: "razorpay.png",
|
||||
pay: razorPay,
|
||||
),
|
||||
|
||||
addPayment(
|
||||
id: 4,
|
||||
name: "PayPal",
|
||||
|
||||
@ -1,62 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/dark_theme_colors.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/light_theme_colors.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/theme_styles.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| APP THEME
|
||||
| Theme Font
|
||||
|
|
||||
| Change the font and colors for your themes.
|
||||
| Uses Google Fonts - https://pub.dev/packages/google_fonts
|
||||
|
|
||||
| e.g. updating the font from "montserrat" to "lato"
|
||||
| before: final TextStyle appThemeFont = GoogleFonts.montserrat();
|
||||
| after: final TextStyle appThemeFont = GoogleFonts.lato();
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Theme main font
|
||||
final TextStyle appThemeFont = GoogleFonts.overpass();
|
||||
|
||||
// Theme colors
|
||||
class AppColors {
|
||||
// MAIN
|
||||
Color _mainLightColor = Color(0xFF232c33);
|
||||
Color _mainDarkColor = Color(0xFFFAFAFA);
|
||||
// e.g. custom font in pubspec.yaml - https://flutter.dev/docs/cookbook/design/fonts
|
||||
// final TextStyle appThemeFont = TextStyle(fontFamily: "ZenTokyoZoo");
|
||||
|
||||
// SECONDARY
|
||||
Color _secondLightColor = Color(0xFF232c33);
|
||||
Color _secondDarkColor = Color(0xFFF1F1F1);
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme Colors
|
||||
|
|
||||
| Customize your theme's light and dark themes: /lib/config/styles/
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// ACCENT
|
||||
Color _accentLightColor = Color(0xFF465f81);
|
||||
Color _accentDarkColor = Color(0xFF4a4a4a);
|
||||
class NyColors {
|
||||
// Light Colors
|
||||
static LightThemeColors light = LightThemeColors();
|
||||
|
||||
// SCAFFOLD
|
||||
Color _scaffoldDarkColor = Color(0xFF2C2C2C);
|
||||
Color _scaffoldLightColor = Color(0xFFFAFAFA);
|
||||
}
|
||||
// Dark Colors
|
||||
static DarkThemeColors dark = DarkThemeColors();
|
||||
|
||||
class AppTheme extends AppColors {
|
||||
Color mainColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _mainLightColor.withOpacity(opacity)
|
||||
: _mainDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color secondColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _secondLightColor.withOpacity(opacity)
|
||||
: _secondDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color accentColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _accentLightColor.withOpacity(opacity)
|
||||
: _accentDarkColor.withOpacity(opacity));
|
||||
}
|
||||
|
||||
Color scaffoldColor(
|
||||
{double opacity = 1, Brightness brightness = Brightness.light}) {
|
||||
return (brightness == Brightness.light
|
||||
? _scaffoldLightColor.withOpacity(opacity)
|
||||
: _scaffoldDarkColor.withOpacity(opacity));
|
||||
/// helper to find correct theme from the [context].
|
||||
static BaseStyles of(BuildContext context) {
|
||||
return ((Theme.of(context).brightness == Brightness.dark) ? dark : light);
|
||||
}
|
||||
}
|
||||
@ -5,22 +5,17 @@ import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/config/app_locale.dart';
|
||||
import 'package:flutter_app/resources/themes/dark_theme.dart';
|
||||
import 'package:flutter_app/resources/themes/default_theme.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/themes/light_theme.dart';
|
||||
import 'package:flutter_app/routes/router.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:nylo_support/nylo.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'package:nylo_framework/theme/helper/theme_helper.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
import 'package:wp_json_api/wp_json_api.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
AppTheme appTheme = AppTheme();
|
||||
|
||||
Nylo nylo =
|
||||
await initNylo(theme: defaultTheme(appTheme), router: buildRouter());
|
||||
Nylo nylo = await Nylo.init(router: appRouter());
|
||||
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
@ -43,21 +38,19 @@ void main() async {
|
||||
);
|
||||
}
|
||||
|
||||
if (locale == null) {
|
||||
if (wooSignalApp.locale != null) {
|
||||
if (locale == null && wooSignalApp.locale != null) {
|
||||
locale = Locale(wooSignalApp.locale);
|
||||
} else {
|
||||
locale = Locale(getEnv('DEFAULT_LOCALE', defaultValue: 'en'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
runApp(
|
||||
AppBuild(
|
||||
navigatorKey: nylo.router.navigatorKey,
|
||||
onGenerateRoute: nylo.router.generator(),
|
||||
themeData: CurrentTheme.instance.theme,
|
||||
darkTheme: darkTheme(appTheme),
|
||||
lightTheme: lightTheme(),
|
||||
darkTheme: darkTheme(),
|
||||
locale: locale,
|
||||
initialRoute: initialRoute,
|
||||
supportedLocales: app_locales_supported,
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
@ -33,8 +33,6 @@ class AccountBillingDetailsPage extends StatefulWidget {
|
||||
class _AccountBillingDetailsPageState extends State<AccountBillingDetailsPage> {
|
||||
_AccountBillingDetailsPageState();
|
||||
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
// BILLING TEXT CONTROLLERS
|
||||
TextEditingController _txtShippingFirstName = TextEditingController(),
|
||||
_txtShippingLastName = TextEditingController(),
|
||||
@ -75,14 +73,12 @@ class _AccountBillingDetailsPageState extends State<AccountBillingDetailsPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Billing Details"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Billing Details")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -165,13 +161,12 @@ class _AccountBillingDetailsPageState extends State<AccountBillingDetailsPage> {
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveTheme.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(
|
||||
brightness: Brightness.dark),
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? NyColors.light.background
|
||||
: NyColors.dark.primaryAccent,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveTheme.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
),
|
||||
|
||||
@ -8,12 +8,13 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:bubble_tab_indicator/bubble_tab_indicator.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
@ -100,10 +101,9 @@ class _AccountDetailPageState extends State<AccountDetailPage>
|
||||
new Tab(text: trans(context, "Orders")),
|
||||
new Tab(text: trans(context, "Settings")),
|
||||
];
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: widget.showLeadingBackButton ? Container(
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
@ -112,8 +112,7 @@ class _AccountDetailPageState extends State<AccountDetailPage>
|
||||
margin: EdgeInsets.only(left: 0),
|
||||
) : Container(),
|
||||
title: Text(
|
||||
trans(context, "Account"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Account")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -206,9 +205,8 @@ class _AccountDetailPageState extends State<AccountDetailPage>
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
boxShadow: adaptiveTheme.isLight ? wsBoxShadow() : null,
|
||||
color:
|
||||
adaptiveTheme.isLight ? Colors.white : Colors.white70,
|
||||
boxShadow: (Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
),
|
||||
),
|
||||
Expanded(child: _activeBody),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/user.dart';
|
||||
@ -27,7 +27,8 @@ import 'package:wp_json_api/models/responses/wp_user_login_response.dart';
|
||||
import 'package:wp_json_api/wp_json_api.dart';
|
||||
|
||||
class AccountLandingPage extends StatefulWidget {
|
||||
AccountLandingPage();
|
||||
final bool showBackButton;
|
||||
AccountLandingPage({this.showBackButton = true});
|
||||
|
||||
@override
|
||||
_AccountLandingPageState createState() => _AccountLandingPageState();
|
||||
@ -37,7 +38,6 @@ class _AccountLandingPageState extends State<AccountLandingPage> {
|
||||
bool _hasTappedLogin = false;
|
||||
TextEditingController _tfEmailController = TextEditingController(),
|
||||
_tfPasswordController = TextEditingController();
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -46,7 +46,6 @@ class _AccountLandingPageState extends State<AccountLandingPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: SafeArea(
|
||||
@ -79,10 +78,8 @@ class _AccountLandingPageState extends State<AccountLandingPage> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
boxShadow: adaptiveTheme.isLight ? wsBoxShadow() : null,
|
||||
color: adaptiveTheme.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(brightness: Brightness.dark),
|
||||
boxShadow: (Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(vertical: 18, horizontal: 8),
|
||||
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||
@ -117,7 +114,7 @@ class _AccountLandingPageState extends State<AccountLandingPage> {
|
||||
Icon(
|
||||
Icons.account_circle,
|
||||
color:
|
||||
adaptiveTheme.isLight ? Colors.black38 : Colors.white70,
|
||||
(Theme.of(context).brightness == Brightness.light) ? Colors.black38 : Colors.white70,
|
||||
),
|
||||
Padding(
|
||||
child: Text(
|
||||
@ -143,12 +140,17 @@ class _AccountLandingPageState extends State<AccountLandingPage> {
|
||||
"No URL found for \"forgot password\".\nAdd your forgot password URL here https://woosignal.com/dashboard/apps");
|
||||
}
|
||||
}),
|
||||
widget.showBackButton ? Column(
|
||||
children: [
|
||||
Divider(),
|
||||
LinkButton(
|
||||
title: trans(context, "Back"),
|
||||
action: () => Navigator.pop(context),
|
||||
),
|
||||
],
|
||||
) : Padding(padding: EdgeInsets.only(bottom: 20),)
|
||||
|
||||
].where((element) => element != null).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/controllers/account_order_detail_controller.dart';
|
||||
@ -44,10 +44,9 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: Container(
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
@ -56,8 +55,7 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
|
||||
margin: EdgeInsets.only(left: 0),
|
||||
),
|
||||
title: Text(
|
||||
"${trans(context, "Order").capitalize()} #${_orderId.toString()}",
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
"${trans(context, "Order").capitalize()} #${_orderId.toString()}"
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -110,8 +108,8 @@ class _AccountOrderDetailPageState extends NyState<AccountOrderDetailPage> {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
color: adaptiveThemeMode.isLight
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? Colors.white
|
||||
: Color(0xFF2C2C2C),
|
||||
),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/user.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
@ -54,17 +54,15 @@ class _AccountRegistrationPageState extends State<AccountRegistrationPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
title: Text(
|
||||
"Register",
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Register")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -131,7 +129,7 @@ class _AccountRegistrationPageState extends State<AccountRegistrationPage> {
|
||||
style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
],
|
||||
style: TextStyle(
|
||||
color: adaptiveTheme.isLight
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? Colors.black45
|
||||
: Colors.white70),
|
||||
),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
@ -34,8 +34,6 @@ class _AccountShippingDetailsPageState
|
||||
extends State<AccountShippingDetailsPage> {
|
||||
_AccountShippingDetailsPageState();
|
||||
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
// BILLING TEXT CONTROLLERS
|
||||
TextEditingController _txtShippingFirstName = TextEditingController(),
|
||||
_txtShippingLastName = TextEditingController(),
|
||||
@ -91,14 +89,12 @@ class _AccountShippingDetailsPageState
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Shipping Details"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Shipping Details")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -182,13 +178,12 @@ class _AccountShippingDetailsPageState
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveTheme.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(
|
||||
brightness: Brightness.dark),
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? NyColors.light.background
|
||||
: NyColors.dark.primaryAccent,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveTheme.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
),
|
||||
|
||||
@ -83,15 +83,13 @@ class _BrowseCategoryPageState extends NyState<BrowseCategoryPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Browse"),
|
||||
style: Theme.of(context).textTheme.subtitle1),
|
||||
Text(parseHtmlString(productCategory.name),
|
||||
style: Theme.of(context).textTheme.headline6)
|
||||
Text(parseHtmlString(productCategory.name))
|
||||
],
|
||||
),
|
||||
centerTitle: true,
|
||||
|
||||
@ -77,15 +77,13 @@ class _BrowseSearchState extends NyState<BrowseSearchPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(trans(context, "Search results for"),
|
||||
style: Theme.of(context).textTheme.subtitle1),
|
||||
Text("\"" + _search + "\"",
|
||||
style: Theme.of(context).textTheme.headline6)
|
||||
Text("\"" + _search + "\"")
|
||||
],
|
||||
),
|
||||
centerTitle: true,
|
||||
|
||||
@ -187,9 +187,7 @@ class _CartPageState extends State<CartPage> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
trans(context, "Shopping Cart"),
|
||||
style: Theme.of(context).appBarTheme.textTheme.headline6,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme,
|
||||
elevation: 1,
|
||||
actions: <Widget>[
|
||||
InkWell(
|
||||
@ -199,7 +197,7 @@ class _CartPageState extends State<CartPage> {
|
||||
child: Padding(
|
||||
child: Text(
|
||||
trans(context, "Clear Cart"),
|
||||
style: Theme.of(context).textTheme.bodyText1,
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
),
|
||||
padding: EdgeInsets.only(right: 8),
|
||||
),
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
@ -16,6 +15,7 @@ import 'package:flutter_app/app/models/customer_address.dart';
|
||||
import 'package:flutter_app/app/models/customer_country.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/buttons.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
@ -178,16 +178,10 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Checkout"),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.subtitle1
|
||||
.copyWith(fontWeight: FontWeight.bold),
|
||||
trans(context, "Checkout")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -203,12 +197,10 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: Colors.white54,
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
margin: EdgeInsets.only(top: 5, bottom: 5),
|
||||
child: Column(
|
||||
@ -217,7 +209,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: adaptiveThemeMode.isLight
|
||||
boxShadow: (Theme.of(context).brightness == Brightness.light)
|
||||
? wsBoxShadow(blurRadius: 10)
|
||||
: null,
|
||||
color: Colors.transparent,
|
||||
@ -258,13 +250,13 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
(CheckoutSession.getInstance.paymentType != null
|
||||
? wsCheckoutRow(context,
|
||||
heading: trans(context, "Payment method"),
|
||||
leadImage: Image.asset(
|
||||
leadImage: Container(
|
||||
color: Colors.white,
|
||||
child: Image.asset(
|
||||
getImageAsset(CheckoutSession
|
||||
.getInstance.paymentType.assetImage),
|
||||
width: 70,
|
||||
color: adaptiveThemeMode.isLight
|
||||
? null
|
||||
: Colors.white,
|
||||
),
|
||||
),
|
||||
leadTitle: CheckoutSession
|
||||
.getInstance.paymentType.desc,
|
||||
@ -386,7 +378,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_wooSignalApp.disableShipping == 1 &&
|
||||
if (_wooSignalApp.disableShipping == 0 &&
|
||||
CheckoutSession.getInstance.shippingType == null) {
|
||||
showToastNotification(
|
||||
context,
|
||||
@ -411,7 +403,7 @@ class CheckoutConfirmationPageState extends State<CheckoutConfirmationPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_wooSignalApp.disableShipping != 1 &&
|
||||
if (_wooSignalApp.disableShipping == 0 &&
|
||||
CheckoutSession.getInstance.shippingType?.minimumValue != null) {
|
||||
String total = await Cart.getInstance.getTotal();
|
||||
if (total == null) {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/billing_details.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
@ -34,7 +34,6 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
|
||||
bool _hasDifferentShippingAddress = false, valRememberDetails = true;
|
||||
int activeTabIndex = 0;
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
// TEXT CONTROLLERS
|
||||
TextEditingController
|
||||
@ -158,14 +157,11 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Billing & Shipping Details"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
@ -229,13 +225,10 @@ class _CheckoutDetailsPageState extends State<CheckoutDetailsPage> {
|
||||
fit: FlexFit.tight,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(
|
||||
brightness: Brightness.dark),
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 8, right: 8, top: 8),
|
||||
child: (activeTab ?? tabBillingDetails()),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/payment_type.dart';
|
||||
@ -29,8 +29,6 @@ class CheckoutPaymentTypePage extends StatefulWidget {
|
||||
class _CheckoutPaymentTypePageState extends State<CheckoutPaymentTypePage> {
|
||||
_CheckoutPaymentTypePageState();
|
||||
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@ -44,14 +42,12 @@ class _CheckoutPaymentTypePageState extends State<CheckoutPaymentTypePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Payment Method"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Payment Method")
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
@ -91,14 +87,18 @@ class _CheckoutPaymentTypePageState extends State<CheckoutPaymentTypePage> {
|
||||
left: 8,
|
||||
right: 8,
|
||||
),
|
||||
leading: Image.asset(
|
||||
leading: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white
|
||||
),
|
||||
padding: EdgeInsets.all(4),
|
||||
child: Image.asset(
|
||||
getImageAsset(paymentType.assetImage),
|
||||
width: 60,
|
||||
color: adaptiveThemeMode.isLight
|
||||
? null
|
||||
: Colors.white,
|
||||
fit: BoxFit.contain,
|
||||
alignment: Alignment.center),
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
),
|
||||
title: Text(paymentType.desc,
|
||||
style:
|
||||
Theme.of(context).textTheme.subtitle1),
|
||||
@ -127,12 +127,10 @@ class _CheckoutPaymentTypePageState extends State<CheckoutPaymentTypePage> {
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(brightness: Brightness.dark),
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
@ -35,7 +35,6 @@ class CheckoutShippingTypePage extends StatefulWidget {
|
||||
class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
|
||||
_CheckoutShippingTypePageState();
|
||||
|
||||
AppTheme _appTheme = AppTheme();
|
||||
bool _isShippingSupported = true, _isLoading = true;
|
||||
List<Map<String, dynamic>> _wsShippingOptions = [];
|
||||
WSShipping _shipping;
|
||||
@ -235,14 +234,11 @@ class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Shipping Methods"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Shipping Methods")
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
@ -261,7 +257,7 @@ class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
|
||||
child: Image.asset(
|
||||
getImageAsset('shipping_icon.png'),
|
||||
height: 100,
|
||||
color: adaptiveThemeMode.isLight ? null : Colors.white,
|
||||
color: (Theme.of(context).brightness == Brightness.light) ? null : Colors.white,
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
),
|
||||
@ -395,12 +391,10 @@ class _CheckoutShippingTypePageState extends State<CheckoutShippingTypePage> {
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: _appTheme.accentColor(brightness: Brightness.dark),
|
||||
color: NyColors.of(context).backgroundContainer,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/app/controllers/checkout_status_controller.dart';
|
||||
import 'package:flutter_app/app/models/cart.dart';
|
||||
@ -43,7 +43,7 @@ class _CheckoutStatusState extends NyState<CheckoutStatusPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0.0,
|
||||
@ -94,7 +94,7 @@ class _CheckoutStatusState extends NyState<CheckoutStatusPage> {
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Colors.black12, width: 1.0),
|
||||
),
|
||||
color: adaptiveThemeMode.isLight ? Colors.white : null),
|
||||
color: (Theme.of(context).brightness == Brightness.light) ? Colors.white : null),
|
||||
padding: EdgeInsets.only(bottom: 20),
|
||||
),
|
||||
Container(
|
||||
@ -164,7 +164,7 @@ class _CheckoutStatusState extends NyState<CheckoutStatusPage> {
|
||||
padding: EdgeInsets.all(16),
|
||||
margin: EdgeInsets.all(8),
|
||||
color:
|
||||
adaptiveThemeMode.isLight ? Colors.white : null);
|
||||
(Theme.of(context).brightness == Brightness.light) ? Colors.white : null);
|
||||
}),
|
||||
),
|
||||
Align(
|
||||
|
||||
@ -44,10 +44,8 @@ class _CustomerCountriesPageState extends State<CustomerCountriesPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
trans(context, "Select a country"),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
trans(context, "Select a country")
|
||||
),
|
||||
centerTitle: true,
|
||||
),
|
||||
|
||||
@ -47,7 +47,6 @@ class _HomeSearchPageState extends State<HomeSearchPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: StoreLogo(height: 55),
|
||||
centerTitle: true,
|
||||
),
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/painting.dart';
|
||||
import 'package:flutter_app/app/controllers/product_detail_controller.dart';
|
||||
@ -42,7 +42,6 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
int _quantityIndicator = 1;
|
||||
List<WS.ProductVariation> _productVariations = [];
|
||||
Map<int, dynamic> _tmpAttributeObj = {};
|
||||
AppTheme _appTheme = AppTheme();
|
||||
|
||||
@override
|
||||
widgetDidLoad() async {
|
||||
@ -283,14 +282,12 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
actions: <Widget>[
|
||||
CartIconWidget(),
|
||||
],
|
||||
title: StoreLogo(height: 55, showBgWhite: !adaptiveTheme.isLight),
|
||||
title: StoreLogo(height: 55, showBgWhite: (Theme.of(context).brightness == Brightness.dark)),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: SafeArea(
|
||||
@ -309,7 +306,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
child: Swiper(
|
||||
itemBuilder: (BuildContext context, int index) =>
|
||||
CachedImageWidget(
|
||||
image: _product.images[index].src,
|
||||
image: _product.images.length != 0 ? _product.images[index].src : getEnv("PRODUCT_PLACEHOLDER_IMAGE"),
|
||||
),
|
||||
itemCount: _product.images.length == 0
|
||||
? 1
|
||||
@ -381,9 +378,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveTheme.isLight
|
||||
? Colors.white
|
||||
: Colors.black26,
|
||||
color: NyColors.of(context).background,
|
||||
// boxShadow: wsBoxShadow(),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
@ -444,10 +439,7 @@ class _ProductDetailState extends NyState<ProductDetailPage> {
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveTheme.isLight
|
||||
? Colors.white
|
||||
: _appTheme.scaffoldColor(
|
||||
brightness: Brightness.dark),
|
||||
color: NyColors.of(context).background,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black12,
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:flutter_app/resources/themes/text_theme/default_text_theme.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -10,111 +12,106 @@ import 'package:nylo_support/helpers/helper.dart';
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
TextTheme _defaultTextTheme(AppTheme appTheme) {
|
||||
return TextTheme(
|
||||
headline5: TextStyle(
|
||||
fontSize: 22.0,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
ThemeData darkTheme() {
|
||||
TextTheme darkTheme =
|
||||
getAppTextTheme(appThemeFont, defaultTextTheme.merge(_darkTextTheme()));
|
||||
return ThemeData(
|
||||
primaryColor: NyColors.light.primaryContent,
|
||||
backgroundColor: NyColors.dark.background,
|
||||
colorScheme: ColorScheme.dark(),
|
||||
primaryColorLight: NyColors.light.primaryAccent,
|
||||
primaryColorDark: NyColors.dark.primaryContent,
|
||||
focusColor: NyColors.dark.primaryContent,
|
||||
scaffoldBackgroundColor: NyColors.dark.background,
|
||||
hintColor: NyColors.light.primaryAccent,
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: NyColors.dark.appBarBackground,
|
||||
titleTextStyle: darkTheme.headline6
|
||||
.copyWith(color: NyColors.dark.appBarPrimaryContent),
|
||||
iconTheme: IconThemeData(color: NyColors.dark.appBarPrimaryContent),
|
||||
elevation: 1.0,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light),
|
||||
buttonTheme: ButtonThemeData(
|
||||
buttonColor: NyColors.dark.primaryAccent,
|
||||
colorScheme: ColorScheme.light(primary: NyColors.dark.buttonBackground),
|
||||
),
|
||||
headline4: TextStyle(
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(primary: NyColors.dark.primaryContent),
|
||||
),
|
||||
headline3: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
primary: NyColors.dark.buttonPrimaryContent,
|
||||
backgroundColor: NyColors.dark.buttonBackground),
|
||||
),
|
||||
headline2: TextStyle(
|
||||
fontSize: 28.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.mainColor(brightness: Brightness.dark),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
focusedBorder:UnderlineInputBorder(
|
||||
borderSide:BorderSide(color: Colors.black)
|
||||
),
|
||||
headline1: TextStyle(
|
||||
fontSize: 36.0,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
),
|
||||
subtitle2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
),
|
||||
subtitle1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
overline: TextStyle(
|
||||
fontSize: 10.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
),
|
||||
button: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
headline6: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.mainColor(brightness: Brightness.dark),
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
),
|
||||
bodyText1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: appTheme.secondColor(brightness: Brightness.dark),
|
||||
),
|
||||
caption: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: appTheme.accentColor(brightness: Brightness.dark),
|
||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||
backgroundColor: NyColors.dark.bottomTabBarBackground,
|
||||
unselectedIconTheme:
|
||||
IconThemeData(color: NyColors.dark.bottomTabBarIconUnselected),
|
||||
selectedIconTheme:
|
||||
IconThemeData(color: NyColors.dark.bottomTabBarIconSelected),
|
||||
unselectedLabelStyle:
|
||||
TextStyle(color: NyColors.dark.bottomTabBarLabelUnselected),
|
||||
selectedLabelStyle:
|
||||
TextStyle(color: NyColors.dark.bottomTabBarLabelSelected),
|
||||
selectedItemColor: NyColors.dark.bottomTabBarLabelSelected,
|
||||
),
|
||||
textTheme: darkTheme,
|
||||
textSelectionTheme: TextSelectionThemeData(cursorColor: NyColors.dark.inputPrimaryContent),
|
||||
);
|
||||
}
|
||||
|
||||
ThemeData darkTheme(AppTheme appTheme) => ThemeData(
|
||||
primaryColor: appTheme.mainColor(brightness: Brightness.dark),
|
||||
backgroundColor: Colors.white,
|
||||
brightness: Brightness.dark,
|
||||
accentColor: appTheme.accentColor(brightness: Brightness.dark),
|
||||
iconTheme: IconThemeData(
|
||||
color: appTheme.secondColor(brightness: Brightness.dark)),
|
||||
primaryColorLight: appTheme.accentColor(
|
||||
brightness: Brightness.light,
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Dark Text Theme
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
TextTheme _darkTextTheme() {
|
||||
final Color darkPrimaryContent = NyColors.dark.primaryContent;
|
||||
return TextTheme(
|
||||
headline6: TextStyle(
|
||||
color: darkPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
primaryColorDark: appTheme.accentColor(
|
||||
brightness: Brightness.dark,
|
||||
headline5: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
primaryTextTheme: _defaultTextTheme(appTheme).copyWith(
|
||||
bodyText2:
|
||||
TextStyle(color: Colors.white70, fontWeight: FontWeight.bold),
|
||||
bodyText1:
|
||||
TextStyle(color: Colors.grey, fontWeight: FontWeight.bold)),
|
||||
accentColorBrightness: Brightness.dark,
|
||||
accentTextTheme: _defaultTextTheme(appTheme).apply(
|
||||
bodyColor: appTheme.accentColor(brightness: Brightness.dark),
|
||||
displayColor: appTheme.accentColor(brightness: Brightness.dark),
|
||||
headline4: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
focusColor: appTheme.accentColor(brightness: Brightness.dark),
|
||||
scaffoldBackgroundColor:
|
||||
appTheme.scaffoldColor(brightness: Brightness.dark),
|
||||
hintColor: appTheme.secondColor(brightness: Brightness.dark),
|
||||
appBarTheme: AppBarTheme(
|
||||
textTheme: getAppTextTheme(appThemeFont, _defaultTextTheme(appTheme)),
|
||||
color:
|
||||
appTheme.scaffoldColor(brightness: Brightness.dark, opacity: 0.5),
|
||||
iconTheme: IconThemeData(
|
||||
color: appTheme.mainColor(brightness: Brightness.dark)),
|
||||
elevation: 1.0,
|
||||
brightness: Brightness.dark,
|
||||
headline3: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
buttonColor: Colors.white,
|
||||
buttonTheme: ButtonThemeData(
|
||||
buttonColor: appTheme.accentColor(),
|
||||
headline2: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
headline1: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
subtitle2: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
subtitle1: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
overline: TextStyle(
|
||||
color: darkPrimaryContent,
|
||||
),
|
||||
button: TextStyle(
|
||||
color: darkPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
color: darkPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
bodyText1: TextStyle(
|
||||
color: NyColors.dark.primaryContent,
|
||||
),
|
||||
caption: TextStyle(
|
||||
color: darkPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
textTheme: getAppTextTheme(appThemeFont, _defaultTextTheme(appTheme)),
|
||||
);
|
||||
}
|
||||
@ -1,111 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Theme
|
||||
|
|
||||
| Theme Config - config/app_theme.dart
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
ThemeData defaultTheme(AppTheme appTheme) => ThemeData(
|
||||
primaryColor: appTheme.mainColor(),
|
||||
backgroundColor: Colors.white,
|
||||
brightness: Brightness.light,
|
||||
accentColor: appTheme.accentColor(),
|
||||
primaryColorLight: appTheme.accentColor(
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
primaryColorDark: appTheme.accentColor(
|
||||
brightness: Brightness.dark,
|
||||
),
|
||||
accentColorBrightness: Brightness.light,
|
||||
accentTextTheme: _defaultTextTheme(appTheme).apply(
|
||||
bodyColor: appTheme.accentColor(),
|
||||
displayColor: appTheme.accentColor(),
|
||||
),
|
||||
focusColor: appTheme.accentColor(),
|
||||
scaffoldBackgroundColor: appTheme.scaffoldColor(),
|
||||
primaryTextTheme: _defaultTextTheme(appTheme).copyWith(
|
||||
bodyText2: TextStyle(color: Colors.grey),
|
||||
bodyText1: TextStyle(color: Colors.grey)),
|
||||
hintColor: appTheme.secondColor(),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.white,
|
||||
textTheme: getAppTextTheme(appThemeFont, _defaultTextTheme(appTheme)),
|
||||
iconTheme: IconThemeData(color: appTheme.mainColor()),
|
||||
elevation: 0.0,
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
buttonColor: Colors.white,
|
||||
buttonTheme: ButtonThemeData(
|
||||
buttonColor: appTheme.accentColor(),
|
||||
),
|
||||
textTheme: getAppTextTheme(appThemeFont, _defaultTextTheme(appTheme)),
|
||||
);
|
||||
|
||||
TextTheme _defaultTextTheme(AppTheme appTheme) {
|
||||
return TextTheme(
|
||||
headline5: TextStyle(
|
||||
fontSize: 22.0,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
headline4: TextStyle(
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
headline3: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
headline2: TextStyle(
|
||||
fontSize: 28.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.mainColor(),
|
||||
),
|
||||
headline1: TextStyle(
|
||||
fontSize: 36.0,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
subtitle2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
subtitle1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
overline: TextStyle(
|
||||
fontSize: 10.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
button: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
headline6: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: appTheme.mainColor(),
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: appTheme.secondColor(),
|
||||
),
|
||||
bodyText1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: appTheme.secondColor(),
|
||||
fontWeight: FontWeight.bold),
|
||||
caption: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: appTheme.accentColor(),
|
||||
fontWeight: FontWeight.bold),
|
||||
);
|
||||
}
|
||||
121
LabelStoreMax/lib/resources/themes/light_theme.dart
Normal file
121
LabelStoreMax/lib/resources/themes/light_theme.dart
Normal file
@ -0,0 +1,121 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/themes/text_theme/default_text_theme.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Light Theme
|
||||
|
|
||||
| Theme Config - config/app_theme.dart
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
ThemeData lightTheme() {
|
||||
TextTheme lightTheme =
|
||||
getAppTextTheme(appThemeFont, defaultTextTheme.merge(_lightTextTheme()));
|
||||
final Color lightPrimaryContent = NyColors.light.primaryContent;
|
||||
final Color darkPrimaryContent = NyColors.dark.primaryContent;
|
||||
|
||||
return ThemeData(
|
||||
primaryColor: lightPrimaryContent,
|
||||
backgroundColor: NyColors.light.background,
|
||||
colorScheme: ColorScheme.light(),
|
||||
primaryColorLight: NyColors.light.primaryAccent,
|
||||
primaryColorDark: darkPrimaryContent,
|
||||
focusColor: lightPrimaryContent,
|
||||
scaffoldBackgroundColor: NyColors.light.background,
|
||||
hintColor: NyColors.light.primaryAccent,
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: NyColors.light.appBarBackground,
|
||||
titleTextStyle: lightTheme.headline6
|
||||
.copyWith(color: NyColors.light.appBarPrimaryContent),
|
||||
iconTheme: IconThemeData(color: NyColors.light.appBarPrimaryContent),
|
||||
elevation: 1.0,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.dark,
|
||||
),
|
||||
buttonTheme: ButtonThemeData(
|
||||
buttonColor: NyColors.light.buttonPrimaryContent,
|
||||
colorScheme: ColorScheme.light(primary: NyColors.light.buttonBackground),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(primary: lightPrimaryContent),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
primary: NyColors.light.buttonPrimaryContent,
|
||||
backgroundColor: NyColors.light.buttonBackground),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
focusedBorder:UnderlineInputBorder(
|
||||
borderSide:BorderSide(color: Colors.black)
|
||||
),
|
||||
),
|
||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||
backgroundColor: NyColors.light.bottomTabBarBackground,
|
||||
unselectedIconTheme:
|
||||
IconThemeData(color: NyColors.light.bottomTabBarIconUnselected),
|
||||
selectedIconTheme:
|
||||
IconThemeData(color: NyColors.light.bottomTabBarIconSelected),
|
||||
unselectedLabelStyle:
|
||||
TextStyle(color: NyColors.light.bottomTabBarLabelUnselected),
|
||||
selectedLabelStyle:
|
||||
TextStyle(color: NyColors.light.bottomTabBarLabelSelected),
|
||||
selectedItemColor: NyColors.light.bottomTabBarLabelSelected,
|
||||
),
|
||||
textTheme: lightTheme,
|
||||
textSelectionTheme: TextSelectionThemeData(cursorColor: NyColors.light.inputPrimaryContent)
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Light Text Theme
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
TextTheme _lightTextTheme() {
|
||||
final Color lightPrimaryContent = NyColors.light.primaryContent;
|
||||
return TextTheme(
|
||||
headline6: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
headline5: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
headline4: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
headline3: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
headline2: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
headline1: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
subtitle2: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
subtitle1: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
overline: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
button: TextStyle(
|
||||
color: lightPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
bodyText2: TextStyle(
|
||||
color: lightPrimaryContent.withOpacity(0.8),
|
||||
),
|
||||
bodyText1: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
caption: TextStyle(
|
||||
color: lightPrimaryContent,
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/theme_styles.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Dark Theme Colors
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class DarkThemeColors implements BaseStyles {
|
||||
// general
|
||||
Color get background => const Color(0xFF212121);
|
||||
Color get backgroundContainer => const Color(0xFF4a4a4a);
|
||||
|
||||
Color get primaryContent => const Color(0xFFE1E1E1);
|
||||
Color get primaryAccent => const Color(0xFF818181);
|
||||
|
||||
// app bar
|
||||
Color get appBarBackground => const Color(0xFF2C2C2C);
|
||||
Color get appBarPrimaryContent => Colors.white;
|
||||
|
||||
Color get inputPrimaryContent => Colors.white;
|
||||
|
||||
// buttons
|
||||
Color get buttonBackground => Colors.white60;
|
||||
Color get buttonPrimaryContent => const Color(0xFF232c33);
|
||||
|
||||
// bottom tab bar
|
||||
Color get bottomTabBarBackground => const Color(0xFF232c33);
|
||||
|
||||
// bottom tab bar - icons
|
||||
Color get bottomTabBarIconSelected => Colors.white70;
|
||||
Color get bottomTabBarIconUnselected => Colors.white60;
|
||||
|
||||
// bottom tab bar - label
|
||||
Color get bottomTabBarLabelUnselected => Colors.white54;
|
||||
Color get bottomTabBarLabelSelected => Colors.white;
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/resources/themes/styles/theme_styles.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Light Theme Colors
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class LightThemeColors implements BaseStyles {
|
||||
// general
|
||||
Color get background => const Color(0xFFFFFFFF);
|
||||
Color get backgroundContainer => Colors.white;
|
||||
Color get primaryContent => const Color(0xFF000000);
|
||||
Color get primaryAccent => const Color(0xFF87c694);
|
||||
|
||||
// app bar
|
||||
Color get appBarBackground => Colors.white;
|
||||
Color get appBarPrimaryContent => const Color(0xFF3a3d40);
|
||||
|
||||
Color get inputPrimaryContent => Colors.black;
|
||||
|
||||
// buttons
|
||||
Color get buttonBackground => const Color(0xFF529cda);
|
||||
Color get buttonPrimaryContent => Colors.white;
|
||||
|
||||
// bottom tab bar
|
||||
Color get bottomTabBarBackground => Colors.white;
|
||||
|
||||
// bottom tab bar - icons
|
||||
Color get bottomTabBarIconSelected => Colors.blue;
|
||||
Color get bottomTabBarIconUnselected => Colors.black54;
|
||||
|
||||
// bottom tab bar - label
|
||||
Color get bottomTabBarLabelUnselected => Colors.black45;
|
||||
Color get bottomTabBarLabelSelected => Colors.black;
|
||||
}
|
||||
33
LabelStoreMax/lib/resources/themes/styles/theme_styles.dart
Normal file
33
LabelStoreMax/lib/resources/themes/styles/theme_styles.dart
Normal file
@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Interface for your base styles.
|
||||
/// Add more styles here and then implement in
|
||||
/// light_theme_colors.dart and dark_theme_colors.dart.
|
||||
abstract class BaseStyles {
|
||||
// general
|
||||
Color get background;
|
||||
Color get backgroundContainer;
|
||||
Color get primaryContent;
|
||||
Color get primaryAccent;
|
||||
|
||||
// app bar
|
||||
Color get appBarBackground;
|
||||
Color get appBarPrimaryContent;
|
||||
|
||||
// buttons
|
||||
Color get buttonBackground;
|
||||
Color get buttonPrimaryContent;
|
||||
|
||||
// bottom tab bar
|
||||
Color get bottomTabBarBackground;
|
||||
|
||||
// bottom tab bar - icons
|
||||
Color get bottomTabBarIconSelected;
|
||||
Color get bottomTabBarIconUnselected;
|
||||
|
||||
// bottom tab bar - label
|
||||
Color get bottomTabBarLabelUnselected;
|
||||
Color get bottomTabBarLabelSelected;
|
||||
|
||||
Color get inputPrimaryContent;
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default text theme
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const TextTheme defaultTextTheme = TextTheme(
|
||||
headline6: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
headline5: TextStyle(
|
||||
fontSize: 22.0,
|
||||
),
|
||||
headline4: TextStyle(
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
headline3: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
headline2: TextStyle(
|
||||
fontSize: 28.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
headline1: TextStyle(
|
||||
fontSize: 36.0,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
subtitle2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
subtitle1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
overline: TextStyle(
|
||||
fontSize: 10.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
button: TextStyle(),
|
||||
bodyText2: TextStyle(
|
||||
fontSize: 14.0,
|
||||
),
|
||||
bodyText1: TextStyle(
|
||||
fontSize: 16.0,
|
||||
),
|
||||
caption: TextStyle(
|
||||
fontSize: 16.0,
|
||||
),
|
||||
);
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
@ -18,10 +18,9 @@ class AppLoaderWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
bool isDark = (Theme.of(context).brightness == Brightness.dark);
|
||||
return SpinKitDoubleBounce(
|
||||
color:
|
||||
adaptiveThemeMode.isLight ? HexColor("#424242") : HexColor("#c7c7c7"),
|
||||
color: HexColor(!isDark ? "#424242" : "#c7c7c7")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ class AppVersionWidget extends StatelessWidget {
|
||||
"${trans(context, "Version")}: ${snapshot.data.version}",
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText1
|
||||
.bodyText2
|
||||
.copyWith(fontWeight: FontWeight.w300)),
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
);
|
||||
|
||||
@ -30,7 +30,7 @@ class PrimaryButton extends StatelessWidget {
|
||||
textStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.button
|
||||
.copyWith(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
.copyWith(fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
bgColor: HexColor("#529cda"),
|
||||
);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ class CachedImageWidget extends StatelessWidget {
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
backgroundColor: Colors.black12,
|
||||
color: Colors.black54
|
||||
),
|
||||
),
|
||||
this.fit = BoxFit.contain,
|
||||
|
||||
@ -55,7 +55,7 @@ class _CartIconWidgetState extends State<CartIconWidget> {
|
||||
}
|
||||
return Text(
|
||||
cartValue,
|
||||
style: Theme.of(context).textTheme.bodyText1,
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
textAlign: TextAlign.center,
|
||||
);
|
||||
}
|
||||
|
||||
@ -6,11 +6,11 @@ import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/app/models/customer_address.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:nylo_framework/nylo_framework.dart';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:nylo_support/widgets/ny_state.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
class PayPalCheckout extends StatefulWidget {
|
||||
@ -25,7 +25,9 @@ class PayPalCheckout extends StatefulWidget {
|
||||
}
|
||||
|
||||
class WebViewState extends NyState<PayPalCheckout> {
|
||||
final flutterWebViewPlugin = new FlutterWebviewPlugin();
|
||||
final Completer<WebViewController> _controller =
|
||||
Completer<WebViewController>();
|
||||
|
||||
String payerId = '';
|
||||
int intCount = 0;
|
||||
StreamSubscription<String> _onUrlChanged;
|
||||
@ -67,7 +69,7 @@ class WebViewState extends NyState<PayPalCheckout> {
|
||||
}
|
||||
|
||||
String getPayPalItemName() {
|
||||
return truncateString(widget.description, 124);
|
||||
return truncateString(widget.description.replaceAll(new RegExp(r'[^\w\s]+'),''), 124);
|
||||
}
|
||||
|
||||
String getPayPalPaymentType() {
|
||||
@ -84,33 +86,17 @@ class WebViewState extends NyState<PayPalCheckout> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
|
||||
setCheckoutShippingAddress(
|
||||
CheckoutSession.getInstance.billingDetails.shippingAddress);
|
||||
|
||||
setState(() {});
|
||||
|
||||
_onUrlChanged = flutterWebViewPlugin.onUrlChanged.listen((String url) {
|
||||
if (intCount > 0) {
|
||||
url = url.replaceAll("~", "_");
|
||||
}
|
||||
|
||||
intCount = intCount + 1;
|
||||
if (url.contains("payment_success")) {
|
||||
var uri = Uri.dataFromString(url);
|
||||
setState(() {
|
||||
payerId = uri.queryParameters['PayerID'];
|
||||
});
|
||||
Navigator.pop(context, {"status": "success", "payerId": payerId});
|
||||
} else if (url.contains("payment_failure")) {
|
||||
Navigator.pop(context, {"status": "cancelled"});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (_onUrlChanged != null) {
|
||||
_onUrlChanged.cancel();
|
||||
flutterWebViewPlugin.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@ -146,14 +132,39 @@ $formCheckoutShippingAddress
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WebviewScaffold(
|
||||
url: Uri.dataFromString(_loadHTML(), mimeType: 'text/html').toString(),
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
trans(context, "PayPal Checkout"),
|
||||
textAlign: TextAlign.center,
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: SafeArea(
|
||||
child: WebView(
|
||||
initialUrl: Uri.dataFromString(_loadHTML(), mimeType: 'text/html').toString(),
|
||||
javascriptMode: JavascriptMode.unrestricted,
|
||||
onWebViewCreated: (WebViewController webViewController) {
|
||||
_controller.complete(webViewController);
|
||||
},
|
||||
onProgress: (int progress) {
|
||||
},
|
||||
navigationDelegate: (NavigationRequest request) {
|
||||
return NavigationDecision.navigate;
|
||||
},
|
||||
onPageStarted: (String url) {
|
||||
},
|
||||
onPageFinished: (String url) {
|
||||
if (intCount > 0) {
|
||||
url = url.replaceAll("~", "_");
|
||||
}
|
||||
|
||||
intCount = intCount + 1;
|
||||
if (url.contains("payment_success")) {
|
||||
var uri = Uri.dataFromString(url);
|
||||
setState(() {
|
||||
payerId = uri.queryParameters['PayerID'];
|
||||
});
|
||||
Navigator.pop(context, {"status": payerId == null ? "cancelled" : "success", "payerId": payerId});
|
||||
} else if (url.contains("payment_failure")) {
|
||||
Navigator.pop(context, {"status": "cancelled"});
|
||||
}
|
||||
},
|
||||
gestureNavigationEnabled: false,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -8,12 +8,14 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_version_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/woosignal_ui.dart';
|
||||
import 'package:nylo_framework/theme/helper/ny_theme.dart';
|
||||
import 'package:nylo_support/helpers/helper.dart';
|
||||
import 'package:woosignal/models/response/woosignal_app.dart';
|
||||
|
||||
@ -30,19 +32,17 @@ class HomeDrawerWidget extends StatefulWidget {
|
||||
class _HomeDrawerWidgetState extends State<HomeDrawerWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AdaptiveThemeMode adaptiveTheme = AdaptiveTheme.of(context).mode;
|
||||
bool isDark = (Theme.of(context).brightness == Brightness.dark);
|
||||
return Drawer(
|
||||
child: Container(
|
||||
color: adaptiveTheme == AdaptiveThemeMode.light
|
||||
? Colors.white
|
||||
: Color(0xFF2C2C2C),
|
||||
color: NyColors.of(context).background,
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
DrawerHeader(
|
||||
child: Center(child: StoreLogo()),
|
||||
decoration: BoxDecoration(
|
||||
color: adaptiveTheme.isLight ? Colors.white : Colors.black87,
|
||||
color: NyColors.of(context).background,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
@ -54,15 +54,20 @@ class _HomeDrawerWidgetState extends State<HomeDrawerWidget> {
|
||||
),
|
||||
if (widget.wooSignalApp.wpLoginEnabled == 1)
|
||||
ListTile(
|
||||
title: Text(trans(context, "Profile")),
|
||||
title: Text(trans(context, "Profile"), style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 16
|
||||
),),
|
||||
leading: Icon(Icons.account_circle),
|
||||
onTap: _actionProfile,
|
||||
),
|
||||
ListTile(
|
||||
title: Text(trans(context, "Cart")),
|
||||
title: Text(trans(context, "Cart"), style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 16
|
||||
),),
|
||||
leading: Icon(Icons.shopping_cart),
|
||||
onTap: _actionCart,
|
||||
),
|
||||
if (widget.wooSignalApp.appTermslink != null && widget.wooSignalApp.appPrivacylink != null)
|
||||
Padding(
|
||||
child: Text(
|
||||
trans(context, "About Us"),
|
||||
@ -73,7 +78,10 @@ class _HomeDrawerWidgetState extends State<HomeDrawerWidget> {
|
||||
if (widget.wooSignalApp.appTermslink != null &&
|
||||
widget.wooSignalApp.appTermslink.isNotEmpty)
|
||||
ListTile(
|
||||
title: Text(trans(context, "Terms and conditions")),
|
||||
title: Text(trans(context, "Terms and conditions"),
|
||||
style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 16
|
||||
),),
|
||||
leading: Icon(Icons.menu_book_rounded),
|
||||
trailing: Icon(Icons.keyboard_arrow_right_rounded),
|
||||
onTap: _actionTerms,
|
||||
@ -81,25 +89,25 @@ class _HomeDrawerWidgetState extends State<HomeDrawerWidget> {
|
||||
if (widget.wooSignalApp.appPrivacylink != null &&
|
||||
widget.wooSignalApp.appPrivacylink.isNotEmpty)
|
||||
ListTile(
|
||||
title: Text(trans(context, "Privacy policy")),
|
||||
title: Text(trans(context, "Privacy policy"), style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 16
|
||||
),),
|
||||
trailing: Icon(Icons.keyboard_arrow_right_rounded),
|
||||
leading: Icon(Icons.account_balance),
|
||||
onTap: _actionPrivacy,
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
adaptiveTheme.isDark
|
||||
? trans(context, "Light Mode")
|
||||
: trans(context, "Dark Mode"),
|
||||
trans(context, (isDark ? "Light Mode" : "Dark Mode")),
|
||||
style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 16
|
||||
)
|
||||
),
|
||||
leading: Icon(Icons.brightness_4_rounded),
|
||||
onTap: () {
|
||||
if (adaptiveTheme.isDark) {
|
||||
AdaptiveTheme.of(context).setLight();
|
||||
} else {
|
||||
AdaptiveTheme.of(context).setDark();
|
||||
}
|
||||
setState(() {});
|
||||
setState(() {
|
||||
NyTheme.set(context, id: isDark ? "default_light_theme" : "default_dark_theme");
|
||||
});
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
|
||||
@ -117,6 +117,7 @@ class _NoticHomeWidgetState extends State<NoticHomeWidget> {
|
||||
onTap: _modalBottomSheetMenu,
|
||||
child: Text(
|
||||
trans(context, "Categories"),
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -89,7 +89,7 @@ class _NoticThemeWidgetState extends State<NoticThemeWidget> {
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
activeWidget = (await authCheck()) ? AccountDetailPage(showLeadingBackButton: false) : AccountLandingPage();
|
||||
activeWidget = (await authCheck()) ? AccountDetailPage(showLeadingBackButton: false) : AccountLandingPage(showBackButton: false,);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ class TopNavWidget extends StatelessWidget {
|
||||
AutoSizeText(
|
||||
trans(context, "Newest"),
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.textTheme
|
||||
.bodyText2
|
||||
.copyWith(fontWeight: FontWeight.bold),
|
||||
maxLines: 1,
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -18,6 +18,7 @@ import 'package:flutter_app/app/models/cart_line_item.dart';
|
||||
import 'package:flutter_app/app/models/checkout_session.dart';
|
||||
import 'package:flutter_app/bootstrap/app_helper.dart';
|
||||
import 'package:flutter_app/bootstrap/helpers.dart';
|
||||
import 'package:flutter_app/config/app_theme.dart';
|
||||
import 'package:flutter_app/resources/widgets/app_loader_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/cached_image_widget.dart';
|
||||
import 'package:flutter_app/resources/widgets/no_results_for_products_widget.dart';
|
||||
@ -237,7 +238,9 @@ class TextEditingRow extends StatelessWidget {
|
||||
child: Padding(
|
||||
child: Text(
|
||||
heading,
|
||||
style: Theme.of(context).textTheme.bodyText1,
|
||||
style: Theme.of(context).textTheme.bodyText1.copyWith(
|
||||
color: NyColors.of(context).primaryContent
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 2),
|
||||
),
|
||||
@ -375,7 +378,9 @@ class ProductItemContainer extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(top: 2, bottom: 2),
|
||||
child: Text(
|
||||
product.name,
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
fontSize: 15
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@ -438,7 +443,7 @@ class ProductItemContainer extends StatelessWidget {
|
||||
|
||||
wsModalBottom(BuildContext context,
|
||||
{String title, Widget bodyWidget, Widget extraWidget}) {
|
||||
AdaptiveThemeMode adaptiveThemeMode = AdaptiveTheme.of(context).mode;
|
||||
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
@ -451,9 +456,7 @@ wsModalBottom(BuildContext context,
|
||||
child: new Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: new BoxDecoration(
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: Color(0xFF2C2C2C),
|
||||
color: NyColors.of(context).background,
|
||||
borderRadius: new BorderRadius.only(
|
||||
topLeft: const Radius.circular(10.0),
|
||||
topRight: const Radius.circular(10.0),
|
||||
@ -476,10 +479,8 @@ wsModalBottom(BuildContext context,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
boxShadow:
|
||||
adaptiveThemeMode.isLight ? wsBoxShadow() : null,
|
||||
color: adaptiveThemeMode.isLight
|
||||
? Colors.white
|
||||
: Color(0xFF4a4a4a),
|
||||
(Theme.of(context).brightness == Brightness.light) ? wsBoxShadow() : null,
|
||||
color: NyColors.of(context).background,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: bodyWidget,
|
||||
@ -487,7 +488,8 @@ wsModalBottom(BuildContext context,
|
||||
),
|
||||
extraWidget ?? null
|
||||
].where((t) => t != null).toList(),
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@ -29,7 +29,7 @@ import 'package:page_transition/page_transition.dart';
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
buildRouter() => nyCreateRoutes((router) {
|
||||
appRouter() => nyRoutes((router) {
|
||||
router.route("/home", (context) => HomePage());
|
||||
|
||||
router.route("/cart", (context) => CartPage());
|
||||
|
||||
@ -7,21 +7,14 @@ packages:
|
||||
name: _fe_analyzer_shared
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "21.0.0"
|
||||
adaptive_theme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: adaptive_theme
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "22.0.0"
|
||||
analyzer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: analyzer
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
version: "1.7.2"
|
||||
animate_do:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -42,14 +35,14 @@ packages:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.2.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.6.1"
|
||||
version: "2.8.1"
|
||||
auto_size_text:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -91,7 +84,7 @@ packages:
|
||||
name: cached_network_image_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -105,14 +98,14 @@ packages:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.1"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cli_util
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.3.3"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -133,7 +126,7 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -176,13 +169,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
eventify:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: eventify
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -196,14 +182,14 @@ packages:
|
||||
name: ffi
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
version: "6.1.2"
|
||||
flare_dart:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -236,21 +222,21 @@ packages:
|
||||
name: flutter_cache_manager
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.1.2"
|
||||
flutter_dotenv:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_dotenv
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
version: "5.0.2"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_launcher_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.0"
|
||||
version: "0.9.2"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -269,21 +255,28 @@ packages:
|
||||
name: flutter_secure_storage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.0"
|
||||
version: "4.2.1"
|
||||
flutter_spinkit:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_spinkit
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
version: "5.1.0"
|
||||
flutter_staggered_grid_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_staggered_grid_view
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
version: "0.4.1"
|
||||
flutter_stripe:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_stripe
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
flutter_styled_toast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -309,19 +302,19 @@ packages:
|
||||
name: flutter_web_browser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.14.0"
|
||||
version: "0.15.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_webview_plugin:
|
||||
dependency: "direct main"
|
||||
freezed_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_webview_plugin
|
||||
name: freezed_annotation
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
version: "0.14.3"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -342,7 +335,7 @@ packages:
|
||||
name: hexcolor
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.4"
|
||||
version: "2.0.5"
|
||||
html:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -356,7 +349,7 @@ packages:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.1"
|
||||
version: "0.13.3"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -385,13 +378,20 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.3"
|
||||
json_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: json_annotation
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
logger:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logger
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -405,14 +405,14 @@ packages:
|
||||
name: math_expressions
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.2.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.7.0"
|
||||
money_formatter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -426,14 +426,14 @@ packages:
|
||||
name: nylo_framework
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "2.0.4"
|
||||
nylo_support:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: nylo_support
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "2.1.0"
|
||||
octo_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -461,7 +461,7 @@ packages:
|
||||
name: page_transition
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
version: "2.0.4"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -475,21 +475,21 @@ packages:
|
||||
name: path_provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "2.0.3"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
path_provider_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -503,28 +503,28 @@ packages:
|
||||
name: path_provider_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.3"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.11.1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
version: "4.3.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.2"
|
||||
platform_alert_dialog:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -538,14 +538,14 @@ packages:
|
||||
name: plugin_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.1"
|
||||
version: "4.2.3"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -560,41 +560,34 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
razorpay_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: razorpay_flutter
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.7"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rxdart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.26.0"
|
||||
version: "0.27.2"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.6"
|
||||
version: "2.0.7"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
shared_preferences_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -608,14 +601,14 @@ packages:
|
||||
name: shared_preferences_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@ -634,14 +627,14 @@ packages:
|
||||
name: sqflite
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0+3"
|
||||
version: "2.0.0+4"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_common
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0+2"
|
||||
version: "2.0.1+1"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -670,6 +663,27 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
stripe_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stripe_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
stripe_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stripe_ios
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
stripe_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stripe_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -690,7 +704,14 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.4.2"
|
||||
theme_provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: theme_provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
transformer_page_view:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -726,13 +747,41 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
webview_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: webview_flutter
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
webview_flutter_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.15"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
webview_flutter_wkwebview:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_wkwebview
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.14"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
version: "2.2.9"
|
||||
woosignal:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -740,20 +789,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
woosignal_stripe:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: woosignal_stripe
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
wp_json_api:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: wp_json_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.1.3"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -767,7 +809,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.1.0"
|
||||
version: "5.3.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -776,5 +818,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.12.0 <3.0.0"
|
||||
flutter: ">=2.0.1"
|
||||
dart: ">=2.14.0 <3.0.0"
|
||||
flutter: ">=2.5.0"
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
# Official WooSignal App Template for WooCommerce
|
||||
|
||||
# Label StoreMax
|
||||
# Version: 5.1.0
|
||||
# Version: 5.2.0
|
||||
# Author: Anthony Gordon
|
||||
# Homepage: https://woosignal.com
|
||||
# Documentation: https://woosignal.com/docs/app/ios/label-storemax
|
||||
|
||||
### Change App Icon
|
||||
# 1 Replace: public/assets/icon/appicon.png (1024px1024px icon size)
|
||||
# 2 Run this command from the terminal: "flutter pub run flutter_launcher_icons:main"
|
||||
# 2 Run this command from the terminal: "flutter pub run nylo_framework:main appicons:build"
|
||||
|
||||
### Uploading the IOS/Android app
|
||||
# IOS https://flutter.dev/docs/deployment/ios
|
||||
@ -27,34 +27,30 @@ environment:
|
||||
dependencies:
|
||||
google_fonts: ^2.1.0
|
||||
analyzer: ^1.5.0
|
||||
adaptive_theme: ^2.2.0
|
||||
intl: ^0.17.0
|
||||
page_transition: ^2.0.2
|
||||
nylo_framework: ^1.0.0
|
||||
nylo_support: ^1.0.0
|
||||
page_transition: ^2.0.4
|
||||
nylo_framework: ^2.0.4
|
||||
woosignal: ^2.1.0
|
||||
woosignal_stripe: ^1.1.0
|
||||
razorpay_flutter: ^1.2.5
|
||||
wp_json_api: ^3.0.0
|
||||
flutter_stripe: ^2.0.0
|
||||
wp_json_api: ^3.1.3
|
||||
cached_network_image: ^3.1.0
|
||||
package_info: ^2.0.2
|
||||
money_formatter: ^0.0.3
|
||||
platform_alert_dialog: ^1.0.0+2
|
||||
flutter_web_browser: ^0.14.0
|
||||
flutter_webview_plugin: ^0.4.0
|
||||
flutter_web_browser: ^0.15.0
|
||||
webview_flutter: ^2.1.1
|
||||
pull_to_refresh: 2.0.0
|
||||
flutter_swiper: ^1.1.6
|
||||
flutter_styled_toast: ^2.0.0
|
||||
animate_do: ^2.0.0
|
||||
bubble_tab_indicator: ^0.1.5
|
||||
status_alert: ^0.1.3
|
||||
math_expressions: ^2.1.1
|
||||
hexcolor: ^2.0.3
|
||||
flutter_spinkit: ^5.0.0
|
||||
flutter_launcher_icons: ^0.9.0
|
||||
math_expressions: ^2.2.0
|
||||
hexcolor: ^2.0.5
|
||||
flutter_spinkit: ^5.1.0
|
||||
auto_size_text: ^2.1.0
|
||||
html: ^0.15.0
|
||||
flutter_staggered_grid_view: ^0.4.0
|
||||
flutter_staggered_grid_view: ^0.4.1
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_localizations:
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
# WooCommerce App: Label StoreMax
|
||||
|
||||
### Label StoreMax - v5.1.0
|
||||
### Label StoreMax - v5.2.0
|
||||
|
||||
|
||||
[Official WooSignal WooCommerce App](https://woosignal.com)
|
||||
@ -45,7 +45,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe
|
||||
- Change app name, logo, customize default language, currency + more
|
||||
- Light and dark mode
|
||||
- Theme customization
|
||||
- Stripe, Cash On Delivery, RazorPay and PayPal
|
||||
- Stripe, Cash On Delivery and PayPal
|
||||
- Localized for en, es, pt, it, hi, fr, zh
|
||||
- Orders show as normal in WooCommerce
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user