flutter文件添加注释
- Android Studio的 Preferences -> Editor — File and Templates -> Dart File
/// FileName ${NAME}
///
/// @Author xxxxxx
/// @Date ${DATE} ${TIME}
///
/// @Description TODO
flutter类添加注释
- Android Studio的 Preferences -> Editor — Live Templates -> 选中Dart

flutter方法添加注释
- Android Studio的 Preferences -> Editor — Live Templates -> 选中Dart

///@title $title$
///@description TODO $param$ $return$
///@updateTime $date$ $time$
///@author xxxxxx

groovyScript("def result=''; def stop=false; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); if (params.size()==1 && (params[0]==null || params[0]=='null' || params[0]=='')) { stop=true; }; if(!stop) { for(i=0; i < params.size(); i++) {result +=((i==0) ? '\\r\\n' : '') + ((i < params.size() - 1) ? '///@param: ' + params[i] + '\\r\\n' : '///@param: ' + params[i] + '')}; }; return result;", dartMethodParameters())
groovyScript("def result=''; def data=\"${_1}\"; def stop=false; if(data==null || data=='null' || data=='' || data=='void' ) { stop=true; }; if(!stop) { result += '\\r\\n' + '
- 注意:方法的说明必须在方法内部使用快捷键操作,然后再手动复制出去,否则无法读取方法参数和返回值