mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a LinearProgressIndicator doesn't crash in 0x0 environ… (#177553)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the LinearProgressIndicator widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This commit is contained in:
parent
6a3011b4e1
commit
647ce0c00a
@ -1969,6 +1969,15 @@ void main() {
|
||||
paints..arc(startAngle: 1.5707963267948966, sweepAngle: 0.001),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('LinearProgressIndicator does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Center(child: SizedBox.shrink(child: LinearProgressIndicator())),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(LinearProgressIndicator)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
class _RefreshProgressIndicatorGolden extends StatefulWidget {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user