Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
026ee975
Unverified
Commit
026ee975
authored
Apr 07, 2021
by
Jenn Magder
Committed by
GitHub
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow null config values (#79917)
parent
e54e33c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+1
-1
android_studio.dart
packages/flutter_tools/lib/src/android/android_studio.dart
+3
-3
android_studio_validator.dart
...utter_tools/lib/src/android/android_studio_validator.dart
+2
-2
config.dart
packages/flutter_tools/lib/src/base/config.dart
+3
-3
code_signing.dart
packages/flutter_tools/lib/src/ios/code_signing.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
026ee975
...
...
@@ -69,7 +69,7 @@ class AndroidSdk {
String
?
findAndroidHomeDir
()
{
String
?
androidHomeDir
;
if
(
globals
.
config
.
containsKey
(
'android-sdk'
))
{
androidHomeDir
=
globals
.
config
.
getValue
(
'android-sdk'
)
as
String
;
androidHomeDir
=
globals
.
config
.
getValue
(
'android-sdk'
)
as
String
?
;
}
else
if
(
globals
.
platform
.
environment
.
containsKey
(
kAndroidHome
))
{
androidHomeDir
=
globals
.
platform
.
environment
[
kAndroidHome
];
}
else
if
(
globals
.
platform
.
environment
.
containsKey
(
kAndroidSdkRoot
))
{
...
...
packages/flutter_tools/lib/src/android/android_studio.dart
View file @
026ee975
...
...
@@ -220,7 +220,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
/// Locates the newest, valid version of Android Studio.
static
AndroidStudio
?
latestValid
()
{
final
String
configuredStudio
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
;
final
String
?
configuredStudio
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
?
;
if
(
configuredStudio
!=
null
)
{
String
configuredStudioPath
=
configuredStudio
;
if
(
globals
.
platform
.
isMacOS
&&
!
configuredStudioPath
.
endsWith
(
'Contents'
))
{
...
...
@@ -283,7 +283,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
));
}
final
String
configuredStudioDir
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
;
final
String
?
configuredStudioDir
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
?
;
if
(
configuredStudioDir
!=
null
)
{
FileSystemEntity
configuredStudio
=
globals
.
fs
.
file
(
configuredStudioDir
);
if
(
configuredStudio
.
basename
==
'Contents'
)
{
...
...
@@ -377,7 +377,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
}
}
final
String
configuredStudioDir
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
;
final
String
?
configuredStudioDir
=
globals
.
config
.
getValue
(
'android-studio-dir'
)
as
String
?
;
if
(
configuredStudioDir
!=
null
&&
!
_hasStudioAt
(
configuredStudioDir
))
{
studios
.
add
(
AndroidStudio
(
configuredStudioDir
,
configured:
configuredStudioDir
));
...
...
packages/flutter_tools/lib/src/android/android_studio_validator.dart
View file @
026ee975
...
...
@@ -104,9 +104,9 @@ class NoAndroidStudioValidator extends DoctorValidator {
Future
<
ValidationResult
>
validate
()
async
{
final
List
<
ValidationMessage
>
messages
=
<
ValidationMessage
>[];
final
String
cfgAndroidStudio
=
_config
.
getValue
(
final
String
?
cfgAndroidStudio
=
_config
.
getValue
(
'android-studio-dir'
,
)
as
String
;
)
as
String
?
;
if
(
cfgAndroidStudio
!=
null
)
{
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
androidStudioMissing
(
cfgAndroidStudio
),
...
...
packages/flutter_tools/lib/src/base/config.dart
View file @
026ee975
...
...
@@ -62,7 +62,7 @@ class Config {
}
try
{
ErrorHandlingFileSystem
.
noExitOnFailure
(()
{
_values
=
castStringKeyedMap
(
json
.
decode
(
_file
.
readAsStringSync
()))
??
<
String
,
dynamic
>{};
_values
=
castStringKeyedMap
(
json
.
decode
(
_file
.
readAsStringSync
()))
as
Map
<
String
,
Object
>?
??
<
String
,
Object
>{};
});
}
on
FormatException
{
_logger
...
...
@@ -110,13 +110,13 @@ class Config {
String
get
configPath
=>
_file
.
path
;
Map
<
String
,
dynamic
>
_values
=
<
String
,
dynamic
>{};
Map
<
String
,
Object
>
_values
=
<
String
,
Object
>{};
Iterable
<
String
>
get
keys
=>
_values
.
keys
;
bool
containsKey
(
String
key
)
=>
_values
.
containsKey
(
key
);
dynamic
getValue
(
String
key
)
=>
_values
[
key
];
Object
?
getValue
(
String
key
)
=>
_values
[
key
];
void
setValue
(
String
key
,
Object
value
)
{
_values
[
key
]
=
value
;
...
...
packages/flutter_tools/lib/src/ios/code_signing.dart
View file @
026ee975
...
...
@@ -223,7 +223,7 @@ Future<String?> _chooseSigningIdentity(
}
if
(
validCodeSigningIdentities
.
length
>
1
)
{
final
String
savedCertChoice
=
config
.
getValue
(
'ios-signing-cert'
)
as
String
;
final
String
?
savedCertChoice
=
config
.
getValue
(
'ios-signing-cert'
)
as
String
?
;
if
(
savedCertChoice
!=
null
)
{
if
(
validCodeSigningIdentities
.
contains
(
savedCertChoice
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment