UpgraderState class
The Upgrader state.
Constructors
-
UpgraderState({required Client client, Map<
String, String> ? clientHeaders, String? countryCodeOverride, bool debugDisplayAlways = false, bool debugDisplayOnce = false, bool debugLogging = false, Duration durationUntilAlertAgain = const Duration(days: 3), String? languageCodeOverride, UpgraderMessages? messages, Version? minAppVersion, PackageInfo? packageInfo, required UpgraderDevice upgraderDevice, required UpgraderOS upgraderOS, UpgraderVersionInfo? versionInfo}) - Creates an Upgrader state.
Properties
- client → Client
-
Provide an HTTP Client that can be replaced during testing.
final
-
clientHeaders
→ Map<
String, String> ? -
Provide the HTTP headers used by client.
final
- countryCodeOverride → String?
-
The country code that will override the system locale. Optional.
final
- debugDisplayAlways → bool
-
For debugging, always force the upgrade to be available.
final
- debugDisplayOnce → bool
-
For debugging, display the upgrade at least once once.
final
- debugLogging → bool
-
Enable print statements for debugging.
final
- durationUntilAlertAgain → Duration
-
Duration until alerting user again.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- languageCodeOverride → String?
-
The country code that will override the system locale. Optional. Used
only for Android.
final
- messages → UpgraderMessages?
-
The localized messages used for display in upgrader.
final
- minAppVersion → Version?
-
The minimum app version supported by this app. Earlier versions of this app
will be forced to update to the current version. Overrides any minimum
app version from UpgraderStore. Optional.
final
- packageInfo → PackageInfo?
-
The app package metadata information.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- upgraderDevice → UpgraderDevice
-
Provide UpgraderDevice that ca be replaced during testing.
final
- upgraderOS → UpgraderOS
-
Provides information on which OS this code is running on, and can be
replaced during testing.
final
- versionInfo → UpgraderVersionInfo?
-
The latest version info for this app.
final
Methods
-
copyWith(
{Client? client, Map< String, String> ? clientHeaders, String? countryCodeOverride, bool? debugDisplayAlways, bool? debugDisplayOnce, bool? debugLogging, Duration? durationUntilAlertAgain, String? languageCodeOverride, UpgraderMessages? messages, Version? minAppVersion, PackageInfo? packageInfo, UpgraderDevice? upgraderDevice, UpgraderOS? upgraderOS, UpgraderVersionInfo? versionInfo}) → UpgraderState - Creates a new state object by copying existing data and modifying selected fields.
-
copyWithNull(
{bool? countryCodeOverride, bool? languageCodeOverride, bool? messages, bool? minAppVersion, bool? packageInfo, bool? versionInfo}) → UpgraderState - Creates a new state object by copying existing data and modifying selected fields, but true parameters will null out values in the state object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited