update ui

This commit is contained in:
tzw
2025-04-02 17:07:09 +06:30
parent f1c5342ae4
commit 73ad5603ba
5 changed files with 71 additions and 65 deletions

View File

@@ -9,7 +9,7 @@ plugins {
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
def keystorePropertiesFile = rootProject.file('dev-key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

View File

@@ -18,7 +18,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "com.android.application" version "8.2.1" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
// END: FlutterFire Configuration

View File

@@ -107,8 +107,8 @@ class _HomePageState extends State<HomePage> {
}
_startNotiTimer() async {
var _duration = new Duration(milliseconds: 500);
new Timer.periodic(_duration, (t) => displayNoti(t));
var _duration = Duration(milliseconds: 500);
Timer.periodic(_duration, (t) => displayNoti(t));
}
void displayNoti(Timer timer) async {
@@ -388,15 +388,15 @@ class _HomePageState extends State<HomePage> {
final fcsToggle = ToggleButtons(
selectedColor: Colors.white,
color: Colors.blue,
children: <Widget>[
Icon(MaterialCommunityIcons.account_tie, size: 25),
],
onPressed: (i) => this.setState(() {
onPressed: (i) => setState(() {
isFcs[0] = !isFcs[0];
SharedPref.saveStaffMode(isFcs[0]);
}),
isSelected: isFcs,
selectedBorderColor: Colors.white24,
children: <Widget>[
Icon(MaterialCommunityIcons.account_tie, size: 25),
],
);
final signinBtn = TextButton(
@@ -459,12 +459,14 @@ class _HomePageState extends State<HomePage> {
),
);
var searchInput = Row(children: [
var searchInput = Padding(
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 10, top: 5),
child: Row(children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(bottom: 3, left: 5, right: 5, top: 3),
padding: const EdgeInsets.only(),
child: Theme(
data: new ThemeData(
data: ThemeData(
primaryColor: primaryColor,
primaryColorDark: primaryColor,
),
@@ -472,33 +474,26 @@ class _HomePageState extends State<HomePage> {
style: TextStyle(color: Colors.white),
controller: _searchCtl,
scrollPadding: EdgeInsets.all(0),
decoration: new InputDecoration(
cursorColor: Colors.white,
decoration: InputDecoration(
enabledBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide:
const BorderSide(color: Colors.white, width: 1.5),
borderSide: BorderSide(color: Colors.white60, width: 1.5),
),
focusedBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide:
const BorderSide(color: Colors.white, width: 1.5),
borderSide: BorderSide(color: Colors.white60, width: 1.5),
),
contentPadding: EdgeInsets.only(top: 1, bottom: 1),
isDense: true,
hintText: getLocalString(context, "home.search"),
hintStyle: languageModel.isEng
? newLabelStyle(color: Colors.white60)
: newLabelStyleMM(color: Colors.white60),
prefixIcon: const Icon(
Icons.search,
color: Colors.grey,
),
? newLabelStyle(color: Colors.grey)
: newLabelStyleMM(color: Colors.grey),
prefixIcon: const Icon(Icons.search, color: Colors.grey),
suffixIcon: InkWell(
onTap: () => {_searchCtl.clear()},
child: const Icon(
Icons.close,
color: Colors.grey,
),
child: const Icon(Icons.close, color: Colors.grey),
),
suffixStyle: const TextStyle(color: primaryColor)),
),
@@ -506,6 +501,7 @@ class _HomePageState extends State<HomePage> {
),
),
InkWell(
onTap: _lookup,
child: Padding(
padding: const EdgeInsets.all(10.0),
child: LocalText(
@@ -514,9 +510,9 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
),
onTap: _lookup,
)
]);
]),
);
widgets.insert(0, searchInput);
return LocalProgress(
@@ -528,8 +524,8 @@ class _HomePageState extends State<HomePage> {
elevation: 0,
backgroundColor: primaryColor,
title: ClipRRect(
borderRadius: BorderRadius.circular(30.0),
child: Image.asset("assets/logo.jpg", height: 40),
borderRadius: new BorderRadius.circular(30.0),
),
actions: login
? user.isCustomer()
@@ -557,6 +553,7 @@ class _HomePageState extends State<HomePage> {
),
child: ListView(
children: <Widget>[
const SizedBox(height: 10),
Column(children: [
Wrap(
alignment: WrapAlignment.center,

View File

@@ -112,6 +112,11 @@ class _SmsCodePageState extends State<SmsCodePage> {
padding: EdgeInsets.only(top: 20, left: 20, right: 20),
child: PinInputTextField(
pinLength: 6,
cursor: Cursor(
color: primaryColor,
enabled: true,
width: 2,
height: 23),
decoration: BoxLooseDecoration(
strokeColorBuilder: PinListenColorBuilder(
primaryColor, Colors.grey.shade400)),

View File

@@ -90,6 +90,7 @@ class _TermEditorState extends State<TermEditor> {
title:
LocalText(context, 'term', fontSize: 20, color: primaryColor),
bottom: TabBar.secondary(
dividerColor: Colors.grey.shade400,
indicatorColor: primaryColor,
labelColor: primaryColor,
labelStyle:
@@ -117,14 +118,16 @@ class _TermEditorState extends State<TermEditor> {
children: [
isEdit
? Padding(
padding: const EdgeInsets.all(15),
padding: const EdgeInsets.only(
left: 15, right: 15, top: 20, bottom: 8),
child: TextField(
autofocus: true,
controller: enController,
style: TextStyle(
fontSize: 15, color: Colors.black87),
decoration: const InputDecoration(
border: InputBorder.none),
border: InputBorder.none,
),
cursorColor: primaryColor,
keyboardType: TextInputType.multiline,
maxLines: null,
@@ -149,7 +152,8 @@ class _TermEditorState extends State<TermEditor> {
),
isEdit
? Padding(
padding: const EdgeInsets.all(15),
padding: const EdgeInsets.only(
left: 15, right: 15, top: 20, bottom: 8),
child: TextField(
style: TextStyle(
fontSize: 14, color: Colors.black87),