show static method
Future<void>
show(
- BuildContext context, {
- required ImageProvider<
Object> image, - String? title,
- Object? heroTag,
- Color backgroundColor = Colors.black,
Shows the image viewer in a fullscreen dialog route.
Implementation
static Future<void> show(
BuildContext context, {
required ImageProvider image,
String? title,
Object? heroTag,
Color backgroundColor = Colors.black,
}) =>
Navigator.of(context).push(
PageRouteBuilder(
opaque: false,
barrierColor: Colors.black.withAlpha(200),
pageBuilder: (_, __, ___) => ImageViewer(
imageProvider: image,
title: title,
heroTag: heroTag,
backgroundColor: backgroundColor,
),
transitionsBuilder: (_, animation, __, child) => FadeTransition(
opacity: animation,
child: child,
),
),
);