Fix Roomplan being buggy when zoomed

This commit is contained in:
Elias Müller 2023-06-03 01:11:16 +02:00
parent 8d208a3389
commit 6d0898d6ac
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';
class Roomplan extends StatelessWidget {
const Roomplan({Key? key}) : super(key: key);
@ -8,16 +9,15 @@ class Roomplan extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Raumplan"),
title: const Text("Raumplan"),
),
backgroundColor: Colors.white,
body: InteractiveViewer(
panEnabled: true,
alignment: Alignment.center,
minScale: 0.8,
maxScale: 2,
child: Image.asset("assets/img/raumplan.jpg")
),
body: PhotoView(
imageProvider: Image.asset("assets/img/raumplan.jpg").image,
minScale: 0.5,
maxScale: 2.0,
backgroundDecoration: const BoxDecoration(color: Colors.white60),
)
);
}
}

View File

@ -79,6 +79,7 @@ dependencies:
async: ^2.11.0
animated_digit: ^3.2.1
syncfusion_flutter_pdfviewer: ^21.2.8
photo_view: ^0.14.0
dev_dependencies:
flutter_test: