SDUIInput class

Descriptor of a form Input

JSON Attributes

  • name: REQUIRED. This should be the name of the input field
  • type: Type of input field. The possible values are:
    • text: Free text (Default)
    • url
    • email
    • number
    • phone: Phone number
    • date: Date
    • time: Time
    • image
    • video
    • 'file'
  • value: Default value.
    • When type=date, the format should be yyyy-MM-dd (Ex: 2020-07-30)
    • When type=time, the format should be HH:mm (Ex: 23:30)
    • When type=phone, the format should be in E.164 format (Ex: +442087712924)
  • hideText: if true, the input text will be hide. (Default: false)
  • caption: Title of the input
  • hint: Help test for users
  • required: if true, validation will be fired to ensure that the field has a value
  • readOnly: if true, the field will not be editable (Default: false)
  • maxLength: Maximum length of the field
  • maxLine: Maximum number of line (for multi-line input)
  • minLength: Minimum length of the field (Default: 0)
  • initialCountry: Initial country - for type=phone
  • countries: List of country codes - for type=phone
  • uploadUrl: URL where to upload the file. For type=image or type=video
  • imageSource: From where to get the image or video. For type=image or type=video. The possible values
    • camera: Default
    • gallery
  • imageMaxWidth: Image max width
  • imageMaxHeight: Image max width
  • videoMaxDuration: Video max width in seconds
  • prefix: Prefix in the input field
  • suffix: Suffix in the input field
  • action**: SDUIAction to execute when the input is clicked
Inheritance
Mixed-in types

Constructors

SDUIInput()

Properties

action SDUIAction
getter/setter pairinherited
caption String?
getter/setter pair
children List<SDUIWidget>
getter/setter pairinherited
countries List<String>?
getter/setter pair
enabled bool
getter/setter pair
formKey GlobalKey<FormState>?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hideText bool
getter/setter pair
hint String?
getter/setter pair
id String?
getter/setter pairinherited
imageMaxHeight int?
getter/setter pair
imageMaxWidth int?
getter/setter pair
imageSource String?
getter/setter pair
initialCountry String?
getter/setter pair
inputFormatterRegex String?
getter/setter pair
maxLength int?
getter/setter pair
maxLines int?
getter/setter pair
minLength int
getter/setter pair
name String
getter/setter pair
prefix String?
getter/setter pair
provider SDUIFormDataProvider?
getter/setter pairinherited
readOnly bool
getter/setter pair
required bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix String?
getter/setter pair
type String
getter/setter pair
uploadUrl String?
getter/setter pair
value String?
getter/setter pair
videoMaxDuration int?
getter/setter pair

Methods

attachForm(GlobalKey<FormState> formKey, SDUIFormDataProvider provider) → void
inherited
attachPageController(PageController? controller) → void
inherited
attachScreen(SDUIWidget screen) → void
inherited
child() SDUIWidget?
Return the first child
inherited
childrenWidgets(BuildContext context) List<Widget>
Return the list of children Widget
inherited
fromJson(Map<String, dynamic>? json) SDUIWidget
Load the attributes of the widget descriptor from
override
hasChildren() bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toAlignment(String? alignment) Alignment?
inherited
toAxis(String? direction) Axis
inherited
toBoxFit(String? fit) BoxFit?
inherited
toClip(String? clip) Clip?
inherited
toColor(String? hexColor) Color?
inherited
toCrossAxisAlignment(String? value) CrossAxisAlignment
inherited
toIcon(String? code, {double? size, String? color}) Widget?
inherited
toIconData(String? code) IconData?
inherited
toMainAxisAlignment(String? value) MainAxisAlignment
inherited
toMainAxisSize(String? value) MainAxisSize
inherited
toString() String
A string representation of this object.
inherited
toTextAlign(String? alignment) TextAlign?
inherited
toWidget(BuildContext context) Widget
Return the associated Widget
override

Operators

operator ==(Object other) bool
The equality operator.
inherited