Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
329ceaef
Unverified
Commit
329ceaef
authored
Apr 14, 2022
by
Michael Goderbauer
Committed by
GitHub
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use super parameters in templates (#101157)
parent
cc4cc699
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
main.dart.tmpl
packages/flutter_tools/templates/app/lib/main.dart.tmpl
+4
-4
main.dart.tmpl
.../flutter_tools/templates/module/common/lib/main.dart.tmpl
+3
-3
app.dart.tmpl
...es/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl
+2
-2
sample_item_details_view.dart.tmpl
...lib/src/sample_feature/sample_item_details_view.dart.tmpl
+1
-1
sample_item_list_view.dart.tmpl
...on/lib/src/sample_feature/sample_item_list_view.dart.tmpl
+2
-2
settings_view.dart.tmpl
...mplates/skeleton/lib/src/settings/settings_view.dart.tmpl
+1
-1
No files found.
packages/flutter_tools/templates/app/lib/main.dart.tmpl
View file @
329ceaef
...
...
@@ -17,7 +17,7 @@ void main() {
{{^withPluginHook}}
class MyApp extends StatelessWidget {
const MyApp({
Key? key}) : super(key: key
);
const MyApp({
super.key}
);
// This widget is the root of your application.
@override
...
...
@@ -42,7 +42,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({
Key? key, required this.title}) : super(key: key
);
const MyHomePage({
super.key, required this.title}
);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
...
...
@@ -128,7 +128,7 @@ class _MyHomePageState extends State<MyHomePage> {
{{/withPluginHook}}
{{#withPlatformChannelPluginHook}}
class MyApp extends StatefulWidget {
const MyApp({
Key? key}) : super(key: key
);
const MyApp({
super.key}
);
@override
State<MyApp> createState() => _MyAppState();
...
...
@@ -183,7 +183,7 @@ class _MyAppState extends State<MyApp> {
{{/withPlatformChannelPluginHook}}
{{#withFfiPluginHook}}
class MyApp extends StatefulWidget {
const MyApp({
Key? key}) : super(key: key
);
const MyApp({
super.key}
);
@override
_MyAppState createState() => _MyAppState();
...
...
packages/flutter_tools/templates/module/common/lib/main.dart.tmpl
View file @
329ceaef
...
...
@@ -10,7 +10,7 @@ void main() => runApp(const MyApp());
{{^withPlatformChannelPluginHook}}
class MyApp extends StatelessWidget {
const MyApp({
Key? key}) : super(key: key
);
const MyApp({
super.key}
);
// This widget is the root of your application.
@override
...
...
@@ -34,7 +34,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({
Key? key, required this.title}) : super(key: key
);
const MyHomePage({
super.key, required this.title}
);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
...
...
@@ -120,7 +120,7 @@ class _MyHomePageState extends State<MyHomePage> {
{{/withPlatformChannelPluginHook}}
{{#withPlatformChannelPluginHook}}
class MyApp extends StatefulWidget {
const MyApp({
Key? key}) : super(key: key
);
const MyApp({
super.key}
);
@override
State<MyApp> createState() => _MyAppState();
...
...
packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl
View file @
329ceaef
...
...
@@ -10,9 +10,9 @@ import 'settings/settings_view.dart';
/// The Widget that configures your application.
class MyApp extends StatelessWidget {
const MyApp({
Key?
key,
super.
key,
required this.settingsController,
})
: super(key: key)
;
});
final SettingsController settingsController;
...
...
packages/flutter_tools/templates/skeleton/lib/src/sample_feature/sample_item_details_view.dart.tmpl
View file @
329ceaef
...
...
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
/// Displays detailed information about a SampleItem.
class SampleItemDetailsView extends StatelessWidget {
const SampleItemDetailsView({
Key? key}) : super(key: key
);
const SampleItemDetailsView({
super.key}
);
static const routeName = '/sample_item';
...
...
packages/flutter_tools/templates/skeleton/lib/src/sample_feature/sample_item_list_view.dart.tmpl
View file @
329ceaef
...
...
@@ -7,9 +7,9 @@ import 'sample_item_details_view.dart';
/// Displays a list of SampleItems.
class SampleItemListView extends StatelessWidget {
const SampleItemListView({
Key?
key,
super.
key,
this.items = const [SampleItem(1), SampleItem(2), SampleItem(3)],
})
: super(key: key)
;
});
static const routeName = '/';
...
...
packages/flutter_tools/templates/skeleton/lib/src/settings/settings_view.dart.tmpl
View file @
329ceaef
...
...
@@ -7,7 +7,7 @@ import 'settings_controller.dart';
/// When a user changes a setting, the SettingsController is updated and
/// Widgets that listen to the SettingsController are rebuilt.
class SettingsView extends StatelessWidget {
const SettingsView({
Key? key, required this.controller}) : super(key: key
);
const SettingsView({
super.key, required this.controller}
);
static const routeName = '/settings';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment