123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
-
-
- import 'package:flutter/material.dart';
- import 'package:flutter/src/widgets/framework.dart';
- import 'package:flutter_easyloading/flutter_easyloading.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:farmer_client/widgets/layout/BasicPage.dart';
-
- import 'package:farmer_client/utils/timer.dart';
- import 'package:farmer_client/widgets/DefaultButton.dart';
-
- class ResetPassword extends BasicPage {
- ResetPassword({Key? key}) : super(key: key) {
- naviTitle = '修改密码';
- }
-
- @override
- Widget builder(BuildContext context) {
- return Container(
- padding: EdgeInsets.all(15.w),
- decoration: const BoxDecoration(color: Colors.white),
- child: Column(
- children: [
- Expanded(
- flex: 1,
- child: ListView(
- children: [
- Container(
- width: 345.w,
- alignment: Alignment.centerLeft,
- margin: EdgeInsets.only(top: 40.h),
- decoration: BoxDecoration(
- color: Colors.white,
- boxShadow: [
- BoxShadow(
- color: const Color(0x1f000000),
- offset: Offset(0, 1.w))
- ],
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- '原始密码:',
- style: TextStyle(
- color: const Color(0xFF333333),
- fontSize: 17.sp,
- fontWeight: FontWeight.bold,
- letterSpacing: 2),
- ),
- Container(
- height: 54.h,
- alignment: Alignment.centerLeft,
- child: Row(
- children: [
- Expanded(
- flex: 1,
- child: TextField(
- style: TextStyle(
- fontSize: 17.sp,
- fontWeight: FontWeight.bold,
- color: const Color(0xff333333)),
- decoration: const InputDecoration(
- isCollapsed: true,
- hintText: '请输入原始密码',
- counterText: '', //去掉右下角的东西
- border: InputBorder.none,
- floatingLabelBehavior:
- FloatingLabelBehavior.never,
- ),
- onChanged: (val) {
- },
- ),
- ),
- GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {},
- child: Container(
- width: 50.w,
- alignment: Alignment.center,
- child: Image.asset(
- 'images/icons/cancel.png',
- width: 18.w,
- ),
- ),
- )
- ],
- ),
- ),
- ],
- ),
- ),
- Container(
- width: 345.w,
- alignment: Alignment.centerLeft,
- margin: EdgeInsets.only(top: 40.h),
- decoration: BoxDecoration(
- color: Colors.white,
- boxShadow: [
- BoxShadow(
- color: Color(0x1f000000), offset: Offset(0, 1.w))
- ],
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- '新密码:',
- style: TextStyle(
- color: const Color(0xFF333333),
- letterSpacing: 2,
- fontSize: 17.sp,
- fontWeight: FontWeight.bold),
- ),
- Container(
- height: 54.h,
- alignment: Alignment.centerLeft,
- child: Row(
- children: [
- Expanded(
- flex: 1,
- child: TextField(
- //赋初值
- maxLength: 11,
- keyboardType: TextInputType.number,
- style: TextStyle(
- fontSize: 17.sp,
- fontWeight: FontWeight.bold,
- color: const Color(0xff333333)),
- decoration: const InputDecoration(
- isCollapsed: true,
- hintText: '请输入新密码',
- counterText: '', //去掉右下角的东西
- border: InputBorder.none,
- floatingLabelBehavior:
- FloatingLabelBehavior.never,
- ),
- onChanged: (val) {
- },
- ),
- ),
- GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {
- },
- child: Container(
- width: 50.w,
- alignment: Alignment.center,
- child: Image.asset(
- 'images/icons/cancel.png',
- width: 18.w,
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- Padding(
- padding: EdgeInsets.only(bottom: 15.w),
- child: DefaultButton(
- text: '保存',
- color: const Color(0xffffffff),
- backColor: const Color(0xFFFF703B),
- width: 345.w,
- height: 49.h,
- onPressed: () {
- EasyLoading.show(status: '请稍候...');
- setTimeout(() {
- EasyLoading.showToast("网络超时, 请稍后再试");
-
- setTimeout(() {
- EasyLoading.dismiss();
- }, 1500);
- }, 3000);
- },
- margin: const EdgeInsets.all(0),
- fontSize: 20.sp,
- radius: 24.5.w,
- ),
- ),
- ],
- ),
- );
- }
-
- }
|