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

A Flutter plugin integrating the Fidel SDK for Android and iOS.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_fidel_sdk/flutter_fidel_sdk.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  final _flutterFidelSdkPlugin = FlutterFidelSdk();

  @override
  void initState() {
    super.initState();
  }

  Future<void> launchFidelSDK() async {
    _flutterFidelSdkPlugin.apiKey = "<YOUR_API_KEY>";
    _flutterFidelSdkPlugin.programKey = "<PROGRAM_KEY>";
    _flutterFidelSdkPlugin.programName = "<PROGRAM_NAME>";
    _flutterFidelSdkPlugin.termsAndConditionsURL = "<TERMS_AND_CONDS_URL>";
    _flutterFidelSdkPlugin.launchFidelSDK(
        onCompleted: (data) {
          print(data);
        },
        onUserCancelled: () {
          print("User cancelled");
        },
        onFailed: (error) {
          print(error);
        });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('FIDEL SDK Example'),
        ),
        body: Center(
          child: OutlinedButton(
            onPressed: () async {
              launchFidelSDK();
            },
            child: const Text('Launch Native Screen'),
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

verified publisherdribba.com

A Flutter plugin integrating the Fidel SDK for Android and iOS.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_fidel_sdk