File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ class _ImageLightboxPageState extends State<_ImageLightboxPage> {
348348 buildBottomAppBar: _buildBottomAppBar,
349349 child: SizedBox .expand (
350350 child: InteractiveViewer (
351+ maxScale: 10 , // TODO adjust based on device and image size; see #1091
351352 child: SafeArea (
352353 child: LightboxHero (
353354 messageImageContext: widget.messageImageContext,
Original file line number Diff line number Diff line change @@ -366,6 +366,16 @@ void main() {
366366 debugNetworkImageHttpClientProvider = null ;
367367 });
368368
369+ testWidgets ('image can zoom up to 10x' , (tester) async {
370+ prepareBoringImageHttpClient ();
371+ await setupPage (tester, thumbnailUrl: null );
372+
373+ check (tester.widget <InteractiveViewer >(find.byType (InteractiveViewer )).maxScale)
374+ .equals (10 );
375+
376+ debugNetworkImageHttpClientProvider = null ;
377+ });
378+
369379 void checkAppBarNameAndDate (WidgetTester tester, String expectedName, String expectedDate) {
370380 final labelTextWidget = tester.widget <RichText >(
371381 find.descendant (of: find.byType (AppBar ).last,
You can’t perform that action at this time.
0 commit comments