dio icon indicating copy to clipboard operation
dio copied to clipboard

dio Options conflict with flutter secure storage

Open veneno261 opened this issue 6 years ago • 4 comments

hello this is the error

'Options' isn't a function. 
The name 'Options' is defined in the libraries 'package:dio/src/options.dart (via package:dio/dio.dart)' and 'package:flutter_secure_storage/flutter_secure_storage.dart'.

i can`t use those package together thank you

veneno261 avatar Feb 10 '20 13:02 veneno261

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.

stale[bot] avatar Mar 11 '20 14:03 stale[bot]

Same issue

abdullah432 avatar Jul 27 '20 18:07 abdullah432

Changing the import, it worked for me

import 'package:dio/dio.dart' as Dio;

rickafds avatar Aug 26 '20 22:08 rickafds

I changed the latter to:

import 'package:flutter_secure_storage/flutter_secure_storage.dart' as Storage;

And used it as:

new Storage.FlutterSecureStorage().write(key: 'jwt', value: model.jwt);

andreaselia avatar Nov 28 '20 17:11 andreaselia