From c9680ca3ca2f96285e8350675498a31be87aec84 Mon Sep 17 00:00:00 2001 From: tzw Date: Mon, 29 Jan 2024 17:18:23 +0630 Subject: [PATCH] update customer list --- lib/pages/carton/carton_cargo_table.dart | 2 +- lib/pages/customer/customer_list.dart | 66 ++++++++++++----------- lib/pages/customer/invitation_create.dart | 6 +++ lib/pages/signin/signin_page.dart | 19 ++++--- lib/pages/widgets/dialog_input.dart | 1 + lib/pages/widgets/length_picker.dart | 6 ++- 6 files changed, 59 insertions(+), 41 deletions(-) diff --git a/lib/pages/carton/carton_cargo_table.dart b/lib/pages/carton/carton_cargo_table.dart index da7492c..c6f67cf 100644 --- a/lib/pages/carton/carton_cargo_table.dart +++ b/lib/pages/carton/carton_cargo_table.dart @@ -44,7 +44,7 @@ class _CargoTableState extends State { child: DataTable( showCheckboxColumn: false, headingRowHeight: 40, - columnSpacing: 40, + // columnSpacing: 40, decoration: BoxDecoration(border: Border.all(color: Colors.white)), border: TableBorder(horizontalInside: BorderSide(color: Colors.white)), columns: [ diff --git a/lib/pages/customer/customer_list.dart b/lib/pages/customer/customer_list.dart index 8b47e7a..2a12c69 100644 --- a/lib/pages/customer/customer_list.dart +++ b/lib/pages/customer/customer_list.dart @@ -93,7 +93,7 @@ class _CustomerListState extends State { BorderRadius.all(Radius.circular(35.0))), child: Text( customer.initial, - style: TextStyle(fontSize: 30, color: Colors.white), + style: TextStyle(fontSize: 20, color: Colors.white), ), ), ), @@ -109,7 +109,7 @@ class _CustomerListState extends State { child: new Text( customer.name ?? "", style: new TextStyle( - fontSize: 18.0, color: primaryColor), + fontSize: 15.0, color: Colors.black), ), ), Padding( @@ -130,38 +130,44 @@ class _CustomerListState extends State { ), customer.status == user_invited_status ? Padding( - padding: const EdgeInsets.only(right: 8.0), - child: TextButton( - onPressed: () => _share(customer), - style: TextButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20.0), - side: BorderSide(color: primaryColor))), - child: Row( - children: [ - Text( - "Share", - style: TextStyle(fontSize: 12, color: primaryColor), - ), - Icon(Icons.share, color: primaryColor), - ], + padding: const EdgeInsets.only(right: 10.0), + child: SizedBox( + height: 30, + child: TextButton( + onPressed: () => _share(customer), + style: TextButton.styleFrom( + padding: EdgeInsets.all(0), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + side: BorderSide( + color: primaryColor.withOpacity(0.2)))), + child: Row( + children: [ + Text( + "Share", + style: + TextStyle(fontSize: 12, color: primaryColor), + ), + Icon(Icons.share, color: primaryColor, size: 17), + ], + ), ), ), ) : Container(), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.only(right: 5), - child: _status(customer.status ?? ""), - ), - Padding( - padding: const EdgeInsets.only(right: 5), - child: Text(customer.getLastMessageTime), - ), - getCount(customer), - ], + Padding( + padding: const EdgeInsets.only(right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + _status(customer.status ?? ""), + Text( + customer.getLastMessageTime, + style: TextStyle(color: Colors.grey, fontSize: 12), + ), + getCount(customer), + ], + ), ), ], ), diff --git a/lib/pages/customer/invitation_create.dart b/lib/pages/customer/invitation_create.dart index b2f9002..ac40275 100644 --- a/lib/pages/customer/invitation_create.dart +++ b/lib/pages/customer/invitation_create.dart @@ -1,3 +1,5 @@ +import 'dart:ui'; + import 'package:country_code_picker/country_code_picker.dart'; import 'package:fcs/helpers/theme.dart'; import 'package:fcs/pages/customer/model/customer_model.dart'; @@ -84,6 +86,10 @@ class _InvitationCreateState extends State { showOnlyCountryWhenClosed: false, alignLeft: false, textStyle: TextStyle(fontSize: 16, color: Colors.black87), + searchDecoration: InputDecoration( + focusedBorder: UnderlineInputBorder( + borderSide: + BorderSide(color: Colors.black, width: 1.0))), ), ), SizedBox( diff --git a/lib/pages/signin/signin_page.dart b/lib/pages/signin/signin_page.dart index 2153805..8879658 100644 --- a/lib/pages/signin/signin_page.dart +++ b/lib/pages/signin/signin_page.dart @@ -74,14 +74,17 @@ class _SigninPageState extends State { border: Border.all(color: Colors.grey.shade400, width: 1), borderRadius: BorderRadius.all(Radius.circular(12.0))), child: CountryCodePicker( - onChanged: _countryChange, - initialSelection: dialCode, - countryFilter: ['mm', 'us'], - showCountryOnly: false, - showOnlyCountryWhenClosed: false, - alignLeft: false, - textStyle: TextStyle(fontSize: 16, color: Colors.black87), - ), + onChanged: _countryChange, + initialSelection: dialCode, + countryFilter: ['mm', 'us'], + showCountryOnly: false, + showOnlyCountryWhenClosed: false, + alignLeft: false, + textStyle: TextStyle(fontSize: 16, color: Colors.black87), + searchDecoration: InputDecoration( + focusedBorder: UnderlineInputBorder( + borderSide: + BorderSide(color: Colors.black, width: 1.0)))), ), SizedBox( width: 10, diff --git a/lib/pages/widgets/dialog_input.dart b/lib/pages/widgets/dialog_input.dart index 708ee05..93d9b1f 100644 --- a/lib/pages/widgets/dialog_input.dart +++ b/lib/pages/widgets/dialog_input.dart @@ -51,6 +51,7 @@ class _DialogInputState extends State { controller: _controller, focusNode: _focusNode, autofocus: true, + cursorColor: primaryColor, keyboardType: TextInputType.numberWithOptions(decimal: true), decoration: new InputDecoration( focusedBorder: UnderlineInputBorder( diff --git a/lib/pages/widgets/length_picker.dart b/lib/pages/widgets/length_picker.dart index 09a9f89..ab51704 100644 --- a/lib/pages/widgets/length_picker.dart +++ b/lib/pages/widgets/length_picker.dart @@ -133,6 +133,7 @@ class _LengthPickerDialogState extends State { onChanged: _updateInputInch, textAlign: TextAlign.center, controller: inchInputController, + cursorColor: primaryColor, keyboardType: TextInputType.numberWithOptions( signed: false, decimal: true), decoration: new InputDecoration( @@ -176,7 +177,7 @@ class _LengthPickerDialogState extends State { ) ], ); - final feetBox = Column( + final feetBox = Column( children: [ Text("Feet"), Row( @@ -188,6 +189,7 @@ class _LengthPickerDialogState extends State { controller: feetInputController, keyboardType: TextInputType.numberWithOptions( signed: false, decimal: true), + cursorColor: primaryColor, decoration: new InputDecoration( contentPadding: EdgeInsets.all(10), isDense: true, @@ -286,7 +288,7 @@ class _LengthPickerDialogState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top: 8.0, left: 8), + padding: const EdgeInsets.only(top: 8.0, left: 15), child: LocalText( context, "inch",