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
e6535f6d
Unverified
Commit
e6535f6d
authored
Aug 26, 2021
by
Jenn Magder
Committed by
GitHub
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed tool cached properties to late finals (#88923)
parent
c690f143
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
51 deletions
+26
-51
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+1
-2
cache.dart
packages/flutter_tools/lib/src/cache.dart
+1
-2
cmake_project.dart
packages/flutter_tools/lib/src/cmake_project.dart
+2
-4
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-2
platform_plugins.dart
packages/flutter_tools/lib/src/platform_plugins.dart
+1
-3
project.dart
packages/flutter_tools/lib/src/project.dart
+9
-18
font_config_manager.dart
packages/flutter_tools/lib/src/test/font_config_manager.dart
+6
-11
visual_studio.dart
packages/flutter_tools/lib/src/windows/visual_studio.dart
+5
-9
No files found.
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
e6535f6d
...
...
@@ -169,8 +169,7 @@ class AndroidSdk {
AndroidSdkVersion
?
get
latestVersion
=>
_latestVersion
;
String
?
get
adbPath
=>
_adbPath
??=
getPlatformToolsPath
(
globals
.
platform
.
isWindows
?
'adb.exe'
:
'adb'
);
String
?
_adbPath
;
late
final
String
?
adbPath
=
getPlatformToolsPath
(
globals
.
platform
.
isWindows
?
'adb.exe'
:
'adb'
);
String
?
get
emulatorPath
=>
getEmulatorPath
();
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
e6535f6d
...
...
@@ -163,8 +163,7 @@ class Cache {
final
Net
_net
;
final
FileSystemUtils
_fsUtils
;
ArtifactUpdater
get
_artifactUpdater
=>
__artifactUpdater
??=
_createUpdater
();
ArtifactUpdater
?
__artifactUpdater
;
late
final
ArtifactUpdater
_artifactUpdater
=
_createUpdater
();
@protected
void
registerArtifact
(
ArtifactSet
artifactSet
)
{
...
...
packages/flutter_tools/lib/src/cmake_project.dart
View file @
e6535f6d
...
...
@@ -97,13 +97,11 @@ class WindowsUwpProject extends WindowsProject {
int
?
get
projectVersion
=>
int
.
tryParse
(
_editableDirectory
.
childFile
(
'project_version'
).
readAsStringSync
());
/// Retrieve the GUID of the UWP package.
String
?
get
packageGuid
=>
_packageGuid
??=
getCmakePackageGuid
(
runnerCmakeFile
);
String
?
_packageGuid
;
late
final
String
?
packageGuid
=
getCmakePackageGuid
(
runnerCmakeFile
);
File
get
appManifest
=>
_editableDirectory
.
childDirectory
(
'runner_uwp'
).
childFile
(
'appxmanifest.in'
);
String
?
get
packageVersion
=>
_packageVersion
??=
parseAppVersion
(
this
);
String
?
_packageVersion
;
late
final
String
?
packageVersion
=
parseAppVersion
(
this
);
}
@visibleForTesting
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
e6535f6d
...
...
@@ -50,8 +50,7 @@ class IMobileDevice {
final
ProcessManager
_processManager
;
final
ProcessUtils
_processUtils
;
bool
get
isInstalled
=>
_isInstalled
??=
_processManager
.
canRun
(
_idevicescreenshotPath
);
bool
?
_isInstalled
;
late
final
bool
isInstalled
=
_processManager
.
canRun
(
_idevicescreenshotPath
);
/// Starts `idevicesyslog` and returns the running process.
Future
<
Process
>
startLogger
(
String
deviceID
)
{
...
...
packages/flutter_tools/lib/src/platform_plugins.dart
View file @
e6535f6d
...
...
@@ -106,10 +106,8 @@ class AndroidPlugin extends PluginPlatform {
};
}
Set
<
String
>?
_cachedEmbeddingVersion
;
/// Returns the version of the Android embedding.
Set
<
String
>
get
_supportedEmbeddings
=>
_cachedEmbeddingVersion
??
=
_getSupportedEmbeddings
();
late
final
Set
<
String
>
_supportedEmbeddings
=
_getSupportedEmbeddings
();
Set
<
String
>
_getSupportedEmbeddings
()
{
assert
(
pluginPath
!=
null
);
...
...
packages/flutter_tools/lib/src/project.dart
View file @
e6535f6d
...
...
@@ -163,36 +163,28 @@ class FlutterProject {
}
/// The iOS sub project of this project.
IosProject
?
_ios
;
IosProject
get
ios
=>
_ios
??=
IosProject
.
fromFlutter
(
this
);
late
final
IosProject
ios
=
IosProject
.
fromFlutter
(
this
);
/// The Android sub project of this project.
AndroidProject
?
_android
;
AndroidProject
get
android
=>
_android
??=
AndroidProject
.
_
(
this
);
late
final
AndroidProject
android
=
AndroidProject
.
_
(
this
);
/// The web sub project of this project.
WebProject
?
_web
;
WebProject
get
web
=>
_web
??=
WebProject
.
_
(
this
);
late
final
WebProject
web
=
WebProject
.
_
(
this
);
/// The MacOS sub project of this project.
MacOSProject
?
_macos
;
MacOSProject
get
macos
=>
_macos
??=
MacOSProject
.
fromFlutter
(
this
);
late
final
MacOSProject
macos
=
MacOSProject
.
fromFlutter
(
this
);
/// The Linux sub project of this project.
LinuxProject
?
_linux
;
LinuxProject
get
linux
=>
_linux
??=
LinuxProject
.
fromFlutter
(
this
);
late
final
LinuxProject
linux
=
LinuxProject
.
fromFlutter
(
this
);
/// The Windows sub project of this project.
WindowsProject
?
_windows
;
WindowsProject
get
windows
=>
_windows
??=
WindowsProject
.
fromFlutter
(
this
);
late
final
WindowsProject
windows
=
WindowsProject
.
fromFlutter
(
this
);
/// The Windows UWP sub project of this project.
WindowsUwpProject
?
_windowUwp
;
WindowsUwpProject
get
windowsUwp
=>
_windowUwp
??=
WindowsUwpProject
.
fromFlutter
(
this
);
late
final
WindowsUwpProject
windowsUwp
=
WindowsUwpProject
.
fromFlutter
(
this
);
/// The Fuchsia sub project of this project.
FuchsiaProject
?
_fuchsia
;
FuchsiaProject
get
fuchsia
=>
_fuchsia
??=
FuchsiaProject
.
_
(
this
);
late
final
FuchsiaProject
fuchsia
=
FuchsiaProject
.
_
(
this
);
/// The `pubspec.yaml` file of this project.
File
get
pubspecFile
=>
directory
.
childFile
(
'pubspec.yaml'
);
...
...
@@ -414,8 +406,7 @@ class AndroidProject extends FlutterProjectPlatform {
bool
get
usesAndroidX
=>
parent
.
usesAndroidX
;
/// Returns true if the current version of the Gradle plugin is supported.
bool
get
isSupportedVersion
=>
_isSupportedVersion
??=
_computeSupportedVersion
();
bool
?
_isSupportedVersion
;
late
final
bool
isSupportedVersion
=
_computeSupportedVersion
();
bool
_computeSupportedVersion
()
{
final
FileSystem
fileSystem
=
hostAppGradleRoot
.
fileSystem
;
...
...
packages/flutter_tools/lib/src/test/font_config_manager.dart
View file @
e6535f6d
...
...
@@ -10,15 +10,10 @@ import '../globals_null_migrated.dart' as globals;
/// Manages a Font configuration that can be shared across multiple tests.
class
FontConfigManager
{
Directory
?
_fontsDirectory
;
File
?
_cachedFontConfig
;
/// Returns a Font configuration that limits font fallback to the artifact
/// cache directory.
File
get
fontConfigFile
{
if
(
_cachedFontConfig
!=
null
)
{
return
_cachedFontConfig
!;
}
late
final
File
fontConfigFile
=
(){
final
StringBuffer
sb
=
StringBuffer
();
sb
.
writeln
(
'<fontconfig>'
);
sb
.
writeln
(
' <dir>
${globals.cache.getCacheArtifacts().path}
</dir>'
);
...
...
@@ -30,11 +25,11 @@ class FontConfigManager {
globals
.
printTrace
(
'Using this directory for fonts configuration:
${_fontsDirectory!.path}
'
);
}
_
cachedFontConfig
=
globals
.
fs
.
file
(
'
${_fontsDirectory!.path}
/fonts.conf'
);
_cachedFontConfig
!
.
createSync
();
_cachedFontConfig
!
.
writeAsStringSync
(
sb
.
toString
());
return
_cachedFontConfig
!
;
}
final
File
cachedFontConfig
=
globals
.
fs
.
file
(
'
${_fontsDirectory!.path}
/fonts.conf'
);
cachedFontConfig
.
createSync
();
cachedFontConfig
.
writeAsStringSync
(
sb
.
toString
());
return
cachedFontConfig
;
}
();
Future
<
void
>
dispose
()
async
{
if
(
_fontsDirectory
!=
null
)
{
...
...
packages/flutter_tools/lib/src/windows/visual_studio.dart
View file @
e6535f6d
...
...
@@ -348,11 +348,7 @@ class VisualStudio {
///
/// If no installation is found, the cached VS details are set to an empty map
/// to avoid repeating vswhere queries that have already not found an installation.
Map
<
String
,
dynamic
>?
_cachedUsableVisualStudioDetails
;
Map
<
String
,
dynamic
>
get
_usableVisualStudioDetails
{
if
(
_cachedUsableVisualStudioDetails
!=
null
)
{
return
_cachedUsableVisualStudioDetails
!;
}
late
final
Map
<
String
,
dynamic
>
_usableVisualStudioDetails
=
(){
final
List
<
String
>
minimumVersionArguments
=
<
String
>[
_vswhereMinVersionArgument
,
_minimumSupportedVersion
.
toString
(),
...
...
@@ -370,16 +366,16 @@ class VisualStudio {
}
}
Map
<
String
,
dynamic
>?
usableVisualStudioDetails
;
if
(
visualStudioDetails
!=
null
)
{
if
(
installationHasIssues
(
visualStudioDetails
))
{
_cachedAnyVisualStudioDetails
=
visualStudioDetails
;
}
else
{
_cachedU
sableVisualStudioDetails
=
visualStudioDetails
;
u
sableVisualStudioDetails
=
visualStudioDetails
;
}
}
_cachedUsableVisualStudioDetails
??=
<
String
,
dynamic
>{};
return
_cachedUsableVisualStudioDetails
!;
}
return
usableVisualStudioDetails
??
<
String
,
dynamic
>{};
}();
/// Returns the details dictionary of the latest version of Visual Studio,
/// regardless of components and version, or {} if no such installation is
...
...
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