Installation

Prerequisites:

  • minimum supported Android version is 21 (Lollipop)

  • minimum supported iOS version is 9.0

Extensive demo example on how to implement kevin. Flutter project can be found in our public github repository.

Import library features you will use in pubspec.yaml . Core library is mandatory, both accounts and in_app_payments are optional.

pubspec.yaml
kevin_flutter_core: ^1.2.0
kevin_flutter_in_app_payments: ^1.2.0
kevin_flutter_accounts: ^1.2.0

Current version is here

Initialise plugins you will use in your app's main() method. Check our customisations section for a guide on how to customise SDK UI.

main.dart
Future<void> main() async {
  // setup optional theme
  await _setTheme();
  //  set optional locale, default is phone locale
  await Kevin.setLocale('en');
  //  initialize required plugins with your callback urls
  await KevinAccounts.setAccountsConfiguration(
    const KevinAccountsConfiguration(
      callbackUrl: KevinCallbackUrl.single(callbackUrl: 'https://your.callback.url'),
    ),
  );
  await KevinPayments.setPaymentsConfiguration(
    const KevinPaymentsConfiguration(
      callbackUrl: KevinCallbackUrl.single(callbackUrl: 'https://your.callback.url'),
    ),
  );

  runApp(const AppWidget());
}

Future<void> _setTheme() async {
  const androidTheme = KevinThemeAndroid('CustomTheme');
  const iosTheme = KevinThemeIos();

  await Kevin.setTheme(
    androidTheme: androidTheme,
    iosTheme: iosTheme,
  );
}

Last updated