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
cf27be38
Unverified
Commit
cf27be38
authored
Apr 09, 2021
by
Jenn Magder
Committed by
GitHub
Apr 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate web_validator to null safety (#80095)
parent
54e5f5cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
33 deletions
+26
-33
custom_devices_config.dart
...r_tools/lib/src/custom_devices/custom_devices_config.dart
+6
-8
flutter_features.dart
packages/flutter_tools/lib/src/flutter_features.dart
+4
-8
code_signing.dart
packages/flutter_tools/lib/src/ios/code_signing.dart
+0
-1
web_validator.dart
packages/flutter_tools/lib/src/web/web_validator.dart
+4
-8
web_validator_test.dart
...tter_tools/test/general.shard/web/web_validator_test.dart
+12
-8
No files found.
packages/flutter_tools/lib/src/custom_devices/custom_devices_config.dart
View file @
cf27be38
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'../base/config.dart'
;
...
...
@@ -23,9 +21,9 @@ class CustomDevicesConfig {
/// when it's not valid JSON (which other configurations do) and will not
/// be implicitly created when it doesn't exist.
CustomDevicesConfig
({
@
required
FileSystem
fileSystem
,
@
required
Logger
logger
,
@
required
Platform
platform
required
FileSystem
fileSystem
,
required
Logger
logger
,
required
Platform
platform
})
:
_fileSystem
=
fileSystem
,
_config
=
Config
(
_kCustomDevicesConfigName
,
...
...
@@ -40,9 +38,9 @@ class CustomDevicesConfig {
@visibleForTesting
CustomDevicesConfig
.
test
({
@
required
FileSystem
fileSystem
,
Directory
directory
,
@
required
Logger
logger
required
FileSystem
fileSystem
,
Directory
?
directory
,
required
Logger
logger
})
:
_fileSystem
=
fileSystem
,
_config
=
Config
.
test
(
name:
_kCustomDevicesConfigName
,
...
...
packages/flutter_tools/lib/src/flutter_features.dart
View file @
cf27be38
...
...
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'base/config.dart'
;
import
'base/platform.dart'
;
import
'features.dart'
;
...
...
@@ -13,9 +9,9 @@ import 'version.dart';
class
FlutterFeatureFlags
implements
FeatureFlags
{
FlutterFeatureFlags
({
@
required
FlutterVersion
flutterVersion
,
@
required
Config
config
,
@
required
Platform
platform
,
required
FlutterVersion
flutterVersion
,
required
Config
config
,
required
Platform
platform
,
})
:
_flutterVersion
=
flutterVersion
,
_config
=
config
,
_platform
=
platform
;
...
...
@@ -66,7 +62,7 @@ class FlutterFeatureFlags implements FeatureFlags {
}
bool
isEnabled
=
featureSetting
.
enabledByDefault
;
if
(
feature
.
configSetting
!=
null
)
{
final
bool
configOverride
=
_config
.
getValue
(
feature
.
configSetting
)
as
bool
;
final
bool
?
configOverride
=
_config
.
getValue
(
feature
.
configSetting
!)
as
bool
?
;
if
(
configOverride
!=
null
)
{
isEnabled
=
configOverride
;
}
...
...
packages/flutter_tools/lib/src/ios/code_signing.dart
View file @
cf27be38
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:process/process.dart'
;
import
'../base/common.dart'
;
...
...
packages/flutter_tools/lib/src/web/web_validator.dart
View file @
cf27be38
...
...
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'../base/platform.dart'
;
import
'../doctor_validator.dart'
;
import
'chrome.dart'
;
...
...
@@ -52,8 +48,8 @@ abstract class ChromiumValidator extends DoctorValidator {
/// A validator that checks whether Chrome is installed and can run.
class
ChromeValidator
extends
ChromiumValidator
{
const
ChromeValidator
({
@
required
Platform
platform
,
@
required
ChromiumLauncher
chromiumLauncher
,
required
Platform
platform
,
required
ChromiumLauncher
chromiumLauncher
,
})
:
_platform
=
platform
,
_chromiumLauncher
=
chromiumLauncher
,
super
(
'Chrome - develop for the web'
);
...
...
@@ -71,8 +67,8 @@ class ChromeValidator extends ChromiumValidator {
/// A validator that checks whether Edge is installed and can run.
class
EdgeValidator
extends
ChromiumValidator
{
const
EdgeValidator
({
@
required
Platform
platform
,
@
required
ChromiumLauncher
chromiumLauncher
,
required
Platform
platform
,
required
ChromiumLauncher
chromiumLauncher
,
})
:
_platform
=
platform
,
_chromiumLauncher
=
chromiumLauncher
,
super
(
'Edge - develop for the web'
);
...
...
packages/flutter_tools/test/general.shard/web/web_validator_test.dart
View file @
cf27be38
...
...
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/doctor_validator.dart'
;
import
'package:flutter_tools/src/web/chrome.dart'
;
...
...
@@ -16,11 +15,11 @@ import '../../src/common.dart';
import
'../../src/fake_process_manager.dart'
;
void
main
(
)
{
Platform
platform
;
FakeProcessManager
fakeProcessManager
;
ChromiumLauncher
chromeLauncher
;
FileSystem
fileSystem
;
ChromiumValidator
webValidator
;
late
Platform
platform
;
late
FakeProcessManager
fakeProcessManager
;
late
ChromiumLauncher
chromeLauncher
;
late
FileSystem
fileSystem
;
late
ChromiumValidator
webValidator
;
setUp
(()
{
fileSystem
=
MemoryFileSystem
.
test
();
...
...
@@ -33,7 +32,12 @@ void main() {
fileSystem:
fileSystem
,
platform:
platform
,
processManager:
fakeProcessManager
,
operatingSystemUtils:
null
,
operatingSystemUtils:
OperatingSystemUtils
(
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
platform:
platform
,
processManager:
fakeProcessManager
,
),
browserFinder:
findChromeExecutable
,
logger:
BufferLogger
.
test
(),
);
...
...
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