thingsboard / flutter_thingsboard_app

ThingsBoard Mobile Application
https://thingsboard.io/products/mobile/
BSD 3-Clause "New" or "Revised" License
228 stars 167 forks source link

Flutter SDK version #85

Closed thebadking closed 6 months ago

thebadking commented 6 months ago

I am having troubles starting this project, initially I tested with the latest flutter version (3.22.0) immediately had dependency errors, then I went down to (3.16.9) and it ran further but had:

Running Gradle task 'assembleDebug'...                            
lib/utils/services/widget_action_handler.dart:290:29: Error: The argument type 'List<int>?' can't be assigned to the parameter type 'List<int>' because 'List<int>?' is nullable and 'List<int>' isn't.

Android SDK Platform 32 (revision: 1)

and the latest version of Android Studio

Can someone advise on the dependencies versions? thanks

ybeshkarov commented 6 months ago

Hello @thebadking!

Did you change any dependency versions in pubspec.yaml? Generally, this error indicates that you're trying to assign a nullable type to a non-nullable one. To fix it, consider making List<int> nullable List<int>?.

thebadking commented 6 months ago

@ybeshkarov Thank you for pointing it out, I didn't change anything but just for safe measure I did reset the repo and also chose a different android image and now it works, I was able to run the app, how do I go about testing it? which back end should I run and how do I point the app to it?

ybeshkarov commented 6 months ago

With this CE repository you can use https://demo.thingsboard.io/. For more information on getting started, visit https://thingsboard.io/docs/mobile/getting-started/.

@thebadking

escalanterj commented 6 months ago

Hello, I get the following error, any clue? Because every version of flutter_localizations from sdk depends on intl 0.19.0 and thingsboard_app depends on intl 0.18.0, flutter_localizations from sdk is forbidden. So, because thingsboard_app depends on flutter_localizations from sdk, version solving failed.

Thanks!!

ybeshkarov commented 6 months ago

Hello @escalanterj,

To fix this issue, update the intl package version to align with flutter_localizations.

In your pubspec.yaml file, set the intl dependency as follows:

intl: ^0.19.0

This should resolve any version compatibility issues.