authpass / biometric_storage

Flutter plugin to store data behind biometric authentication (ie. fingerprint)
https://pub.dev/packages/biometric_storage
MIT License
184 stars 107 forks source link

Documentation missing #29

Closed Ahmadre closed 3 years ago

Ahmadre commented 3 years ago

At first: thank you for your plugin and your work here! Awesome!

But you're totally lost, if you want to integrate this plugin into your project!

The example is too much and too specific!

There's no proper documentation in the readme on how to easily use this package!

What are the API's? What are the important functions and what do they do?

It would be great if we have a documentation here, because honestly: I don't know how to start with this plugin.

For example see: https://pub.dev/packages/local_auth

hpoul commented 3 years ago

You basically only need 4 methods.

  1. Check whether biometric authentication is supported by the device
    final response = await BiometricStorage().canAuthenticate()
    if (response != CanAuthenticateResponse.success) {
      // panic..
    }
  2. Create the access object
     final store = BiometricStorage().getStorage('mystorage');
  3. Read data
     final data = await storageFile.read();
  4. Write data
     final myNewData = 'Hello World';
     await storageFile.write(myNewData);

See also the API documentation: https://pub.dev/documentation/biometric_storage/latest/biometric_storage/BiometricStorageFile-class.html#instance-methods

ghost commented 3 years ago

Great support with multi-platform, But the document example is not simple for reading.

I hope you paste simple steps and more detail for independent function|component, I mean "Get Started" part as the others library.

hpoul commented 3 years ago

@huynct I'd very much appreciate any kind of PR or other doc contribution.