finik_sdk 0.1.12 copy "finik_sdk: ^0.1.12" to clipboard
finik_sdk: ^0.1.12 copied to clipboard

This Flutter package allows your application to integrate Finik application features.

example/lib/main.dart

import 'package:finik_sdk/finik_sdk.dart';

void main() async {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Finik SDK',
      home: FinikProvider(
        apiKey: 'YOUR_API_KEY',
        // OPTIONAL - default FinikSdkLocale.KG
        locale: FinikSdkLocale.EN,
        // OPTIONAL - default true
        useHiveForGraphQLCache: false,
        onBackPressed: () {},
        onPaymentSuccess: (data) {},
        onPaymentFailure: (String message) {},
        widget: const CreateItemHandlerWidget(
          accountId: 'YOUR_ACCOUNT_ID',
          nameEn: 'YOUR_NAME_EN',
          // OPTIONAL
          callbackUrl: 'YOUR_CALLBACK_URL',
          // OPTIONAL
          fixedAmount: 123.45,
          // OPTIONAL
          requiredFields: [
            RequiredField(
              fieldId: 'YOU_FIELD_ID_FOR_REQUIRED_FIELD',
              value: 'YOUR_VALUE',
            ),
          ],
          // OPTIONAL - default TextScenario.replenishment
          textScenario: TextScenario.payment,
        ),
      ),
    );
  }
}
copied to clipboard