final double price;
final double tax;
@ColumnInfo(name: 'exchange_rate')
final double exchangeRate;
And these columns in database:
generated code:
price: row['price'] as double
Issue:
type 'int' is not a subtype of type 'double' in type cast
I'm guessing sometimes in mappper recognizes it as int sometimes as double.
Is it possible to map it as I need?
Maybe converter where I can get Object? as input and map by myself?
I've tried to use String converter, but it's using as String instead of toString() which works fine.
I have model with these fields:
And these columns in database:
generated code:
price: row['price'] as double
Issue:
type 'int' is not a subtype of type 'double' in type cast
I'm guessing sometimes in mappper recognizes it as int sometimes as double.
Is it possible to map it as I need? Maybe converter where I can get Object? as input and map by myself? I've tried to use String converter, but it's using
as String
instead oftoString()
which works fine.Any solution?