Make Flex,Row,Column const for real (#119673)
* Make Flex,Row,Column const for real * dart fix --apply * fix snippets * fix integration test * add comment
This commit is contained in:
committed by
GitHub
parent
3f986e4238
commit
b0f1714b7b
@@ -279,11 +279,11 @@ class IconBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||
return const Padding(
|
||||
padding: EdgeInsets.only(left: 16.0, right: 16.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
IconWithText(Icons.thumb_up, 'Like'),
|
||||
IconWithText(Icons.comment, 'Comment'),
|
||||
IconWithText(Icons.share, 'Share'),
|
||||
@@ -578,9 +578,9 @@ class BottomBar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
BottomBarButton(Icons.new_releases, 'News'),
|
||||
BottomBarButton(Icons.people, 'Requests'),
|
||||
BottomBarButton(Icons.chat, 'Messenger'),
|
||||
|
||||
@@ -12,10 +12,10 @@ class CubicBezierPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
return const Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
Bezier(Colors.amber, 1.0),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -88,9 +88,9 @@ class StackSizePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
return const Material(
|
||||
child: Column(
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 200,
|
||||
height: 100,
|
||||
|
||||
@@ -9,10 +9,10 @@ class TextPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
return const Material(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 200,
|
||||
height: 100,
|
||||
|
||||
@@ -20,10 +20,10 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
|
||||
|
||||
@override
|
||||
Widget createWidget() {
|
||||
return Directionality(
|
||||
return const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Row(
|
||||
children: const <Widget>[
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: _TestScrollingWidget(
|
||||
initialScrollOffset: 0,
|
||||
|
||||
@@ -28,8 +28,8 @@ Future<void> main() async {
|
||||
Icon(Icons.ac_unit),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: const <Widget>[
|
||||
body: const Column(
|
||||
children: <Widget>[
|
||||
Text('Item 1'),
|
||||
Text('Item 2'),
|
||||
Text('Item 3'),
|
||||
|
||||
@@ -345,8 +345,8 @@ class _CreateCompanySheet extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: const <Widget>[
|
||||
return const Column(
|
||||
children: <Widget>[
|
||||
TextField(
|
||||
autofocus: true,
|
||||
decoration: InputDecoration(
|
||||
|
||||
Reference in New Issue
Block a user