hwh97 4 лет назад
Родитель
Сommit
c06dc09039
2 измененных файлов с 2 добавлено и 3 удалено
  1. 1 2
      src/main/kotlin/PageCreateAction.kt
  2. 1 1
      src/main/kotlin/template/CodeTemplate.kt

+ 1 - 2
src/main/kotlin/PageCreateAction.kt

@@ -10,7 +10,6 @@ import ui.ConfirmAction
 import ui.PageCreateDialog
 import util.*
 
-
 class PageCreateAction : AnAction() {
     override fun actionPerformed(e: AnActionEvent) {
         val project = e.getData(PlatformDataKeys.PROJECT)!!
@@ -46,7 +45,7 @@ class PageCreateAction : AnAction() {
                             project,
                             selectFullPath,
                             "${CodeUtil.toFileName(pageName)}_page.dart",
-                            CodeTemplate.getStatefulRouter(
+                            CodeTemplate.getPageRouter(
                                 stateful,
                                 pageName,
                                 if (router) CodeUtil.toCamelCase(pageName) else null,

+ 1 - 1
src/main/kotlin/template/CodeTemplate.kt

@@ -3,7 +3,7 @@ package template
 import util.CodeUtil.toFileName
 
 object CodeTemplate {
-    fun getStatefulRouter(stateful: Boolean, pageName: String, routerPath: String?, viewModelLocation: String): String {
+    fun getPageRouter(stateful: Boolean, pageName: String, routerPath: String?, viewModelLocation: String): String {
         val routerAnnotation = if (routerPath != null) "\n@RouterPage(path: \"${routerPath}\")" else ""
         val routerAnnotationImport = if (routerPath != null) "\nimport 'package:router_gen/router_gen.dart';\n" else ""
         if (stateful) {