49 lines
1.6 KiB
Dart
49 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
class ForgetPwdInput extends StatelessWidget {
|
|
TextEditingController controller;
|
|
List<TextInputFormatter> inputFormatters;
|
|
TextInputType keyboardType;
|
|
String hintText;
|
|
String label;
|
|
Widget rightSlot;
|
|
bool isPwd;
|
|
ForgetPwdInput({Key key,this.rightSlot,this.isPwd,this.label,this.hintText,this.keyboardType,this.inputFormatters, @required this.controller}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width: 90.w, height: 40.w,),
|
|
Expanded(
|
|
child: TextField(
|
|
//输入框一行
|
|
maxLines: 1,
|
|
// controller: _controller,
|
|
autofocus: false,
|
|
decoration: InputDecoration(
|
|
//输入里面输入文字内边距设置
|
|
contentPadding: const EdgeInsets.only(
|
|
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
|
hintText: hintText,
|
|
//不需要输入框下划线
|
|
border: InputBorder.none,
|
|
),
|
|
),
|
|
),
|
|
rightSlot??const SizedBox(width: 0,height: 0)
|
|
],
|
|
),
|
|
),
|
|
Container(height: 0.5.h, color: Colors.grey,),
|
|
],
|
|
);
|
|
}
|
|
}
|