Advanced form
Advanced form
Different types of advanced forms to get input from user are available in admin panel by flutter code:
Masked input
Slider input
label input
Date picker(Jalali)
Date picker(Gregorian)
Time picker(H/M)
Time picker(H/M/S)
Time picker(AM/PM)
File and folder picker
Color picker
Ring color picker
Masked input:
these are masked input text fields in this panel by flutter code.
the mask_text_input_formatter and pattern_formatter packages are added in pubspec.yaml dependencies as each utility
and is used as:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "IR",
label: "Shaba number:",
maskTextInputFormatter:
MaskTextInputFormatter(
mask: 'IR-(####)-####-####-####-####-####',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),),
You can create your desired mask and filter to creat custom input.
Shaba number input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "IR",
label: AppLocalizations.of(context)!.shabanumberinput,
maskTextInputFormatter: MaskTextInputFormatter(
mask: 'IR-####-####-####-####-####-####',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),
),
Phone number input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "",
label: AppLocalizations.of(context)!.phonenumberinput,
maskTextInputFormatter: MaskTextInputFormatter(
mask: '(###)-##-##-####',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),
),
Date input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "",
label: AppLocalizations.of(context)!.dateinput,
maskTextInputFormatter: MaskTextInputFormatter(
mask: '####/##/##',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),
),
Time input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "",
label: AppLocalizations.of(context)!.timeinput,
maskTextInputFormatter: MaskTextInputFormatter(
mask: '##:##:##',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),
),
Currency input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "",
label: AppLocalizations.of(context)!.currencyinput,
maskTextInputFormatter:
ThousandsFormatter(allowFraction: true),
customController: EditTextController(),
),
Ip address input:
EsMaskedInputTextField(
textAlign: TextAlign.left,
hint: "",
label: AppLocalizations.of(context)!.ipaddressinput,
maskTextInputFormatter: MaskTextInputFormatter(
mask: '###.###.###.###',
filter: {"#": RegExp(r'[0-9]')},
type: MaskAutoCompletionType.lazy),
customController: EditTextController(),
),
Slider input:
these are slider input text fields in this panel by flutter code.
located in:
es_flutter_component/lib/components/es_form/es_slider/es_slider.dart
and is used as:
EsRangeSlider(
min: 2000,
max: 8000,
divisions: 600,
subTitleWidget: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
EsTitle(
"تومان" + _value.start.round().toString(),
),
EsTitle(
"تومان" + _value.end.round().toString(),
),
],
),
onChanged: (values) {
setState(() {
_value = values;
});
},
),
//where
double _value = 0;
label input :
these are label inputs in this panel by flutter code. Some of the components are located in:
es_flutter_component/lib/components/es_form/es_drop_down
and is used as:
EsLabelInput(labelList: labelList2),
//where
List labelList2 = [
{"title": "item1", "_id": "1"},
{"title": "item2", "_id": "2"},
{"title": "item3", "_id": "3"},
{"title": "item4", "_id": "4"},
{"title": "item5", "_id": "5"},
];
Date picker(Jalali):
It is a jalali date picker located in:
es_flutter_component/lib/components/es_form>es_date_time_picker>es_persian_date_picker.dart
and is used as:
EsPersianDatePicker(
title: AppLocalizations.of(context)!.select,
initialTime: DateTime(1300,10,1),
),
Date picker(Gregorian):
It is a Gregorian date picker located in:
es_flutter_component/lib/components/es_form>es_date_time_picker>es_English_date_picker.dart
and is used as:
EsEnglishDatePicker(
title: AppLocalizations.of(context)!.select,
initialTime: DateTime(1300,10,1),
),
Time picker(H/M):
It is a time picker(H/M) located in:
es_flutter_component/lib/components/es_form>es_date_time_picker>es_android_time_picker.dart
and is used as:
EsAndroidTimePicker(
title: AppLocalizations.of(context)!.select,
initialTime: TimeOfDay(hour: 10,minute: 30),
),
Time picker(H/M/S):
It is a time picker(H/M/S) located in:
es_flutter_component/lib/components/es_form>es_date_time_picker>es_cupertino_time_picker.dart
and is used as:
EsCupertinoTimePicker(
title: AppLocalizations.of(context)!.select,
initialTime: TimeOfDay(hour: 7,minute: 7),
),
Time picker(AM/PM):
It is a time picker 12h located in:
es_flutter_component/lib/components/es_form>es_date_time_picker>es_cupertino_12h_time_picker.dart
and is used as:
EsCupertino12HTimePicker(
title: AppLocalizations.of(context)!.select,
initialTime: TimeOfDay(hour: 7,minute: 7),
),
File and folder picker:
It is a file picker located in:
es_flutter_component/lib/components/es_form/es_file_picker/es_file_picker.dart
and is used as:
EsFilePicker(
controller: _filePickerController,
),
//where
EsFilePickerController _filePickerController = EsFilePickerController();
Color picker:
It is a color picker that the flutter_colorpicker package is added in pubspec.yaml 's dependencies
and is used as:
EsColorPicker(title: AppLocalizations.of(context)!.selectcolor,)),
Ring color picker:
It is a color picker that the flutter_colorpicker package is added in pubspec.yaml 's dependencies
and is used as:
EsRingColorPicker(
title: AppLocalizations.of(context)!.selectcolor,)