update ui
This commit is contained in:
@@ -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,64 +459,60 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
);
|
||||
|
||||
var searchInput = Row(children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 3, left: 5, right: 5, top: 3),
|
||||
child: Theme(
|
||||
data: new ThemeData(
|
||||
primaryColor: primaryColor,
|
||||
primaryColorDark: primaryColor,
|
||||
),
|
||||
child: TextField(
|
||||
style: TextStyle(color: Colors.white),
|
||||
controller: _searchCtl,
|
||||
scrollPadding: EdgeInsets.all(0),
|
||||
decoration: new InputDecoration(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide:
|
||||
const BorderSide(color: Colors.white, width: 1.5),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide:
|
||||
const BorderSide(color: Colors.white, 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,
|
||||
),
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => {_searchCtl.clear()},
|
||||
child: const Icon(
|
||||
Icons.close,
|
||||
color: Colors.grey,
|
||||
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(),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
primaryColor: primaryColor,
|
||||
primaryColorDark: primaryColor,
|
||||
),
|
||||
child: TextField(
|
||||
style: TextStyle(color: Colors.white),
|
||||
controller: _searchCtl,
|
||||
scrollPadding: EdgeInsets.all(0),
|
||||
cursorColor: Colors.white,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide: BorderSide(color: Colors.white60, width: 1.5),
|
||||
),
|
||||
),
|
||||
suffixStyle: const TextStyle(color: primaryColor)),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
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.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),
|
||||
),
|
||||
suffixStyle: const TextStyle(color: primaryColor)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"home.search.btn",
|
||||
color: Colors.white,
|
||||
InkWell(
|
||||
onTap: _lookup,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"home.search.btn",
|
||||
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,
|
||||
|
||||
@@ -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)),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user