Skip to content

Commit 170e283

Browse files
Merge pull request #42 from dart-native/bugfix/exception_fix
fix error and exception.
2 parents d6efed0 + c9ee336 commit 170e283

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
@@ -112,7 +112,7 @@ function formatDartFile(dartPath) {
112112
}
113113

114114
function createFlutterPackage(template, projectName) {
115-
var command = 'flutter create --template=' + template + ' --project-name ' + projectName + ' ' + outputDir
115+
var command = 'flutter create --platforms=android,ios --template=' + template + ' --project-name ' + projectName + ' ' + outputDir
116116
execSync(command, { stdio: 'inherit' })
117117
}
118118

@@ -130,7 +130,7 @@ function writeDependencyToPubSpec(filePath) {
130130

131131
function generateDartWithWorker(content, path, script) {
132132
return new Promise((resolve, reject) => {
133-
if (this.isMainThread) {
133+
if (this.isMainThread || !isSupportWorkerThreads) {
134134
const convert = require(script).convert
135135
convert(content, (result, error) => {
136136
resolve({ result: result, error: error })

0 commit comments

Comments
 (0)