Closed Sipioteo closed 1 year ago
My bad, there were an error into the pubspec. I was mixting 1.7 with 1.6
@Sipioteo You can safely only specify a version for the objectbox
package and leave the other ObjectBox dependencies at any
. Dart will make sure that the correct version is used as the other packages require a single objectbox
version.
The error:
When i put "order" function in build query the compiler says
This expression has type 'void' and can't be used.
but the IDE (VSCode) dosen't show any error and the function has a return.Basic info:
1.6.2
Flutter 3.3.9 • channel stable • https://github.com/flutter/flutter.git Framework • revision b8f7f1f986 (4 weeks ago) • 2022-11-23 06:43:51 +0900 Engine • revision 8f2221fbef Tools • Dart 2.18.5 • DevTools 2.15.0
yes
always
Android | IOS
Xiaomi Redmi K20 Pro | iPhone 6
Dependencies:
objectbox: ^1.6.2
objectbox_flutter_libs: ^1.6.2
objectbox_generator: ^1.6.2
Error stack
The error comes form the function "getElementAt" into the invoice.dart file. If i remove the "order" it works, otherwise the compiler shows the error
Code
core.dart
invoice.dart
Expected behavior
Well, it should not behave like that because in the source code the order function HAS a return type.