Closed BaTaTaAdb closed 4 months ago
There's also a need for dependencies update, but I might need some help here.
Because inventree depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because inventree depends on intl ^0.18.0, version solving failed
This can be solved by updating the dependency:
flutter pub add intl:^0.19.0
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/controllers/one_context.dart:92:5: Error: Expected 0 type arguments.
PersistentBottomSheetController<T> Function<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/components/one_context_widget.dart:112:3: Error: Expected 0 type arguments.
PersistentBottomSheetController<T> _showBottomSheet<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/controllers/dialog_controller.mixin.dart:70:3: Error: Expected 0 type arguments.
PersistentBottomSheetController<T> Function<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/controllers/dialog_controller.mixin.dart:189:10: Error: Expected 0 type arguments.
Future<PersistentBottomSheetController<T>?> showBottomSheet<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/controllers/dialog_controller.mixin.dart:245:7: Error: Expected 0 type arguments.
PersistentBottomSheetController<T> Function<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/one_context-2.1.0/lib/src/components/one_context_widget.dart:122:12: Error: Expected 0 type arguments.
return showBottomSheet<T>(
^
/C:/Flutter/packages/flutter/lib/src/material/bottom_sheet.dart:1335:33: Context: Found this candidate, but the arguments don't match.
PersistentBottomSheetController showBottomSheet({
^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
Which is easily fixed by also updating the dependencies:
flutter pub add one_context:^4.0.0
Seems like my environment and the CI's are different. Should we update the environment on CI or make a doc about how the environment is setup?
@BaTaTaAdb looks like some other packages will need to be updated too:
https://github.com/inventree/inventree-app/actions/runs/9354952253/job/25749003099?pr=501
While trying to do the needed updates so I could build the app, I came across multiple errors, like the app not looking quite right:
This is because I'm using flutter 3.22.1, while CI and probably the one who built the Play Store's app are on version 3.13.0, where Flutter_localizations is pinning intl version 0.18.1 from the flutter sdk. This suggest that the outdated fluttersdk that is being used only compiles if intl is 0.18.1.
I tried compiling this environment:
Flutter (Channel stable, 3.13.0, on Microsoft Windows [Version 10.0.26120.751], locale pt-PT) • Flutter version 3.13.0 on channel stable at C:\Flutter\flutter-3.13.0 • Upstream repository https://github.com/flutter/flutter.git • Framework revision efbf63d9c6 (10 months ago), 2023-08-15 21:05:06 -0500 • Engine revision 1ac611c64e • Dart version 3.1.0 • DevTools version 2.25.0
and it work beatifully (photos bellow):
If you do want me to add some documentation on how to build the app, just let me know and I'll modify the README.md, or else, if you want to update all the libraries and try to "fix" the app while using the latest libraries, I can also (try) to help.
It would make sense to get it up to date with the latest tools.. Otherwise it will soon start breaking entirely. It is frustrating how often the tools have breaking changes like this.
There's a need for an android SDK update as it won't compile if using SDK 33.
Android SDK 33 to 34