forked from firka/flutter
end of sort_child_properties_last (#82457)
This commit is contained in:
committed by
GitHub
parent
d9db3ea6e6
commit
157bc92d4a
@@ -87,8 +87,8 @@ class _FilteredChildAnimationPageState extends State<FilteredChildAnimationPage>
|
||||
children: List<Widget>.generate(rows, (int r) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: List<Widget>.generate(cols, (int c) => Container(
|
||||
child: Text('text', style: TextStyle(fontSize: fontSize)),
|
||||
decoration: decoration,
|
||||
child: Text('text', style: TextStyle(fontSize: fontSize)),
|
||||
)),
|
||||
)),
|
||||
),
|
||||
@@ -138,8 +138,8 @@ class _FilteredChildAnimationPageState extends State<FilteredChildAnimationPage>
|
||||
return RepaintBoundary(
|
||||
child: AnimatedBuilder(
|
||||
animation: _controller,
|
||||
child: protectChild ? RepaintBoundary(child: child) : child,
|
||||
builder: builder,
|
||||
child: protectChild ? RepaintBoundary(child: child) : child,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -75,16 +75,16 @@ class _MultiWidgetConstructTableState extends State<MultiWidgetConstructTable>
|
||||
key: ValueKey<int>(widgetCounter + label),
|
||||
color: Color.lerp(
|
||||
Colors.white, baseColor, label / totalLength),
|
||||
child: Text('${widgetCounter + label}'),
|
||||
constraints: BoxConstraints.expand(height: height),
|
||||
child: Text('${widgetCounter + label}'),
|
||||
)
|
||||
: MyContainer(
|
||||
// This key forces rebuilding the element
|
||||
key: ValueKey<int>(widgetCounter + label),
|
||||
color: Color.lerp(
|
||||
Colors.white, baseColor, label / totalLength),
|
||||
child: Text('${widgetCounter + label}'),
|
||||
constraints: BoxConstraints.expand(height: height),
|
||||
child: Text('${widgetCounter + label}'),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -109,8 +109,8 @@ class MyContainer extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: color,
|
||||
child: child,
|
||||
constraints: constraints,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,9 +310,9 @@ class StockHomeState extends State<StockHome> {
|
||||
Widget buildFloatingActionButton() {
|
||||
return FloatingActionButton(
|
||||
tooltip: 'Create company',
|
||||
child: const Icon(Icons.add),
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
onPressed: _handleCreateCompany,
|
||||
child: const Icon(Icons.add),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ class StockRow extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: DefaultTextStyle.of(context).style.textBaseline,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 2,
|
||||
@@ -77,8 +79,6 @@ class StockRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: DefaultTextStyle.of(context).style.textBaseline,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -28,8 +28,10 @@ class _StockSymbolView extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
stock.symbol,
|
||||
@@ -38,7 +40,6 @@ class _StockSymbolView extends StatelessWidget {
|
||||
),
|
||||
arrow,
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
),
|
||||
Text('Last Sale', style: headings),
|
||||
Text('$lastSale ($changeInPrice)'),
|
||||
@@ -61,7 +62,6 @@ class _StockSymbolView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user