StringIdText class
Represents an item with an ID and text display value.
This class is commonly used for dropdown items, selection lists, and other UI components where you need both an identifier and a display value.
Constructors
- StringIdText(String id, String text)
-
Creates a new StringIdText with the given
idandtext. - StringIdText.empty()
- Creates an empty StringIdText with empty id and text.
-
StringIdText.fromJson(Map<
String, dynamic> map) -
Creates a StringIdText from a JSON map.
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this object to a JSON map.
-
toMap(
) → Map< String, dynamic> - Converts this object to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
findAllById(
List< StringIdText> stringIdTexts, List<String> ids) → List<StringIdText> -
Finds all StringIdText items matching the given list of
ids. -
findById(
List< StringIdText> stringIdTexts, String? id) → StringIdText? -
Finds a StringIdText in the list by its
id. -
listFrom(
List? list) → List< StringIdText> - Converts a list of dynamic JSON objects to a list of StringIdText.
-
nullableFromJson(
Map< String, dynamic> ? map) → StringIdText? - Creates a nullable StringIdText from a nullable JSON map.
-
nullableListFrom(
List? list) → List< StringIdText> ? - Converts a nullable list of dynamic JSON objects to a nullable list of StringIdText.