-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Description
The flutter create templates creates a build method that looks like this (a few details omitted):
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: .center,
children: <Widget>[
const Text('You have pushed the button this many times:'),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
);
}
The <Widget> annotation on the collection passed into children seems like unnessasary verbosity. Flutter devs are quite aware of Widgets being the basic building block. And the analyzer is perfectly capable of catching non-widgets being passed in, see e.g.:
I thus suggest we get rid of that type annotation.
nateboschmunificent
Metadata
Metadata
Assignees
Labels
No labels