mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 04:48:51 +00:00
Can zoom full screen images
This commit is contained in:
parent
7e01947da9
commit
ef9a2c7190
@ -3,6 +3,7 @@ import 'package:comunic/helpers/preferences_helper.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:html/parser.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
||||
/// User interface utilities
|
||||
///
|
||||
@ -68,9 +69,8 @@ Widget buildErrorCard(String message,
|
||||
/// Show an image with a given [url] in full screen
|
||||
void showImageFullScreen(BuildContext context, String url) {
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (c) {
|
||||
// TODO : add better support later
|
||||
return CachedNetworkImage(
|
||||
imageUrl: url,
|
||||
return PhotoView(
|
||||
imageProvider: CachedNetworkImageProvider(url),
|
||||
);
|
||||
}));
|
||||
}
|
||||
|
@ -212,6 +212,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
photo_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: photo_view
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.2"
|
||||
pie_chart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -63,6 +63,9 @@ dependencies:
|
||||
# Generate random strings
|
||||
random_string: ^2.0.1
|
||||
|
||||
# Display zoomable images
|
||||
photo_view: ^0.9.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
Loading…
Reference in New Issue
Block a user