Leads2Keys - Flutter SDK
This package is for Leads2Keys real-estate survey app partners.
Add the package as dependency in your pubspec.yaml and run flutter pub get.
Leads2KeysApi uses OAuth02 to successfully connect users. You need to setup your credentials using LK.credentials().
LK.credentials(clientId: 'your client id', clientSecret: 'your client secret');
You can contact us at email@example.com to request your credentials.
You can call the LK.signIn() method that will popup a form for user signin and authorization.
final account = await LK.signIn(context);
Silent signin with a previously logged account
When returning to your app you can use the silentSignIn method, which will silently returns the account without any user interaction.
final account = await LK.silentSignIn();
Signout from a previously logged account
Then using the account you can retrieve the mandates by agency.
final mandates = await account.mandates(agency:account.agencies.first);
The LKMandate class itself contains all the informations you need.
String id; LKPlace place; LKProject project; LKGood good;
final Widget image = account.document(imageId);
For more detailled information you can take a look at our example app
2022 HB PropTech & innovation