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

View File

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