自定义文件模板
Android Studio 设置路径:Android Studio | Preferences | 搜索Templates | File and Code Templates | Dart File 设置步骤如下图:
模版代码
import 'package:flutter/material.dart';
/*** @author[${USER}]* @version[创建日期,${DATE} ${TIME}]* @function[功能简介 ${DESCRIPTION}]**/
class ${NAME}Page extends StatefulWidget {
const ${NAME}Page({Key? key}) : super(key: key);@override_${NAME}PageState createState() => _${NAME}PageState();
}class _${NAME}PageState extends State<${NAME}Page> {@overrideWidget build(BuildContext context) {return Scaffold(appBar: AppBar(title: Text("${NAME}"),),body: Center(child: Column(), )// This trailing comma makes auto-formatting nicer for build methods.);
}
}