When I run the app on Android or iPhone, it worked fine. But when I ran the same code on a wear os emulator it showed this error: FormatException: Invalid radix-10 number.
Solution
The problem was with datetime parsing. Somehow, it chose different settings for datetime parsing.
DateTimeColumn get updatedAt => dateTime().nullable()();
It was using dateTime stored in ISO format but was parsing it as a Unix timestamp.
Bug
When I run the app on Android or iPhone, it worked fine. But when I ran the same code on a wear os emulator it showed this error:
FormatException: Invalid radix-10 number
.Solution
The problem was with datetime parsing. Somehow, it chose different settings for datetime parsing.
DateTimeColumn get updatedAt => dateTime().nullable()();
It was using dateTime stored in ISO format but was parsing it as a Unix timestamp.
The solution is to add this to
build.yaml
:https://drift.simonbinder.eu/docs/advanced-features/builder_options/
-- I am sharing it so that other people in the future have it easier. Enjoy this awesome package!