mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Create widget for fullscreen image
This commit is contained in:
29
lib/ui/routes/full_screen_image.dart
Normal file
29
lib/ui/routes/full_screen_image.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
||||
/// Full screen image details
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
class FullScreenImageRoute extends StatefulWidget {
|
||||
final String url;
|
||||
|
||||
FullScreenImageRoute(this.url) : assert(url != null);
|
||||
|
||||
@override
|
||||
_FullScreenImageRouteState createState() => _FullScreenImageRouteState();
|
||||
}
|
||||
|
||||
class _FullScreenImageRouteState extends State<FullScreenImageRoute> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(tr("Image")),
|
||||
),
|
||||
body: PhotoView(imageProvider: CachedNetworkImageProvider(widget.url)),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user