2020-04-25 13:36:07 +00:00
|
|
|
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';
|
2021-03-10 23:02:41 +00:00
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
2020-04-25 13:36:07 +00:00
|
|
|
|
|
|
|
/// Full screen image details
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class FullScreenImageRoute extends StatefulWidget {
|
|
|
|
final String url;
|
|
|
|
|
2022-03-11 16:02:06 +00:00
|
|
|
FullScreenImageRoute(this.url);
|
2020-04-25 13:36:07 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
_FullScreenImageRouteState createState() => _FullScreenImageRouteState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _FullScreenImageRouteState extends State<FullScreenImageRoute> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
2022-03-10 18:39:57 +00:00
|
|
|
title: Text(tr("Image")!),
|
2021-03-10 23:02:41 +00:00
|
|
|
actions: [
|
|
|
|
IconButton(
|
|
|
|
icon: Icon(Icons.launch), onPressed: () => launch(widget.url))
|
|
|
|
],
|
2020-04-25 13:36:07 +00:00
|
|
|
),
|
|
|
|
body: PhotoView(imageProvider: CachedNetworkImageProvider(widget.url)),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|