Skip to content

Commit c9ee336

Browse files
committed
fix error and exception.
1 parent 621d253 commit c9ee336

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function formatDartFile(dartPath) {
6868
}
6969

7070
function createFlutterPackage(template, projectName) {
71-
var command = 'flutter create --template=' + template + ' --project-name ' + projectName + ' ' + outputDir
71+
var command = 'flutter create --platforms=android,ios --template=' + template + ' --project-name ' + projectName + ' ' + outputDir
7272
execSync(command, { stdio: 'inherit' })
7373
}
7474

@@ -86,7 +86,7 @@ function writeDependencyToPubSpec(filePath) {
8686

8787
function generateDartWithWorker(path, script) {
8888
return new Promise((resolve, reject) => {
89-
if (this.isMainThread) {
89+
if (this.isMainThread || !isSupportWorkerThreads) {
9090
const convert = require(script).convert
9191
convert(path, (result, path, error) => {
9292
resolve({ result: result, path: path, error: error })

0 commit comments

Comments
 (0)