Make constructor const

This commit is contained in:
Vishesh Handa
2019-10-20 01:37:39 +01:00
parent d5f91cb898
commit 8de58c138a
2 changed files with 5 additions and 5 deletions

View File

@ -49,11 +49,11 @@ Future<Directory> getGitBaseDirectory() async {
}
class GitRepo {
String folderName;
String authorName;
String authorEmail;
final String folderName;
final String authorName;
final String authorEmail;
GitRepo({
const GitRepo({
@required this.folderName,
@required this.authorName,
@required this.authorEmail,

View File

@ -40,7 +40,7 @@ class GitApp extends StatelessWidget {
}
List<Widget> _buildGitButtons() {
var gitRepo = GitRepo(
var gitRepo = const GitRepo(
folderName: basePath,
authorName: "Vishesh Handa",
authorEmail: "noemail@example.com",