Field.picker constructor
Field.picker(
- String key, {
- dynamic value,
- FormValidator? validate,
- bool autofocus = false,
- String? dummyData,
- Widget? header,
- TextStyle? titleStyle,
- dynamic style,
- Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, - required List<
String> options, - BottomModalSheetStyle? bottomModalSheetStyle,
Field.picker is a constructor that helps in managing picker fields
Implementation
Field.picker(
this.key, {
this.value,
this.validate,
this.autofocus = false,
this.dummyData,
this.header,
this.footer,
this.titleStyle,
this.style,
this.metaData = const {},
this.hidden = false,
required List<String> options,
BottomModalSheetStyle? bottomModalSheetStyle,
}) : cast = FormCast.picker(
options: options, bottomModalSheetStyle: bottomModalSheetStyle) {
if (style == null) return;
metaData = {};
if (style is String) {
style = style;
return;
}
if (style is Map) {
style as Map<String, dynamic>;
metaData!["decoration_style"] =
(style as Map<String, dynamic>).entries.first.value;
style = (style as Map<String, dynamic>).entries.first.key;
}
}