finik_sdk 0.1.1 finik_sdk: ^0.1.1 copied to clipboard
This Flutter package allows your application to integrate Finik application features.
Finik SDK #
Description #
The Finik SDK is a Flutter package that allows your app to fetch QR codes from the Finik server using GraphQL.
It also provides a pre-built QR page for seamless and quick integration into your app.
Platform | Android | iOS | Linux | macOS | Web | Windows |
---|---|---|---|---|---|---|
Support | SDK 19+ | 12.0+ | - | - | - | - |
Features #
1. Fetch QR Codes from Server #
Retrieve QR codes efficiently using GraphQL queries for up-to-date and reliable data.
2. Pre-Built QR Page #
Integrate a ready-to-use QR page into your app to save development time and effort.
3. Custom Implementation with QRBloc #
Leverage the QRBloc to build customized QR pages and enhance user experience and functionality.
4. QR Code Scanning #
Currently under development. Stay tuned for updates.
Usage #
1. Initialize the Package #
Add the initialization code in your app's main entry point:
Parameters
- apiKey: Your Finik server API key.
- useHiveForGraphQLCache: Determines where the SDK stores GraphQL data:
- Set to true to use Hive, which persists data locally on disk.
- Set to false to use InMemoryStore, which stores data in memory (ideal for temporary storage during app runtime).
void main() async {
await FinikSdk.initialization(
apiKey: '<YOUR_API_KEY>',
useHiveForGraphQLCache: false,
);
runApp(const MyApp());
}
2. Example Implementation #
Here's an example of how to use FinikProvider to integrate the SDK into your app:
import 'package:flutter/material.dart';
import 'package:finik_sdk/finik_sdk.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Finik DEMO',
home: FinikProvider(
languageCode: 'en',
onBackPressed: () => debugPrint('onBackPressed'),
widget: const CreateItemHandlerWidget(
accountId: 'YOUR_ITEM_ID',
nameEn: 'YOUR_NAME_EN',
),
),
);
}
}
Compatibility #
- Dart: Version 2.17.0 or higher
- Platforms: Android (SDK 19+), iOS (12.0+)
Contributions #
We welcome feedback and contributions to improve the Finik SDK.
Feel free to report issues or suggest enhancements!
Contact #
For questions or support, reach out via email: averspay.kg@gmail.com