๐Ÿ“ฑ Scrella Flutter SDK

A powerful Flutter SDK for integrating with Scrella API and for running interactive device health diagnostics directly inside your app.

scrella_sdk enables developers to perform hardware validation tests such as:

  • ๐Ÿ“ท Front & Back Camera Health Check
  • ๐Ÿ‘† Touch Sensitivity Test (Dead zone & multi-touch detection)
  • ๐Ÿ–ฅ๏ธ Screen Physical Health Test (Dual-device assisted inspection)

Designed speficically for Scrella partners in the fintech, insurance, insur-tech, device financing, buy-back platforms, enterprise compliance, and device refurbishment solutions.


โœจ Features

  • โœ… Camera hardware validation (front & rear)
  • โœ… Touch responsiveness & screen grid testing
  • โœ… Physical screen inspection workflow
  • โœ… Interactive guided diagnostic UI
  • โœ… Cross-platform support (Android & iOS)
  • โœ… Developer-friendly integration with Scrella API for Claims, User Registration, Authentication , Plan Activations etc.

๐Ÿš€ Installation

1๏ธโƒฃ Add Dependency

Add scrella_sdk to your pubspec.yaml:

dependencies:
  scrella_sdk: ^latest_version

After adding `scrella_sdk` to your `pubspec.yaml`, run:

```bash
flutter pub get

๐Ÿš€ Getting Started

Follow the steps below to initialize the API client and integrate the Scrella health check flow into your Flutter app.


1๏ธโƒฃ Initialize the API Client

Before using any Scrella SDK features, you must initialize the API client with your partner API key.

It is recommended to load your API key securely using environment variables.

Example using flutter_dotenv

Add dependency:

dependencies:
  flutter_dotenv: ^latest_version

Create a .env file in your project root:

Add your API key to the .env file:

PARTNER_API_KEY=your_partner_api_key_here

Initialize in main.dart:

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  await dotenv.load(fileName: ".env");
  await ScrellaApiClient.initialize(partnerApiKey: dotenv.env["PARTNER_API_KEY"]!);
  runApp(MyApp());
}

โš ๏ธ Important:

Initialize before calling runApp()

Add .env to .gitignore

Never hardcode your API key

๐Ÿงช Integrating the Health Check Flow

To launch the eligibility and device diagnostic process, wrap EligibilityScreen with ScrellaProvider.

import 'package:flutter/material.dart';
import 'package:scrella_sdk/scrella_sdk.dart';
import 'package:example/screens/dashboard.dart';

class EligibilityTestScreen extends StatelessWidget {
  const EligibilityTestScreen({
    super.key,
    required this.imeiUrl,
  });

  final String imeiUrl;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: ScrellaProvider(
          imeiUrl: imeiUrl,
          colors: ScrellaColors.defaults(),
          child: EligibilityScreen(
            onEligibilityCompleted: (bool isEligible) {
              Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => const DashboardScreen(),
                ),
                (route) => false,
              );
            },
          ),
        ),
      ),
    );
  }
}

๐ŸŽจ Customization

Use default theme:

colors: ScrellaColors.defaults()

Customize theme:

colors: ScrellaColors.defaults().copyWith(
  primary: Colors.blue,
  secondary: Colors.green
)

๐Ÿ”— Documentation & Links

For full SDK documentation, detailed API references, advanced configuration, and integration workflows, visit the official documentation below:


For additional support:

  • ๐Ÿž Open an issue on GitHub
  • ๐Ÿ“ฉ Contact the Scrella team for partner access