Skip to content

Commit 86981ef

Browse files
committed
修复ui问题
1 parent f25572e commit 86981ef

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory/utils/GsonUtil.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ object GsonUtil {
101101
`in`.endArray()
102102
list
103103
}
104+
104105
JsonToken.BEGIN_OBJECT -> {
105106
val map: MutableMap<String, Any?> =
106107
LinkedTreeMap()
@@ -111,6 +112,7 @@ object GsonUtil {
111112
`in`.endObject()
112113
map
113114
}
115+
114116
JsonToken.STRING -> `in`.nextString()
115117
JsonToken.NUMBER -> {
116118
/**
@@ -125,11 +127,13 @@ object GsonUtil {
125127
0.0
126128
}
127129
}
130+
128131
JsonToken.BOOLEAN -> `in`.nextBoolean()
129132
JsonToken.NULL -> {
130133
`in`.nextNull()
131134
null
132135
}
136+
133137
else -> throw IllegalStateException()
134138
}
135139
}

src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory/utils/JsonUtils.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class JsonUtils {
2424
}
2525
return returnData
2626
}
27+
2728
is List<*> -> {
2829
if (data.isEmpty()) return listOf<String>()
2930
return if (data.first() is Map<*, *>) {
@@ -42,6 +43,7 @@ class JsonUtils {
4243
}
4344

4445
}
46+
4547
else -> {
4648
return data
4749
}

src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory/utils/SimplifiedMethods.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.intellij.openapi.project.Project
1313
/**
1414
* do the action that could be roll-back
1515
*/
16-
fun Project?.executeCouldRollBackAction( action: (Project?) -> Unit) {
16+
fun Project?.executeCouldRollBackAction(action: (Project?) -> Unit) {
1717
CommandProcessor.getInstance().executeCommand(this, {
1818
ApplicationManager.getApplication().runWriteAction {
1919
action.invoke(this)

src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory/workers/FileGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class FileGenerator(private val project: Project) {
3939
// builder.append("\n")
4040
builder.append(getJSONFieldContent())
4141
val jsonConvertContent = builder.toString()
42-
FileHelpers.getJsonConvertJsonFiledFile(project,pubSpecConfig.generatedPath) { file ->
42+
FileHelpers.getJsonConvertJsonFiledFile(project, pubSpecConfig.generatedPath) { file ->
4343
psiManager.findFile(file)?.let { dartFile ->
4444
documentManager.getDocument(dartFile)?.let { document ->
4545
if (document.text != jsonConvertContent) {

0 commit comments

Comments
 (0)