ui tweaks

This commit is contained in:
Anthony 2022-09-23 08:57:08 +08:00
parent f94a3e2fb5
commit 6dd9b73f9a
11 changed files with 28 additions and 42 deletions

View File

@ -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,

View File

@ -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());

View File

@ -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,
);

View File

@ -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<PaymentType> 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<PaymentType> 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<PaymentType> 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<PaymentType> 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<PaymentType> 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",
// ),

View File

@ -154,30 +154,16 @@ class _AccountDetailPageState extends State<AccountDetailPage>
),
Expanded(
child: Padding(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceAround,
children: <Widget>[
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),
),

View File

@ -108,7 +108,7 @@ class _AccountProfileUpdatePageState extends State<AccountProfileUpdatePage> {
padding: EdgeInsets.only(top: 10),
),
PrimaryButton(
title: trans("Update details"),
title: trans("Update Details"),
isLoading: isLoading,
action: _updateDetails,
)

View File

@ -114,7 +114,7 @@ class _AccountRegistrationPageState extends NyState<AccountRegistrationPage> {
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>[
TextSpan(
text: trans("terms and conditions"),

View File

@ -56,11 +56,8 @@ class _HomeSearchPageState extends State<HomeSearchPage> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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<HomeSearchPage> {
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,

View File

@ -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"),
),

View File

@ -100,7 +100,7 @@ class CustomerAddressInput extends StatelessWidget {
children: <Widget>[
Flexible(
child: TextEditingRow(
heading: "Phone Number",
heading: trans("Phone Number"),
controller: txtControllerPhoneNumber,
keyboardType: TextInputType.phone,
),

View File

@ -174,7 +174,7 @@ class _HomeDrawerWidgetState extends State<HomeDrawerWidget> {
.bodyText2!
.copyWith(fontSize: 16)),
leading: Image.asset(
getImageAsset(socialLink.key) + '.png',
'${getImageAsset(socialLink.key)}.png',
height: 25,
width: 25),
onTap: () async =>