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 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'package:meta/meta.dart'
;
import
'../base/config.dart'
;
import
'../base/config.dart'
;
...
@@ -23,9 +21,9 @@ class CustomDevicesConfig {
...
@@ -23,9 +21,9 @@ class CustomDevicesConfig {
/// when it's not valid JSON (which other configurations do) and will not
/// when it's not valid JSON (which other configurations do) and will not
/// be implicitly created when it doesn't exist.
/// be implicitly created when it doesn't exist.
CustomDevicesConfig
({
CustomDevicesConfig
({
@
required
FileSystem
fileSystem
,
required
FileSystem
fileSystem
,
@
required
Logger
logger
,
required
Logger
logger
,
@
required
Platform
platform
required
Platform
platform
})
:
_fileSystem
=
fileSystem
,
})
:
_fileSystem
=
fileSystem
,
_config
=
Config
(
_config
=
Config
(
_kCustomDevicesConfigName
,
_kCustomDevicesConfigName
,
...
@@ -40,9 +38,9 @@ class CustomDevicesConfig {
...
@@ -40,9 +38,9 @@ class CustomDevicesConfig {
@visibleForTesting
@visibleForTesting
CustomDevicesConfig
.
test
({
CustomDevicesConfig
.
test
({
@
required
FileSystem
fileSystem
,
required
FileSystem
fileSystem
,
Directory
directory
,
Directory
?
directory
,
@
required
Logger
logger
required
Logger
logger
})
:
_fileSystem
=
fileSystem
,
})
:
_fileSystem
=
fileSystem
,
_config
=
Config
.
test
(
_config
=
Config
.
test
(
name:
_kCustomDevicesConfigName
,
name:
_kCustomDevicesConfigName
,
...
...
packages/flutter_tools/lib/src/flutter_features.dart
View file @
cf27be38
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'base/config.dart'
;
import
'base/config.dart'
;
import
'base/platform.dart'
;
import
'base/platform.dart'
;
import
'features.dart'
;
import
'features.dart'
;
...
@@ -13,9 +9,9 @@ import 'version.dart';
...
@@ -13,9 +9,9 @@ import 'version.dart';
class
FlutterFeatureFlags
implements
FeatureFlags
{
class
FlutterFeatureFlags
implements
FeatureFlags
{
FlutterFeatureFlags
({
FlutterFeatureFlags
({
@
required
FlutterVersion
flutterVersion
,
required
FlutterVersion
flutterVersion
,
@
required
Config
config
,
required
Config
config
,
@
required
Platform
platform
,
required
Platform
platform
,
})
:
_flutterVersion
=
flutterVersion
,
})
:
_flutterVersion
=
flutterVersion
,
_config
=
config
,
_config
=
config
,
_platform
=
platform
;
_platform
=
platform
;
...
@@ -66,7 +62,7 @@ class FlutterFeatureFlags implements FeatureFlags {
...
@@ -66,7 +62,7 @@ class FlutterFeatureFlags implements FeatureFlags {
}
}
bool
isEnabled
=
featureSetting
.
enabledByDefault
;
bool
isEnabled
=
featureSetting
.
enabledByDefault
;
if
(
feature
.
configSetting
!=
null
)
{
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
)
{
if
(
configOverride
!=
null
)
{
isEnabled
=
configOverride
;
isEnabled
=
configOverride
;
}
}
...
...
packages/flutter_tools/lib/src/ios/code_signing.dart
View file @
cf27be38
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'package:process/process.dart'
;
import
'package:process/process.dart'
;
import
'../base/common.dart'
;
import
'../base/common.dart'
;
...
...
packages/flutter_tools/lib/src/web/web_validator.dart
View file @
cf27be38
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:meta/meta.dart'
;
import
'../base/platform.dart'
;
import
'../base/platform.dart'
;
import
'../doctor_validator.dart'
;
import
'../doctor_validator.dart'
;
import
'chrome.dart'
;
import
'chrome.dart'
;
...
@@ -52,8 +48,8 @@ abstract class ChromiumValidator extends DoctorValidator {
...
@@ -52,8 +48,8 @@ abstract class ChromiumValidator extends DoctorValidator {
/// A validator that checks whether Chrome is installed and can run.
/// A validator that checks whether Chrome is installed and can run.
class
ChromeValidator
extends
ChromiumValidator
{
class
ChromeValidator
extends
ChromiumValidator
{
const
ChromeValidator
({
const
ChromeValidator
({
@
required
Platform
platform
,
required
Platform
platform
,
@
required
ChromiumLauncher
chromiumLauncher
,
required
ChromiumLauncher
chromiumLauncher
,
})
:
_platform
=
platform
,
})
:
_platform
=
platform
,
_chromiumLauncher
=
chromiumLauncher
,
_chromiumLauncher
=
chromiumLauncher
,
super
(
'Chrome - develop for the web'
);
super
(
'Chrome - develop for the web'
);
...
@@ -71,8 +67,8 @@ class ChromeValidator extends ChromiumValidator {
...
@@ -71,8 +67,8 @@ class ChromeValidator extends ChromiumValidator {
/// A validator that checks whether Edge is installed and can run.
/// A validator that checks whether Edge is installed and can run.
class
EdgeValidator
extends
ChromiumValidator
{
class
EdgeValidator
extends
ChromiumValidator
{
const
EdgeValidator
({
const
EdgeValidator
({
@
required
Platform
platform
,
required
Platform
platform
,
@
required
ChromiumLauncher
chromiumLauncher
,
required
ChromiumLauncher
chromiumLauncher
,
})
:
_platform
=
platform
,
})
:
_platform
=
platform
,
_chromiumLauncher
=
chromiumLauncher
,
_chromiumLauncher
=
chromiumLauncher
,
super
(
'Edge - develop for the web'
);
super
(
'Edge - develop for the web'
);
...
...
packages/flutter_tools/test/general.shard/web/web_validator_test.dart
View file @
cf27be38
...
@@ -2,11 +2,10 @@
...
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.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/base/platform.dart'
;
import
'package:flutter_tools/src/doctor_validator.dart'
;
import
'package:flutter_tools/src/doctor_validator.dart'
;
import
'package:flutter_tools/src/web/chrome.dart'
;
import
'package:flutter_tools/src/web/chrome.dart'
;
...
@@ -16,11 +15,11 @@ import '../../src/common.dart';
...
@@ -16,11 +15,11 @@ import '../../src/common.dart';
import
'../../src/fake_process_manager.dart'
;
import
'../../src/fake_process_manager.dart'
;
void
main
(
)
{
void
main
(
)
{
Platform
platform
;
late
Platform
platform
;
FakeProcessManager
fakeProcessManager
;
late
FakeProcessManager
fakeProcessManager
;
ChromiumLauncher
chromeLauncher
;
late
ChromiumLauncher
chromeLauncher
;
FileSystem
fileSystem
;
late
FileSystem
fileSystem
;
ChromiumValidator
webValidator
;
late
ChromiumValidator
webValidator
;
setUp
(()
{
setUp
(()
{
fileSystem
=
MemoryFileSystem
.
test
();
fileSystem
=
MemoryFileSystem
.
test
();
...
@@ -33,7 +32,12 @@ void main() {
...
@@ -33,7 +32,12 @@ void main() {
fileSystem:
fileSystem
,
fileSystem:
fileSystem
,
platform:
platform
,
platform:
platform
,
processManager:
fakeProcessManager
,
processManager:
fakeProcessManager
,
operatingSystemUtils:
null
,
operatingSystemUtils:
OperatingSystemUtils
(
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
platform:
platform
,
processManager:
fakeProcessManager
,
),
browserFinder:
findChromeExecutable
,
browserFinder:
findChromeExecutable
,
logger:
BufferLogger
.
test
(),
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