Open pishguy opened 2 years ago
final Box<User> _user = Hive.box<User>('user');
print('${(_user.values.first.transactions.first as Transactions).cost}')
Hive doesn't always spit out the expected type because of Dart limitations. Just cast to expected type.
After creating model to make a relationship between 2 models i can't get field data from nested relationship
I have a User model which that contain other model as Transactions which that's a
HiveList
, now when i try to get a field such ascost
from Transaction with below code:i get this error:
Models:
Adapters: