NativeComponentConfig class
Content and appearance of a native component.
The same vocabulary is shared by all components; each component documents
which fields it reads (see NativeComponentType). Unknown fields are ignored.
- Annotations
Constructors
-
NativeComponentConfig({String? title, String? subtitle, String? message, String? placeholder, NativeImage? image, List<
NativeItem> ? items, Object? value, double? min, double? max, double? step, bool enabled = true, Map<String, Object?> extra = const {}, NativeStyle style = const NativeStyle()}) -
Creates a configuration. Every argument is optional; components fall
back to their own native defaults.
const
Properties
- enabled → bool
-
Whether the whole component accepts interaction.
final
-
extra
→ Map<
String, Object?> -
Component-specific options (codec-compatible values).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → NativeImage?
-
Main icon or artwork.
final
-
items
→ List<
NativeItem> ? -
Tabs, actions, segments, options or rows.
final
- max → double?
-
Upper bound of sliders, steppers and progress.
final
- message → String?
-
Body text of alerts, sheets and cards.
final
- min → double?
-
Lower bound of sliders, steppers and progress.
final
- placeholder → String?
-
Placeholder of text and search fields.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- step → double?
-
Step of sliders and steppers.
final
- style → NativeStyle
-
Visual customization.
final
- subtitle → String?
-
Secondary text.
final
- title → String?
-
Main text: navigation title, button label, alert title…
final
- value → Object?
-
Initial value:
bool,num,String,List, or aDateTime(sent as ISO-8601). Colors may be passed asColor.final
Methods
-
copyWith(
{String? title, String? subtitle, String? message, String? placeholder, NativeImage? image, List< NativeItem> ? items, Object? value, double? min, double? max, double? step, bool? enabled, Map<String, Object?> ? extra, NativeStyle? style}) → NativeComponentConfig - Returns a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - Encodes this object for the platform channel.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited