You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was really struggling to get this project up and running since the Example had no indication that the rootBundle argument must be passed to TimeMachine.initialize nor does the actual method have it as a required parameter.
Secondly, once I figured that out I struggled some more with an additional asset loading error which after much debugging I found mentioned in the API Reference that 2 assets need to be listed in pubsec.yaml, there's no mention of this in the Installation Guide.
I'm going to add the 3 main errors I was dealing with down below so that others that have similar errors can finally figure out how this library needs to be set up (until the documentation is updated), If I have the time I'll try to create a PR myself.
Unhandled Exception: Exception: Pass in the rootBundle from 'package:flutter/services.dart';
Unhandled Exception: NoSuchMethodError: The method 'getJson' was called on null.
Unhandled Exception: Unable to load asset: packages/time_machine/data/tzdb/tzdb.bin
I was really struggling to get this project up and running since the Example had no indication that the rootBundle argument must be passed to
TimeMachine.initialize
nor does the actual method have it as a required parameter.Secondly, once I figured that out I struggled some more with an additional asset loading error which after much debugging I found mentioned in the API Reference that 2 assets need to be listed in
pubsec.yaml
, there's no mention of this in the Installation Guide.I'm going to add the 3 main errors I was dealing with down below so that others that have similar errors can finally figure out how this library needs to be set up (until the documentation is updated), If I have the time I'll try to create a PR myself.
For easy copy-pasting here are the solutions:
Add to
pubsec.yaml
:How to Initialize TimeMachine:
The text was updated successfully, but these errors were encountered: