Commit 1658fd94 authored by Marcin Szałek's avatar Marcin Szałek Committed by Ian Hickson

Added size to stepper icons (#19313)

* Added size to stepper icons

* Added Stepper icons size test
parent 2ab4ed74
...@@ -242,11 +242,13 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin { ...@@ -242,11 +242,13 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
return new Icon( return new Icon(
Icons.edit, Icons.edit,
color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight, color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
size: 18.0,
); );
case StepState.complete: case StepState.complete:
return new Icon( return new Icon(
Icons.check, Icons.check,
color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight, color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
size: 18.0,
); );
case StepState.error: case StepState.error:
return const Text('!', style: _kStepStyle); return const Text('!', style: _kStepStyle);
......
...@@ -392,4 +392,34 @@ void main() { ...@@ -392,4 +392,34 @@ void main() {
expect(find.text('!'), findsOneWidget); expect(find.text('!'), findsOneWidget);
}); });
///https://github.com/flutter/flutter/issues/16920
testWidgets('Stepper icons size test', (WidgetTester tester) async {
await tester.pumpWidget(
new MaterialApp(
home: Material(
child: new Stepper(
steps: const <Step>[
const Step(
title: const Text('A'),
state: StepState.editing,
content: const SizedBox(width: 100.0, height: 100.0),
),
const Step(
title: const Text('B'),
state: StepState.complete,
content: const SizedBox(width: 100.0, height: 100.0),
),
],
),
),
),
);
RenderBox renderObject = tester.renderObject(find.byIcon(Icons.edit));
expect(renderObject.size, equals(const Size.square(18.0)));
renderObject = tester.renderObject(find.byIcon(Icons.check));
expect(renderObject.size, equals(const Size.square(18.0)));
});
} }
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