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
93b31a41
Commit
93b31a41
authored
Mar 05, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flutter create
parent
9f142710
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+13
-7
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
93b31a41
...
...
@@ -128,21 +128,19 @@ All done! In order to run your application, type:
void
_renderTemplates
(
String
projectName
,
String
dirPath
,
String
flutterPackagesDirectory
,
{
bool
renderDriverTest:
false
})
{
String
relativePackagesDirectory
=
path
.
relative
(
flutterPackagesDirectory
,
from:
path
.
join
(
dirPath
,
'pubspec.yaml'
)
);
new
Directory
(
dirPath
).
createSync
(
recursive:
true
);
printStatus
(
'Creating project
${path.basename(projectName)}
:'
);
flutterPackagesDirectory
=
path
.
normalize
(
flutterPackagesDirectory
);
flutterPackagesDirectory
=
_relativePath
(
from:
dirPath
,
to:
flutterPackagesDirectory
);
new
Directory
(
dirPath
).
createSync
(
recursive:
true
);
printStatus
(
'Creating project
${path.basename(projectName)}
:'
);
Map
templateContext
=
<
String
,
dynamic
>{
'projectName'
:
projectName
,
'androidIdentifier'
:
_createAndroidIdentifier
(
projectName
),
'iosIdentifier'
:
_createUTIIdentifier
(
projectName
),
'description'
:
description
,
'flutterPackagesDirectory'
:
relative
PackagesDirectory
,
'flutterPackagesDirectory'
:
flutter
PackagesDirectory
,
'androidMinApiLevel'
:
android
.
minApiLevel
};
...
...
@@ -211,3 +209,11 @@ String _validateProjectName(String projectName) {
return
null
;
}
String
_relativePath
(
{
String
from
,
String
to
})
{
String
result
=
path
.
relative
(
to
,
from:
from
);
// `path.relative()` doesn't always return a correct result: dart-lang/path#12.
if
(
FileSystemEntity
.
isDirectorySync
(
path
.
join
(
from
,
result
)))
return
result
;
return
to
;
}
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