1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import 'package:fis_ui/index.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- /// 配置项的输入框
- class FConfigureInput extends FStatelessWidget {
- /// 输入框提示
- final String? hintText;
- /// 校验
- final List<TextInputFormatter>? inputFormatters;
- /// 文本控制器
- final TextEditingController? textController;
- /// 输入框文本输入
- final ValueCallback? onChanged;
- /// 只读
- final bool? readOnly;
- /// 禁用
- final bool? enabled;
- FConfigureInput({
- this.hintText,
- this.inputFormatters,
- this.textController,
- this.onChanged,
- this.readOnly,
- this.enabled,
- });
- @override
- FWidget build(BuildContext context) {
- return FBorderInput(
- hintSize: 16,
- contentSize: 16,
- maxLength: 20,
- height: 40,
- hintText: hintText,
- inputFormatters: inputFormatters,
- borderColor: Color(0xffdcdfe6),
- onChanged: (value) => onChanged!(value),
- readOnly: readOnly ?? false,
- enabled: enabled ?? false,
- controller: textController,
- );
- }
- }
|