rebelappstudio / accessibility_tools

MIT License
65 stars 4 forks source link

Build failed with flutter 3.19.5 #52

Closed LenaWirtz closed 3 weeks ago

LenaWirtz commented 1 month ago

Hi there, i tried to test your package and run the example project. Unfortunately i got an error building the app. Any suggestions?

This is the error:

../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/accessibility_tools.dart:386:28: Error: The getter 'globalPosition' isn't defined for the class 'DragEndDetails'.
 - 'DragEndDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'globalPosition'.
    _panPosition = details.globalPosition;
                           ^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

This is my flutter doctor summary:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.19045.4529], locale de-DE)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.91.0)
[√] Connected device (4 available)
[√] Network resources

• No issues found!
aednlaxer commented 1 month ago

Hi,

Thanks for trying out the package.

Looks like DragDetails.globalPosition was added in Flutter 3.22 (PR) while you're using version 3.19.5 where this property is not yet available. Would it be possible to upgrade your Flutter version globally to the latest stable release using flutter upgrade? Another option is to install fvm to use Flutter 3.22 locally just for this example project

LenaWirtz commented 1 month ago

Hi, thanks for your message. Okay, I will think about updating my Flutter version. Maybe you could write it somewhere in your readme that it only works with the current Flutter version. Sometimes people leave their Flutter version on a certain one because there were breaking changes. :)

aednlaxer commented 3 weeks ago

Understandable why people may use a slightly older Flutter version. I'll close this issue, let's see if this is still a problem in the future and what we can do about it