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
09987dc0
Unverified
Commit
09987dc0
authored
May 25, 2022
by
Jenn Magder
Committed by
GitHub
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate create command to null safety (#104484)
parent
b5adbee1
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
121 deletions
+105
-121
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+53
-58
create_base.dart
packages/flutter_tools/lib/src/commands/create_base.dart
+48
-57
template.dart
packages/flutter_tools/lib/src/template.dart
+1
-1
test_flutter_command_runner.dart
...s/flutter_tools/test/src/test_flutter_command_runner.dart
+3
-5
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
09987dc0
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/create_base.dart
View file @
09987dc0
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/template.dart
View file @
09987dc0
...
...
@@ -155,7 +155,7 @@ class Template {
/// May throw a [ToolExit] if the directory is not writable.
int
render
(
Directory
destination
,
Map
<
String
,
Object
>
context
,
{
Map
<
String
,
Object
?
>
context
,
{
bool
overwriteExisting
=
true
,
bool
printStatusWhenWriting
=
true
,
})
{
...
...
packages/flutter_tools/test/src/test_flutter_command_runner.dart
View file @
09987dc0
...
...
@@ -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
'dart:async'
;
import
'package:args/args.dart'
;
...
...
@@ -20,7 +18,7 @@ import 'package:flutter_tools/src/runner/flutter_command_runner.dart';
export
'package:test_api/test_api.dart'
hide
test
,
isInstanceOf
;
// ignore: deprecated_member_use
CommandRunner
<
void
>
createTestCommandRunner
([
FlutterCommand
command
])
{
CommandRunner
<
void
>
createTestCommandRunner
([
FlutterCommand
?
command
])
{
final
FlutterCommandRunner
runner
=
TestFlutterCommandRunner
();
if
(
command
!=
null
)
{
runner
.
addCommand
(
command
);
...
...
@@ -31,7 +29,7 @@ CommandRunner<void> createTestCommandRunner([ FlutterCommand command ]) {
/// Creates a flutter project in the [temp] directory using the
/// [arguments] list if specified, or `--no-pub` if not.
/// Returns the path to the flutter project.
Future
<
String
>
createProject
(
Directory
temp
,
{
List
<
String
>
arguments
})
async
{
Future
<
String
>
createProject
(
Directory
temp
,
{
List
<
String
>
?
arguments
})
async
{
arguments
??=
<
String
>[
'--no-pub'
];
final
String
projectPath
=
globals
.
fs
.
path
.
join
(
temp
.
path
,
'flutter_project'
);
final
CreateCommand
command
=
CreateCommand
();
...
...
@@ -61,7 +59,7 @@ class TestFlutterCommandRunner extends FlutterCommandRunner {
userMessages:
UserMessages
(),
);
// For compatibility with tests that set this to a relative path.
Cache
.
flutterRoot
=
globals
.
fs
.
path
.
normalize
(
globals
.
fs
.
path
.
absolute
(
Cache
.
flutterRoot
));
Cache
.
flutterRoot
=
globals
.
fs
.
path
.
normalize
(
globals
.
fs
.
path
.
absolute
(
Cache
.
flutterRoot
!
));
return
super
.
runCommand
(
topLevelResults
);
}
);
...
...
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