Features

Verify the documents & liveliness

Usage

To use this plugin, add instafido_sdk as a dependency in your pubspec.yaml file.

Requirements

iOS

*Minimum iOS Deployment Target: 12.0 *Xcode 13.2.1 or newer *Swift 5

instafido_sdk does not support 32-bit architectures (i386 and armv7). instafido_sdk does support 64-bit architectures (x86_64 and arm64). Since instafido_sdk does not support 32-bit architectures (i386 and armv7), you need to exclude armv7 architectures in Xcode in order to run flutter build ios or flutter build ipa.

Go to Project > Runner > Building Settings > Excluded Architectures > Any SDK > armv7


platform :ios, '12.0'  # or newer version

...

# add this line:
$iOSVersion = '12.0'  # or newer version

post_install do |installer|
# add these lines:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end

installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)

    # add these lines:
    target.build_configurations.each do |config|
      if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
      end
    end

end
end

Android

*minSdkVersion: 21 *targetSdkVersion: 33 *compileSdkVersion: 33

Examples Here are small examples that show you how to use the API.


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

class SampleScreen extends StatefulWidget {
  const SampleScreen({Key? key}) : super(key: key);

  @override
  State<SampleScreen> createState() => _SampleScreenState();
}
class _SampleScreenState extends State<SampleScreen> {
  @override
  Widget build(BuildContext context) {
   
    return Scaffold(
      appBar: AppBar(
        title:const Text("sample app screen"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            //CustomButton(child:const Text('instafido'),onPressed: (){},),

            ElevatedButton(
              onPressed: () async {
                final response= await InstafidoSdk.start(token:tokenVal,
                    country: InstaFidoCountries.india,
                    context: context);
              },
              child: const Text(
                'go to instafido',
              ),

            ),
          ],
        ),
      ),
    );
  }
}