Unverified Commit b83eb465 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Updating the Chip demo in the Gallery to include all the new types of chips. (#16522)

This chip demo is more interactive than the last one, trying to exercise all of the types of chips for a demo that lets you select different types of "chips" (like tortilla, wood, micro, etc.), and then filter them and select an action on them.
parent cdf80b64
...@@ -146,7 +146,7 @@ class CircleAvatar extends StatelessWidget { ...@@ -146,7 +146,7 @@ class CircleAvatar extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
assert(debugCheckHasMediaQuery(context)); assert(debugCheckHasMediaQuery(context));
final ThemeData theme = Theme.of(context); final ThemeData theme = Theme.of(context);
TextStyle textStyle = theme.primaryTextTheme.title.copyWith(color: foregroundColor); TextStyle textStyle = theme.primaryTextTheme.subhead.copyWith(color: foregroundColor);
Color effectiveBackgroundColor = backgroundColor; Color effectiveBackgroundColor = backgroundColor;
if (effectiveBackgroundColor == null) { if (effectiveBackgroundColor == null) {
switch (ThemeData.estimateBrightnessForColor(textStyle.color)) { switch (ThemeData.estimateBrightnessForColor(textStyle.color)) {
......
...@@ -296,7 +296,7 @@ class ThemeData extends Diagnosticable { ...@@ -296,7 +296,7 @@ class ThemeData extends Diagnosticable {
assert(iconTheme != null), assert(iconTheme != null),
assert(primaryIconTheme != null), assert(primaryIconTheme != null),
assert(accentIconTheme != null), assert(accentIconTheme != null),
assert(sliderTheme != null), assert(sliderTheme != null),
assert(chipTheme != null), assert(chipTheme != null),
assert(platform != null); assert(platform != null);
......
...@@ -156,7 +156,7 @@ void main() { ...@@ -156,7 +156,7 @@ void main() {
), ),
); );
expect(tester.getSize(find.text('Z')), equals(const Size(20.0, 20.0))); expect(tester.getSize(find.text('Z')), equals(const Size(16.0, 16.0)));
await tester.pumpWidget( await tester.pumpWidget(
wrap( wrap(
...@@ -185,7 +185,7 @@ void main() { ...@@ -185,7 +185,7 @@ void main() {
), ),
), ),
); );
expect(tester.getSize(find.text('Z')), equals(const Size(20.0, 20.0))); expect(tester.getSize(find.text('Z')), equals(const Size(16.0, 16.0)));
}); });
testWidgets('CircleAvatar respects minRadius', (WidgetTester tester) async { testWidgets('CircleAvatar respects minRadius', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment