PluginConfiguration class sealed
- Available extensions
- Annotations
-
- @freezed
Constructors
-
PluginConfiguration({required PluginId pluginId, required bool enabled, @Default.new({}) Map<
String, dynamic> settings, DateTime? lastModified}) -
constfactory
- PluginConfiguration.create(PluginId pluginId)
-
factory
-
PluginConfiguration.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ $PluginConfigurationCopyWith<
PluginConfiguration> -
Create a copy of PluginConfiguration
with the given fields replaced by the non-null parameter values.
no setterinherited
- enabled → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastModified → DateTime?
-
no setterinherited
- pluginId → PluginId
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
settings
→ Map<
String, dynamic> -
no setterinherited
Methods
-
disable(
) → PluginConfiguration -
enable(
) → PluginConfiguration -
getSetting<
T> (String key, {T? defaultValue}) → T? -
hasSetting(
String key) → bool -
map<
TResult extends Object?> (TResult $default(_PluginConfiguration value)) → TResult -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PluginConfiguration value)?) → TResult? -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_PluginConfiguration value)?, {required TResult orElse()}) → TResult -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(PluginId pluginId, bool enabled, Map< String, dynamic> settings, DateTime? lastModified)?, {required TResult orElse()}) → TResult -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSetting(
String key) → PluginConfiguration -
toJson(
) → Map< String, dynamic> -
Serializes this PluginConfiguration to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSetting(
String key, dynamic value) → PluginConfiguration -
when<
TResult extends Object?> (TResult $default(PluginId pluginId, bool enabled, Map< String, dynamic> settings, DateTime? lastModified)) → TResult -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(PluginId pluginId, bool enabled, Map< String, dynamic> settings, DateTime? lastModified)?) → TResult? -
Available on PluginConfiguration, provided by the PluginConfigurationPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited