FlutterVersion class
Provides a structured way to handle Flutter SDK versions.
This class allows for specific use-cases and categorizations of Flutter SDK versions such as distinguishing if a version is a release, a channel, a git commit or a custom version. Moreover, it allows for fetching a print-friendly name to be used in user interfaces.
- Mixed-in types
- Implementers
- Annotations
-
- @MappableClass.new(ignoreNull: true)
Constructors
- FlutterVersion(String name, {FlutterChannel? releaseChannel, required VersionType type, String? fork})
-
Constructs a FlutterVersion instance initialized with a given
name.const - FlutterVersion.channel(String name, {String? fork})
- FlutterVersion.custom(String name)
-
const
- FlutterVersion.gitReference(String name, {String? fork})
- FlutterVersion.parse(String version)
-
factory
- FlutterVersion.release(String name, {FlutterChannel? releaseChannel, String? fork})
-
const
Properties
-
copyWith
→ FlutterVersionCopyWith<
FlutterVersion, FlutterVersion, FlutterVersion> -
no setterinherited
- fork → String?
-
final
- fromFork → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isChannel → bool
-
no setter
- isCustom → bool
-
no setter
- isMain → bool
-
no setter
- isRelease → bool
-
no setter
- isUnknownRef → bool
-
no setter
- name → String
-
Represents the underlying string value of the Flutter version.
final
- nameWithAlias → String
-
Returns the qualified name including fork prefix if present.
no setter
- printFriendlyName → String
-
Provides a human readable version identifier for UI presentation.
no setter
- releaseChannel → FlutterChannel?
-
Has a channel which the version is part of
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → VersionType
-
final
- version → String
-
no setter
Methods
-
compareTo(
FlutterVersion other) → int -
Compares CacheVersion with
other -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
inherited
-
toMap(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- fromJson → FlutterVersion Function(String json)
-
final
-
fromMap
→ FlutterVersion Function(Map<
String, dynamic> map) -
final