flutter_thingsboard_app icon indicating copy to clipboard operation
flutter_thingsboard_app copied to clipboard

Flutter SDK version

Open thebadking opened this issue 1 year ago • 3 comments

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

thebadking avatar May 14 '24 00:05 thebadking

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>?.

ybeshkarov avatar May 14 '24 07:05 ybeshkarov

@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?

thebadking avatar May 16 '24 02:05 thebadking

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

ybeshkarov avatar May 16 '24 10:05 ybeshkarov

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!!

escalanterj avatar May 26 '24 08:05 escalanterj

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.

ybeshkarov avatar May 28 '24 13:05 ybeshkarov