TKK_E32210755/lib/Screen/fullscreenimage.dart

39 lines
1.0 KiB
Dart

import 'dart:convert';
import 'package:flutter/material.dart';
class FullScreenImagePage extends StatelessWidget {
final String imageBase64;
const FullScreenImagePage({super.key, required this.imageBase64});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: Center(
child: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: LayoutBuilder(
builder: (context, constraints) {
return InteractiveViewer(
panEnabled: true,
boundaryMargin: const EdgeInsets.all(20),
minScale: 0.1,
maxScale: 4.0,
child: Image.memory(
base64Decode(imageBase64),
width: constraints.maxWidth,
height: constraints.maxHeight,
fit: BoxFit.contain,
),
);
},
),
),
),
);
}
}