diff --git a/LabelStoreMax/lib/app/providers/app_provider.dart b/LabelStoreMax/lib/app/providers/app_provider.dart index bf1cd47..d7c9275 100644 --- a/LabelStoreMax/lib/app/providers/app_provider.dart +++ b/LabelStoreMax/lib/app/providers/app_provider.dart @@ -10,6 +10,7 @@ import 'package:woosignal/woosignal.dart'; import 'package:wp_json_api/wp_json_api.dart'; class AppProvider implements NyProvider { + @override boot(Nylo nylo) async { await SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, diff --git a/LabelStoreMax/lib/app/providers/route_provider.dart b/LabelStoreMax/lib/app/providers/route_provider.dart index d2702dd..96748ad 100644 --- a/LabelStoreMax/lib/app/providers/route_provider.dart +++ b/LabelStoreMax/lib/app/providers/route_provider.dart @@ -2,6 +2,7 @@ import 'package:flutter_app/routes/router.dart'; import 'package:nylo_framework/nylo_framework.dart'; class RouteProvider implements NyProvider { + @override boot(Nylo nylo) async { nylo.addRouter(appRouter()); diff --git a/LabelStoreMax/lib/bootstrap/helpers.dart b/LabelStoreMax/lib/bootstrap/helpers.dart index 399ba1e..716095e 100644 --- a/LabelStoreMax/lib/bootstrap/helpers.dart +++ b/LabelStoreMax/lib/bootstrap/helpers.dart @@ -115,13 +115,13 @@ dynamic envVal(String envVal, {dynamic defaultValue}) => PaymentType addPayment( {required int id, required String name, - required String desc, + required String description, required String assetImage, required Function pay}) => PaymentType( id: id, name: name, - desc: desc, + desc: description, assetImage: assetImage, pay: pay, ); diff --git a/LabelStoreMax/lib/config/payment_gateways.dart b/LabelStoreMax/lib/config/payment_gateways.dart index 5d168b0..a21d067 100644 --- a/LabelStoreMax/lib/config/payment_gateways.dart +++ b/LabelStoreMax/lib/config/payment_gateways.dart @@ -4,6 +4,7 @@ import 'package:flutter_app/app/providers/paypal_pay.dart'; import 'package:flutter_app/app/providers/razorpay_pay.dart'; import 'package:flutter_app/app/providers/stripe_pay.dart'; import 'package:flutter_app/bootstrap/helpers.dart'; +import 'package:nylo_framework/nylo_framework.dart'; /* |-------------------------------------------------------------------------- @@ -22,7 +23,7 @@ List paymentTypeList = [ addPayment( id: 1, name: "Stripe", - desc: "Debit or Credit Card", + description: trans("Debit or Credit Card"), assetImage: "dark_powered_by_stripe.png", pay: stripePay, ), @@ -30,7 +31,7 @@ List paymentTypeList = [ addPayment( id: 2, name: "CashOnDelivery", - desc: "Cash on delivery", + description: trans("Cash on delivery"), assetImage: "cash_on_delivery.jpeg", pay: cashOnDeliveryPay, ), @@ -38,7 +39,7 @@ List paymentTypeList = [ addPayment( id: 4, name: "PayPal", - desc: "Debit or Credit Card", + description: trans("Debit or Credit Card"), assetImage: "paypal_logo.png", pay: payPalPay, ), @@ -46,7 +47,7 @@ List paymentTypeList = [ addPayment( id: 5, name: "RazorPay", - desc: "Debit or Credit Card", + description: trans("Debit or Credit Card"), assetImage: "razorpay.png", pay: razorPay, ), @@ -56,7 +57,7 @@ List paymentTypeList = [ // addPayment( // id: 6, // name: "MyNewPaymentMethod", - // desc: "Debit or Credit Card", + // description: "Debit or Credit Card", // assetImage: "add icon image to public/assets/images/myimage.png", // pay: "myCustomPaymentFunction", // ), diff --git a/LabelStoreMax/lib/resources/pages/account_detail.dart b/LabelStoreMax/lib/resources/pages/account_detail.dart index c7a66e4..36b00db 100644 --- a/LabelStoreMax/lib/resources/pages/account_detail.dart +++ b/LabelStoreMax/lib/resources/pages/account_detail.dart @@ -154,30 +154,16 @@ class _AccountDetailPageState extends State ), Expanded( child: Padding( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - Text( - [userFirstName, userLastName] - .where( - (t) => (t != null || t != "")) - .toList() - .join(" "), - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - ), - ), - ], - ) - ], + child: Text( + [userFirstName, userLastName] + .where( + (t) => (t != null || t != "")) + .toList() + .join(" "), + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + ), ), padding: EdgeInsets.only(left: 16), ), diff --git a/LabelStoreMax/lib/resources/pages/account_profile_update.dart b/LabelStoreMax/lib/resources/pages/account_profile_update.dart index ccbee42..29a4ff5 100644 --- a/LabelStoreMax/lib/resources/pages/account_profile_update.dart +++ b/LabelStoreMax/lib/resources/pages/account_profile_update.dart @@ -108,7 +108,7 @@ class _AccountProfileUpdatePageState extends State { padding: EdgeInsets.only(top: 10), ), PrimaryButton( - title: trans("Update details"), + title: trans("Update Details"), isLoading: isLoading, action: _updateDetails, ) diff --git a/LabelStoreMax/lib/resources/pages/account_register.dart b/LabelStoreMax/lib/resources/pages/account_register.dart index d06e210..d39b14b 100644 --- a/LabelStoreMax/lib/resources/pages/account_register.dart +++ b/LabelStoreMax/lib/resources/pages/account_register.dart @@ -114,7 +114,7 @@ class _AccountRegistrationPageState extends NyState { child: InkWell( child: RichText( text: TextSpan( - text: '${trans("By tapping \"Register\" you agree to ")} ${AppHelper.instance.appConfig!.appName!}\'s', + text: '${trans("By tapping \"Register\" you agree to ")} ${AppHelper.instance.appConfig!.appName!}\'s ', children: [ TextSpan( text: trans("terms and conditions"), diff --git a/LabelStoreMax/lib/resources/pages/home_search.dart b/LabelStoreMax/lib/resources/pages/home_search.dart index 87ad030..84413cb 100644 --- a/LabelStoreMax/lib/resources/pages/home_search.dart +++ b/LabelStoreMax/lib/resources/pages/home_search.dart @@ -56,11 +56,8 @@ class _HomeSearchPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - child: Icon(Icons.search, size: 36), - margin: EdgeInsets.only(bottom: 20), - ), TextField( + decoration: InputDecoration(prefixIcon: Icon(Icons.search)), controller: _txtSearchController, style: Theme.of(context).textTheme.headline3, keyboardType: TextInputType.text, @@ -68,8 +65,8 @@ class _HomeSearchPageState extends State { autofocus: true, textCapitalization: TextCapitalization.sentences, ), - Padding( - padding: const EdgeInsets.only(top: 10), + Container( + margin: EdgeInsets.only(top: 10), child: PrimaryButton( title: trans("Search"), action: _actionSearch, diff --git a/LabelStoreMax/lib/resources/widgets/account_detail_settings_widget.dart b/LabelStoreMax/lib/resources/widgets/account_detail_settings_widget.dart index f84e2f0..e33fe21 100644 --- a/LabelStoreMax/lib/resources/widgets/account_detail_settings_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/account_detail_settings_widget.dart @@ -49,7 +49,7 @@ class AccountDetailSettingsWidget extends StatelessWidget { Card( child: ListTile( leading: Icon(Icons.no_accounts_rounded), - title: Text("Delete Account"), + title: Text(trans("Delete Account")), onTap: () => Navigator.pushNamed(context, "/account-delete"), ), diff --git a/LabelStoreMax/lib/resources/widgets/customer_address_input.dart b/LabelStoreMax/lib/resources/widgets/customer_address_input.dart index e938200..f607c16 100644 --- a/LabelStoreMax/lib/resources/widgets/customer_address_input.dart +++ b/LabelStoreMax/lib/resources/widgets/customer_address_input.dart @@ -100,7 +100,7 @@ class CustomerAddressInput extends StatelessWidget { children: [ Flexible( child: TextEditingRow( - heading: "Phone Number", + heading: trans("Phone Number"), controller: txtControllerPhoneNumber, keyboardType: TextInputType.phone, ), diff --git a/LabelStoreMax/lib/resources/widgets/home_drawer_widget.dart b/LabelStoreMax/lib/resources/widgets/home_drawer_widget.dart index f885d00..553dd12 100644 --- a/LabelStoreMax/lib/resources/widgets/home_drawer_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/home_drawer_widget.dart @@ -174,7 +174,7 @@ class _HomeDrawerWidgetState extends State { .bodyText2! .copyWith(fontSize: 16)), leading: Image.asset( - getImageAsset(socialLink.key) + '.png', + '${getImageAsset(socialLink.key)}.png', height: 25, width: 25), onTap: () async =>