You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
719 B
Dart
21 lines
719 B
Dart
|
2 weeks ago
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
||
|
|
|
||
|
|
class FullScreenImageViewer extends StatelessWidget {
|
||
|
|
final Widget child;
|
||
|
|
|
||
|
|
const FullScreenImageViewer(this.child, {Key? key}) : super(key: key);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return Scaffold(
|
||
|
|
body: Stack(
|
||
|
|
children: [
|
||
|
|
InteractiveViewer(clipBehavior: Clip.none, panEnabled: true, minScale: 0.5, maxScale: 4.0, child: child).center,
|
||
|
|
Positioned(top: MediaQuery.of(context).padding.top, left: 12.0, child: const Icon(Icons.clear).toShadowContainer(context, width: 40, padding: 8).onPress(() => Navigator.maybePop(context))),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|