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
bf3ff7ec
Unverified
Commit
bf3ff7ec
authored
Aug 13, 2021
by
嘟囔
Committed by
GitHub
Aug 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: migrate fuchsia/application_package.dart to null-safe (#88095)
parent
4bd8b288
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
application_package.dart
...es/flutter_tools/lib/src/fuchsia/application_package.dart
+5
-9
No files found.
packages/flutter_tools/lib/src/fuchsia/application_package.dart
View file @
bf3ff7ec
...
@@ -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
'../application_package.dart'
;
import
'../application_package.dart'
;
import
'../base/file_system.dart'
;
import
'../base/file_system.dart'
;
import
'../build_info.dart'
;
import
'../build_info.dart'
;
...
@@ -13,10 +9,10 @@ import '../globals_null_migrated.dart' as globals;
...
@@ -13,10 +9,10 @@ import '../globals_null_migrated.dart' as globals;
import
'../project.dart'
;
import
'../project.dart'
;
abstract
class
FuchsiaApp
extends
ApplicationPackage
{
abstract
class
FuchsiaApp
extends
ApplicationPackage
{
FuchsiaApp
({
@
required
String
projectBundleId
})
:
super
(
id:
projectBundleId
);
FuchsiaApp
({
required
String
projectBundleId
})
:
super
(
id:
projectBundleId
);
/// Creates a new [FuchsiaApp] from a fuchsia sub project.
/// Creates a new [FuchsiaApp] from a fuchsia sub project.
factory
FuchsiaApp
.
fromFuchsiaProject
(
FuchsiaProject
project
)
{
static
FuchsiaApp
?
fromFuchsiaProject
(
FuchsiaProject
project
)
{
if
(!
project
.
existsSync
())
{
if
(!
project
.
existsSync
())
{
// If the project doesn't exist at all the current hint to run flutter
// If the project doesn't exist at all the current hint to run flutter
// create is accurate.
// create is accurate.
...
@@ -30,7 +26,7 @@ abstract class FuchsiaApp extends ApplicationPackage {
...
@@ -30,7 +26,7 @@ abstract class FuchsiaApp extends ApplicationPackage {
/// Creates a new [FuchsiaApp] from an existing .far archive.
/// Creates a new [FuchsiaApp] from an existing .far archive.
///
///
/// [applicationBinary] is the path to the .far archive.
/// [applicationBinary] is the path to the .far archive.
factory
FuchsiaApp
.
fromPrebuiltApp
(
FileSystemEntity
applicationBinary
)
{
static
FuchsiaApp
?
fromPrebuiltApp
(
FileSystemEntity
applicationBinary
)
{
final
FileSystemEntityType
entityType
=
globals
.
fs
.
typeSync
(
applicationBinary
.
path
);
final
FileSystemEntityType
entityType
=
globals
.
fs
.
typeSync
(
applicationBinary
.
path
);
if
(
entityType
!=
FileSystemEntityType
.
file
)
{
if
(
entityType
!=
FileSystemEntityType
.
file
)
{
globals
.
printError
(
'File "
${applicationBinary.path}
" does not exist or is not a .far file. Use far archive.'
);
globals
.
printError
(
'File "
${applicationBinary.path}
" does not exist or is not a .far file. Use far archive.'
);
...
@@ -50,7 +46,7 @@ abstract class FuchsiaApp extends ApplicationPackage {
...
@@ -50,7 +46,7 @@ abstract class FuchsiaApp extends ApplicationPackage {
class
PrebuiltFuchsiaApp
extends
FuchsiaApp
{
class
PrebuiltFuchsiaApp
extends
FuchsiaApp
{
PrebuiltFuchsiaApp
({
PrebuiltFuchsiaApp
({
@
required
String
farArchive
,
required
String
farArchive
,
})
:
_farArchive
=
farArchive
,
})
:
_farArchive
=
farArchive
,
// TODO(zra): Extract the archive and extract the id from meta/package.
// TODO(zra): Extract the archive and extract the id from meta/package.
super
(
projectBundleId:
farArchive
);
super
(
projectBundleId:
farArchive
);
...
@@ -65,7 +61,7 @@ class PrebuiltFuchsiaApp extends FuchsiaApp {
...
@@ -65,7 +61,7 @@ class PrebuiltFuchsiaApp extends FuchsiaApp {
}
}
class
BuildableFuchsiaApp
extends
FuchsiaApp
{
class
BuildableFuchsiaApp
extends
FuchsiaApp
{
BuildableFuchsiaApp
({
this
.
project
})
:
BuildableFuchsiaApp
({
required
this
.
project
})
:
super
(
projectBundleId:
project
.
project
.
manifest
.
appName
);
super
(
projectBundleId:
project
.
project
.
manifest
.
appName
);
final
FuchsiaProject
project
;
final
FuchsiaProject
project
;
...
...
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