Add pinch to zoom
This commit is contained in:
parent
5394881600
commit
e82cc82556
|
|
@ -23,8 +23,8 @@ import 'package:invoiceninja_flutter/utils/completers.dart';
|
|||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:pinch_zoom/pinch_zoom.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||
|
|
@ -312,18 +312,17 @@ class DocumentTile extends StatelessWidget {
|
|||
context: navigatorKey.currentContext,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(),
|
||||
child: Text(localization.close
|
||||
.toUpperCase())),
|
||||
],
|
||||
content: Image.memory(
|
||||
response.bodyBytes,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
);
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(),
|
||||
child: Text(localization.close
|
||||
.toUpperCase())),
|
||||
],
|
||||
content: PinchZoom(
|
||||
child: Image.memory(
|
||||
response.bodyBytes),
|
||||
));
|
||||
});
|
||||
} else if (value == localization.download) {
|
||||
final http.Response response = await WebClient()
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ dependencies:
|
|||
flutter_staggered_grid_view: ^0.6.2
|
||||
desktop_drop: ^0.4.1
|
||||
widget_kit_plugin: ^0.1.1
|
||||
pinch_zoom: ^1.0.0
|
||||
# quick_actions: ^0.2.1
|
||||
# idb_shim: ^1.11.1+1
|
||||
|
||||
|
|
|
|||
|
|
@ -1072,6 +1072,14 @@ packages:
|
|||
url: "https://github.com/bluefireteam/photo_view"
|
||||
source: git
|
||||
version: "0.14.0"
|
||||
pinch_zoom:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: pinch_zoom
|
||||
sha256: ad12872281742726afaf03438d99a4572c584a612630768953beb6dfd6f9389a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
pinput:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ dependencies:
|
|||
flutter_staggered_grid_view: ^0.6.2
|
||||
desktop_drop: ^0.4.1
|
||||
widget_kit_plugin: ^0.1.1
|
||||
pinch_zoom: ^1.0.0
|
||||
# quick_actions: ^0.2.1
|
||||
# idb_shim: ^1.11.1+1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue