DBMemberControl class

A general database control object that guides the group translation in how to create the UI widgets.

Implementers

Constructors

DBMemberControl({required ModificationTracker tracker, required Entity entity, required int index, dynamic controller, String? hint, bool obscure = false, bool asInt = false, bool checkbox = false, bool readOnly = false, String? label, List<String>? completeValues})
Construct a general database member control object.

Properties

asInt bool
Forces the value to be treated as an int if it is a double.
getter/setter pair
checkbox bool
Use a Checkbox (instead of a Switch) for boolean database members.
getter/setter pair
completeValues List<String>?
A list of values to provide as completion to text entered into a TextField.
getter/setter pair
controller → dynamic
If applicable, this is the TextEditingController associated with this DBMember. Not all DBMembers will need a controller.
final
entity → Entity
The storage object for modification.
final
fromDisplay ↔ dynamic Function(dynamic v)
A function to convert from the display value to a value suitable for storage in the database.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hint String?
This stores the text hint for TextFields when used.
getter/setter pair
index int
The index into the data members of the Entity object. In general, there is a DBMemberControl for each DBMember.
final
label String?
A label is optional and will be displayed after a TextField, if available.
getter/setter pair
member → DBMember
Return the database member associated with this control object.
no setter
obscure bool
Tells the TextField whether or not to obscure the text.
getter/setter pair
readOnly bool
If true, make this member read-only.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toDisplay ↔ dynamic Function(dynamic v)
A function to convert from the stored value to a display value.
getter/setter pair

Methods

addListener(dynamic listener()) → void
Add a listener to this control object.
callListeners() → void
Call each listener attached to this control object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(dynamic value) → void
Use this to set the value of the database member and cause the attached listeners to be called.
setController(dynamic value) → void
This can be overridden if the default string representation of the value is not suitable for display.
setValue(dynamic value) → void
This can be overridden if the value needs to be transformed in some way before being assigned to the database member. Be sure to call callListeners() in your implementation!
splitWords(String start) String
This is a utility method for splitting a label-type string into separate space separated words.
toString() String
A string representation of this object.
inherited

Operators

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