DataDisplayBuilder<T> class
sealed
A sealed class that defines how a piece of data should be displayed.
You can either use a pre-defined string builder or a custom widget builder.
See DataDisplayBuilderString for a pre-defined string builder, or
DataDisplayBuilderWidget for a custom widget builder.
- Available extensions
- Annotations
-
- @freezed
Constructors
- DataDisplayBuilder.custom({required Widget builder(BuildContext context, T data, void delete())})
-
A custom widget builder that can be used to display a piece of data.
constfactory
- DataDisplayBuilder.string({required String labelBuilder(T data), Color? backgroundColor, TextStyle? labelStyle, OutlinedBorder? shape, Color? deleteIconColor, Widget? deleteIcon, Widget? avatar, BoxConstraints? avatarBoxConstraints, EdgeInsetsGeometry? labelPadding, @Default.new(BorderSide.none) BorderSide side})
-
A pre-defined string builder that can be used to display a piece of data.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult string(DataDisplayBuilderString< T> value), required TResult custom(DataDisplayBuilderWidget<T> value)}) → TResult -
Available on DataDisplayBuilder<
AT> , provided by the DataDisplayBuilderPatterns extensionswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? string(DataDisplayBuilderString< T> value)?, TResult? custom(DataDisplayBuilderWidget<T> value)?}) → TResult? -
Available on DataDisplayBuilder<
A variant ofT> , provided by the DataDisplayBuilderPatterns extensionmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult string(DataDisplayBuilderString< T> value)?, TResult custom(DataDisplayBuilderWidget<T> value)?, required TResult orElse()}) → TResult -
Available on DataDisplayBuilder<
A variant ofT> , provided by the DataDisplayBuilderPatterns extensionmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult string(String labelBuilder(T data), Color? backgroundColor, TextStyle? labelStyle, OutlinedBorder? shape, Color? deleteIconColor, Widget? deleteIcon, Widget? avatar, BoxConstraints? avatarBoxConstraints, EdgeInsetsGeometry? labelPadding, BorderSide side)?, TResult custom(Widget builder(BuildContext context, T data, void delete()))?, required TResult orElse()}) → TResult -
Available on DataDisplayBuilder<
A variant ofT> , provided by the DataDisplayBuilderPatterns extensionwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult string(String labelBuilder(T data), Color? backgroundColor, TextStyle? labelStyle, OutlinedBorder? shape, Color? deleteIconColor, Widget? deleteIcon, Widget? avatar, BoxConstraints? avatarBoxConstraints, EdgeInsetsGeometry? labelPadding, BorderSide side), required TResult custom(Widget builder(BuildContext context, T data, void delete()))}) → TResult -
Available on DataDisplayBuilder<
AT> , provided by the DataDisplayBuilderPatterns extensionswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? string(String labelBuilder(T data), Color? backgroundColor, TextStyle? labelStyle, OutlinedBorder? shape, Color? deleteIconColor, Widget? deleteIcon, Widget? avatar, BoxConstraints? avatarBoxConstraints, EdgeInsetsGeometry? labelPadding, BorderSide side)?, TResult? custom(Widget builder(BuildContext context, T data, void delete()))?}) → TResult? -
Available on DataDisplayBuilder<
A variant ofT> , provided by the DataDisplayBuilderPatterns extensionwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited