Documentation ¶
Index ¶
- Constants
- func GenerateModule(moduleInfo ModuleInfo)
- func ToBlocView(file string) (string, error)
- func ToBlocViewConstructor(moduleViewDefine ModuleViewDefine) string
- func ToBlocViewCopyWith(moduleViewDefine ModuleViewDefine) string
- func ToBlocViewFromModel()
- func ToBlocViewGetProps(propertyTokens []PropertyToken) string
- type ModuleInfo
- type ModuleViewDefine
- type ParamInfo
- type ProcessInfo
- type PropertyToken
- type Tmpl
Constants ¶
View Source
const KEY_AWAIT string = `$await$`
View Source
const KEY_EVENT_DEFINE string = `$EventDefine$`
View Source
const KEY_EVENT_DEFINE_PARAM string = `$EventDefineParam$`
View Source
const KEY_MAP_EVENT_BLOCK string = `$mapEventBlock$`
View Source
const KEY_MODULE_NAME_CAMEL string = `$ModuleNameCamel$`
View Source
const KEY_MODULE_NAME_LOGICAL string = `$ModuleNameLogical$`
View Source
const KEY_MODULE_NAME_SNAKE string = `$ModuleNameSnake$`
View Source
const KEY_PARAM string = `$Param$`
View Source
const KEY_PARAM_CONSTRUCTOR string = `$ParamConstructor$`
View Source
const KEY_PARAM_LOGICAL string = `$ParamLogical$`
View Source
const KEY_PARAM_PROPS string = `$ParamProps$`
View Source
const KEY_PROCESS_CAMEL string = `$ProcessNameCamel$`
View Source
const KEY_PROCESS_LOGICAL string = `$ProcessNameLogical$`
View Source
const KEY_PROCESS_LOWER_CAMEL string = `$ProcessNameLowerCamel$`
View Source
const KEY_PROJECT_NAME_LOGICAL string = `$ProjectNameLogical$`
View Source
const KEY_PROJECT_NAME_SNAKE string = `$ProjectNameSnake$`
View Source
const KEY_SERVICE_IMPL_PROCESS_BLOCK string = `$ServiceImplProcessBlock$`
View Source
const KEY_SERVICE_PROCESS_BLOCK string = `$ServiceProcessBlock$`
View Source
const KW_CLASS string = `class`
View Source
const KW_FINAL string = `final`
View Source
const KW_VIEW_SUFFIX string = `View`
View Source
const TMPL_AWAIT string = `await `
View Source
const TMPL_BLOC string = `
export '$ModuleNameSnake$_bloc.dart';
export '$ModuleNameSnake$_event.dart';
export '$ModuleNameSnake$_state.dart';
`
bloc.dart
View Source
const TMPL_BLOC_BLOC string = `` /* 1117-byte string literal not displayed */
xxx_bloc.dart
View Source
const TMPL_BLOC_EVENT string = `` /* 438-byte string literal not displayed */
xxx_event.dart
View Source
const TMPL_BLOC_STATE string = `` /* 746-byte string literal not displayed */
xxx_state.dart
View Source
const TMPL_EVENT_DEFINE string = `` /* 347-byte string literal not displayed */
View Source
const TMPL_EVENT_DEFINE_PARAM string = `
/// $ParamLogical$
$Param$;
`
View Source
const TMPL_MAP_EVENT_BLOCK string = `` /* 308-byte string literal not displayed */
View Source
const TMPL_SERVICE string = `` /* 360-byte string literal not displayed */
View Source
const TMPL_SERVICE_IMPL string = `` /* 460-byte string literal not displayed */
View Source
const TMPL_SERVICE_IMPL_PROCESS_ASYNC string = `` /* 199-byte string literal not displayed */
View Source
const TMPL_SERVICE_IMPL_PROCESS_SYNC string = `` /* 220-byte string literal not displayed */
View Source
const TMPL_SERVICE_PROCESS_ASYNC string = `` /* 175-byte string literal not displayed */
View Source
const TMPL_SERVICE_PROCESS_SYNC string = `` /* 167-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ToBlocView ¶
func ToBlocViewConstructor ¶
func ToBlocViewConstructor(moduleViewDefine ModuleViewDefine) string
func ToBlocViewCopyWith ¶
func ToBlocViewCopyWith(moduleViewDefine ModuleViewDefine) string
func ToBlocViewFromModel ¶
func ToBlocViewFromModel()
func ToBlocViewGetProps ¶
func ToBlocViewGetProps(propertyTokens []PropertyToken) string
Types ¶
type ModuleInfo ¶
type ModuleInfo struct { ProjectName string // 项目名 ProjectLogicalName string // 项目理论名 RootPath string // 根目录 ModuleName string // 机能名 ModuleLogicalName string // 机能理论名 ProcessInfos []ProcessInfo // 处理信息列表 }
/ 机能信息
type ModuleViewDefine ¶
type ModuleViewDefine struct { ModuleName string PropertyTokens []PropertyToken OrigionalCode string LinePropertyEnd int LineClassDefineEnd int }
模块View关联
func ReadView ¶
func ReadView(file string) (ModuleViewDefine, error)
type ProcessInfo ¶
type ProcessInfo struct { ProcessName string // 处理名() ProcessLogicalName string // 处理理论名 IsAsync bool // 异步标志(true: 异步 false: 同步) EventParamInfo []ParamInfo // Event参数信息 }
/ 处理信息
type PropertyToken ¶
属性Token
Click to show internal directories.
Click to hide internal directories.