RemoteConfig class abstract
Remote configuration fetched from the server.
Represents the bot configuration as stored on the server, which may have different field names than the local configuration.
- Available extensions
- Annotations
-
- @freezed
Constructors
- RemoteConfig({required String name, @JsonKey.new(name: 'welcome_message') required String welcomeMessage, @JsonKey.new(name: 'system_instruction') required String systemInstruction, String? fontFamily, String? color, String? avatar, @JsonKey.new(name: 'fab_configuration') FabConfiguration? fabConfiguration})
-
constfactory
-
RemoteConfig.fromJson(Map<
String, Object?> json) -
factory
Properties
- avatar → String?
-
Avatar URL or data from server.
no setterinherited
- color → String?
-
Primary color setting from server.
no setterinherited
-
copyWith
→ $RemoteConfigCopyWith<
RemoteConfig> -
Create a copy of RemoteConfig
with the given fields replaced by the non-null parameter values.
no setterinherited
- fabConfiguration → FabConfiguration?
-
FAB configuration from server.
no setterinherited
- fontFamily → String?
-
Font family setting from server.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Bot display name from server.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemInstruction → String
-
System instructions from server.
no setterinherited
- welcomeMessage → String
-
Welcome message from server configuration.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_RemoteConfig value)) → TResult -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_RemoteConfig value)?) → TResult? -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_RemoteConfig value)?, {required TResult orElse()}) → TResult -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String name, String welcomeMessage, String systemInstruction, String? fontFamily, String? color, String? avatar, FabConfiguration? fabConfiguration)?, {required TResult orElse()}) → TResult -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this RemoteConfig to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String name, String welcomeMessage, String systemInstruction, String? fontFamily, String? color, String? avatar, FabConfiguration? fabConfiguration)) → TResult -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String name, String welcomeMessage, String systemInstruction, String? fontFamily, String? color, String? avatar, FabConfiguration? fabConfiguration)?) → TResult? -
Available on RemoteConfig, provided by the RemoteConfigPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited