Commit ac4c07fb authored by skeyboy's avatar skeyboy

订阅修改、登录页输入框键盘样式优化

parent e795f058
class MultiClickUtil {
const MultiClickUtil._();
static DateTime? _lastClickTime;
/*
* 判断是否为重复点击
* 可用于Gesture的onTap函数中拦截
* */
static bool isMultiClick({int intervalMilliseconds = 500}) {
if (_lastClickTime == null ||
DateTime.now().difference(_lastClickTime!) >
Duration(milliseconds: intervalMilliseconds)) {
_lastClickTime = DateTime.now();
return false;
} else {
return true;
}
}
}
......@@ -7,3 +7,4 @@ export 'iconfont.dart';
export 'date.dart';
export 'logger.dart';
export 'loading.dart';
export 'multi_click_util.dart';
......@@ -195,14 +195,14 @@ class PayItemWidget extends GetView<AndroidPayListController> {
Obx(
() => Container(
width: Get.width,
height: 150,
margin: const EdgeInsets.all(10),
child: ListView(
shrinkWrap: true,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
children: controller.state.items
child: IntrinsicHeight(
child: Row(
children: controller.state.items.reversed
.map((element) => Container(
margin: const EdgeInsets.only(right: 20),
margin: const EdgeInsets.only(right: 10),
child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: () {
......@@ -212,22 +212,23 @@ class PayItemWidget extends GetView<AndroidPayListController> {
},
child: Ink(
padding: const EdgeInsets.symmetric(
horizontal: 15, vertical: 20),
horizontal: 5, vertical: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
// border: ,Color.argb(255, 62, 67, 95)
border: Border.all(
width: 1,
color: (controller.state.selectedItem
.id ??
color: (controller.state
.selectedItem.id ??
0) ==
(element.id ?? 0)
? const Color.fromARGB(0, 0, 0, 0)
? const Color.fromARGB(
0, 0, 0, 0)
: const Color.fromARGB(
255, 90, 82, 91)),
gradient: LinearGradient(
colors:
(controller.state.selectedItem.id ??
colors: (controller.state.selectedItem
.id ??
0) ==
(element.id ?? 0)
? [
......@@ -247,37 +248,63 @@ class PayItemWidget extends GetView<AndroidPayListController> {
end: Alignment.bottomCenter,
)),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
element.goodsName!,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state.selectedItem.id ==
color: controller.state
.selectedItem.id ==
element.id
? Color.fromARGB(255, 23, 17, 7)
? Color.fromARGB(
255, 23, 17, 7)
: Colors.white),
),
Text(
'¥${element.amount!}',
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state.selectedItem.id ==
color: controller.state
.selectedItem.id ==
element.id
? Color.fromARGB(255, 230, 31, 32)
: Color.fromARGB(
? const Color.fromARGB(
255, 230, 31, 32)
: const Color.fromARGB(
255, 241, 197, 131)),
),
Container(
width: Get.width * 0.6,
child: Text(
element.goodsDesc!,
width: Get.width / 3.5,
child: Column(
children: element.goodsDesc!
.split('、')
.map((e) => Text(
e,
textAlign:
TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state.selectedItem.id ==
fontWeight:
FontWeight.bold,
color: controller
.state
.selectedItem
.id ==
element.id
? Color.fromARGB(255, 230, 31, 32)
: Color.fromARGB(
255, 241, 197, 131)),
? const Color
.fromARGB(
255,
230,
31,
32)
: const Color
.fromARGB(
255,
241,
197,
131)),
))
.toList(),
),
),
// Text(
......@@ -304,8 +331,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
// ]),
// ))
],
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
),
),
),
......@@ -314,6 +339,8 @@ class PayItemWidget extends GetView<AndroidPayListController> {
),
),
),
),
),
Container(
margin: const EdgeInsets.only(top: 10, bottom: 10),
padding: const EdgeInsets.symmetric(horizontal: 10),
......@@ -514,7 +541,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
......
......@@ -641,7 +641,7 @@ class SignInPage extends GetView<SignInController> {
children: [
TextFormField(
controller: controller.mobileMemberController,
keyboardType: TextInputType.emailAddress,
keyboardType: TextInputType.phone,
textInputAction: TextInputAction.next,
cursorColor: kPrimaryColor,
onSaved: (email) {},
......@@ -658,6 +658,7 @@ class SignInPage extends GetView<SignInController> {
vertical: defaultPadding),
child: TextFormField(
controller: controller.codeController,
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
obscureText: true,
cursorColor: kPrimaryColor,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment