recco 0.0.1 copy "recco: ^0.0.1" to clipboard
recco: ^0.0.1 copied to clipboard

outdated

A Flutter plugin for both iOS and Android recco-sdk.

[recco_header]

Flutter Android iOS

Pub DEV

Recco Flutter Plugin #

This repository holds the codebase for the Recco Flutter plugin. Instructions on how to add and use this plugin can be found in the Usage section.

Overview #

Personalized, and user-friendly approach to health and wellness recommendations based on users' unique interests, motivations, and health behaviors. Whether they are looking to improve their fitness, manage their stress, or simply lead a more fulfilling life. Recco is designed to help them reach their full potential.

Learn more about Recco SDK:

Usage #

Add this to pubspec.yaml

dependencies:
  recco: 0.0.0

Initial setup on Android #

Recco Android SDK depends internally on Hilt. If your Android app does not use Hilt already, you will have to add this setup:

Add Hilt dependency to your app build.gradle:

implementation "com.google.dagger:hilt-android:2.47"
kapt "com.google.dagger:hilt-android-compiler:2.47"

Then decorate your Application class with the @HiltAndroidApp annotation:

@HiltAndroidApp
class ShowcaseApp : FlutterApplication() {

}

You can check the example app inside this repo for more details.

ReccoPlugin new Instance #

final Recco _reccoPlugin = Recco();

Init #

Initialize Recco SDK at the initState of your app.

Future<void> _initializeRecco(String clientSecret) async {
    try {
      _reccoPlugin.initialize(clientSecret, ReccoStyle.spring());
    } on PlatformException catch (e) {
      debugPrint("Error: '${e.message}'.");
    }
  }

Login #

Future<String> _loginReccoSDK(String userId) async {
    try {
        _reccoPlugin.login(userId);
    } on PlatformException catch (e) {
        debugPrint("Error: '${e.message}'.");
    }
    return userId;
}

Logout #

Future<void> _logoutReccoSDK() async {
    try {
      _reccoPlugin.logout();
    } on PlatformException catch (e) {
      debugPrint("Error: '${e.message}'.");
    }
}

OpenReccoUi #

Future<void> _openReccoUI() async {
    try {
      _reccoPlugin.openReccoUI();
    } on PlatformException catch (e) {
      debugPrint("Error: '${e.message}'.");
    }
}
2
likes
0
points
0
downloads

Publisher

verified publishersignifico.com

Weekly Downloads

A Flutter plugin for both iOS and Android recco-sdk.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on recco

Packages that implement recco