SdkSettings class final
The user's answers to "Download Flutter X?", kept in sdks.json in
their settings folder (UserPaths.configDir) for every project:
{"download": "always", "declined": ["3.47.9"]}
Keys this version doesn't know are kept when the file is written again.
Constructors
Properties
- alwaysDownload → bool
-
Whether a Flutter version a project pins is downloaded without asking
(the user answered "always").
final
-
declined
→ List<
String> -
The Flutter versions the user said not to download:
justwarns instead of asking again, untiljust sdk installinstalls one.final -
extra
→ Map<
String, Object?> -
The file's other keys, written back as they were.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allowing(
String version) → SdkSettings -
A copy where
versionis no longer declined. -
always(
) → SdkSettings - A copy that downloads without asking.
-
declining(
String version) → SdkSettings -
A copy where
versionwas declined. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
{Map< String, String> ? environment}) → bool - Saves these settings; false when there is no settings folder or it can't be written (the answer then holds for this run only).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
path(
{Map< String, String> ? environment}) → String? -
Where the file is:
sdks.jsonin the settings folder; null when there is no settings folder. -
read(
{Map< String, String> ? environment}) → SdkSettings - The user's settings; the defaults when the file is missing or can't be read (a broken file is not worth stopping a command for).