Explorar o código

update: rename method

hwh97 %!s(int64=4) %!d(string=hai) anos
pai
achega
c06dc09039

+ 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) {