Fix some UI issues

This commit is contained in:
Jean-Matthieu DECHRISTE 2022-08-25 14:25:15 +02:00
parent faa62bb9ad
commit 8b218d45d4
6 changed files with 33 additions and 43 deletions

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",
desc: 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",
desc: 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",
desc: 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",
desc: trans("Debit or Credit Card"),
assetImage: "razorpay.png",
pay: razorPay,
),

View File

@ -158,25 +158,15 @@ class _AccountDetailPageState extends State<AccountDetailPage>
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(" "),
Flexible(
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

@ -62,7 +62,7 @@ class _AccountProfileUpdatePageState extends State<AccountProfileUpdatePage> {
return Scaffold(
appBar: AppBar(
title: Text(
trans("Update Details"),
trans("Update details"),
style: TextStyle(
fontSize: 20,
),
@ -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

@ -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,13 +65,11 @@ class _HomeSearchPageState extends State<HomeSearchPage> {
autofocus: true,
textCapitalization: TextCapitalization.sentences,
),
Padding(
padding: const EdgeInsets.only(top: 10),
child: PrimaryButton(
const SizedBox(height: 10),
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

@ -71,12 +71,6 @@ class CustomerAddressInput extends StatelessWidget {
controller: txtControllerAddressLine,
),
),
Flexible(
child: TextEditingRow(
heading: trans("City"),
controller: txtControllerCity,
),
),
],
),
Row(
@ -87,6 +81,16 @@ class CustomerAddressInput extends StatelessWidget {
controller: txtControllerPostalCode,
),
),
Flexible(
child: TextEditingRow(
heading: trans("City"),
controller: txtControllerCity,
),
),
],
),
Row(
children: <Widget>[
Flexible(
child: TextEditingRow(
heading: trans("Email address"),
@ -100,7 +104,7 @@ class CustomerAddressInput extends StatelessWidget {
children: <Widget>[
Flexible(
child: TextEditingRow(
heading: "Phone Number",
heading: trans("Phone Number"),
controller: txtControllerPhoneNumber,
keyboardType: TextInputType.phone,
),