openwebf/webf

[BUG] `LocalStorageModule` automatically inits `homePath` for `Hive`

Closed this issue · 1 comments

Affected version

[0.14.0, 0.15.0] 469012f

No same issues found.

  • Yes, I search all issues but not found.

Steps to Reproduce

  1. Create an example that is using Hive and WebF.
  2. Call Hive.init(anotherPath) at the beginning of the app.
  3. Open a box named foo_box_name and write something.
  4. Construct a WebF widget (let LocalStorageModule initialize).
  5. Open the foo_box_name box again, it actually opens another box under the module's path.

Code example

Expected results

The module should not override the home path or can be configured to not initialize the home path.

Actual results

The home path was overridden by the module.

Workaround

AstroxNetwork/flutter_webf@eb95a17

Fixed at #504