mogol/flutter_secure_storage

Running on web fails when _selectOptions are called

FilledStacks opened this issue · 0 comments

Using a Flutter web project, when I call

final  _accessToken = await storage.read(key: _kAccessTokenKey);

I then get the exception

Error: LateInitializationError: isLinux

This happens in the _selectOptions call on line 129 when checking for isLinux

Map<String, String>? _selectOptions(
      IOSOptions? iOptions, AndroidOptions? aOptions, LinuxOptions? lOptions) {
    if (Platform.isLinux) { //<===== throws error
      return lOptions?.params;
    }
    return Platform.isIOS ? iOptions?.params : aOptions?.params;
  }

Is there initialization logic that I need to call to ensure this value is set?