complycube 1.0.1 copy "complycube: ^1.0.1" to clipboard
complycube: ^1.0.1 copied to clipboard

The official Flutter SDK for integrating ComplyCube's Identity Verification UI into your mobile app.

example/lib/main.dart

import 'package:complycube_example/constants.dart';
import 'package:complycube_example/open_comply_cube.dart';
import 'package:complycube_example/views/home_screen.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'view_models/home_view_model.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(
    ChangeNotifierProvider(
      create: (_) => HomeViewModel(),
      child: const MyApp(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: navigatorKey,
      title: 'ComplyCube Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const HomeScreen(),
    );
  }
}

// void main() {
//   WidgetsFlutterBinding.ensureInitialized();
//   runApp(const MyApp());
// }
//
// void main() {
//   runApp(
//     ChangeNotifierProvider(
//       create: (_) => HomeViewModel(),
//       child: const MyApp(),
//     ),
//   );
// }

// class MyApp extends StatelessWidget {
//   const MyApp({super.key});
//
//   @override
//   Widget build(BuildContext context) {
//     return MaterialApp(
//       title: 'ComplyCube Demo',
//       theme: ThemeData(primarySwatch: Colors.blue),
//       home: const HomeScreen(),
//     );
//   }
// }

// class MyApp extends StatefulWidget {
//   const MyApp({super.key});
//
//   @override
//   State<MyApp> createState() => _MyAppState();
// }
//
// class _MyAppState extends State<MyApp> {
//   @override
//   void initState() {
//     super.initState();
//   }
//
//   @override
//   Widget build(BuildContext context) {
//     return MaterialApp(
//       navigatorKey: navigatorKey,
//       home: ComplyCubeWidetBuilderPage(),
//     );
//   }
// }

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Plugin TestS'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text('................Test...............'),
            const SizedBox(height: 16),
            TextButton(
              onPressed: () {
                Navigator.of(context).push(
                  MaterialPageRoute<void>(
                    builder: (BuildContext context) =>
                        const OpenComplyCubeExample(), //ComplyCubeWidgetBuilder
                  ),
                );
              },
              child: const Text("open by method call"),
            ),
            const SizedBox(height: 16),
            // TextButton(
            //   onPressed: () {
            //     Navigator.of(context).push(
            //       MaterialPageRoute<void>(
            //         builder: (BuildContext context) => const ComplyCubeWidgetBuilder(), //ComplyCubeWidgetBuilder
            //       ),
            //     );
            //   },
            //   child: const Text("open by widget builder"),
            // )
          ],
        ),
      ),
    );
  }
}
2
likes
150
points
279
downloads

Publisher

verified publishercomplycube.com

Weekly Downloads

The official Flutter SDK for integrating ComplyCube's Identity Verification UI into your mobile app.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on complycube

Packages that implement complycube