Skip to content

Commit 1f5f2d2

Browse files
committed
Added the sample project
1 parent 4a2233a commit 1f5f2d2

File tree

65 files changed

+1780
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1780
-38
lines changed

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

README copy.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# complycube_example
2+
3+
Demonstrates how to use the complycube plugin.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13+
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

README.md

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,46 @@ The ComplyCube Flutter SDK makes it quick and easy to build a frictionless custo
66
77
## Table of contents
88

9-
- [Features](#features)
10-
- [Requirements](#requirements)
11-
- [Getting Started](#getting-started)
12-
- [1. Installing the SDK](#1-installing-the-sdk)
13-
- [Flutter package](#flutter-package)
14-
- [CocoaPods](#cocoapods)
15-
- [Application permissions](#application-permissions)
16-
- [iOS](#ios)
17-
- [Android](#android)
18-
- [2. Creating a client](#2-creating-a-client)
19-
- [Example request](#example-request)
20-
- [Example response](#example-response)
21-
- [3. Creating an SDK token](#3-creating-an-sdk-token)
22-
- [Example request](#example-request-1)
23-
- [Example response](#example-response-1)
24-
- [4. Prepare the SDK stages](#4-prepare-the-sdk-stages)
25-
- [5. Initialize the Flutter Widget](#5-initialize-the-flutter-widget)
26-
- [6. Perform checks](#6-perform-checks)
27-
- [Example response](#example-response-2)
28-
- [7. Setup webhooks and retrieve results](#7-setup-webhooks-and-retrieve-results)
29-
- [4. Customization](#4-customization)
30-
- [Stages](#stages)
31-
- [Welcome stage](#welcome-stage)
32-
- [Consent stage](#consent-stage)
33-
- [Document stage](#document-stage)
34-
- [Selfie photo and video stage](#selfie-photo-and-video-stage)
35-
- [Proof of address stage](#proof-of-address-stage)
36-
- [Look and feel](#look-and-feel)
37-
- [Localization](#localization)
38-
- [Result handling](#result-handling)
39-
- [Error handling](#error-handling)
40-
- [Events tracking](#events-tracking)
41-
- [Custom event handler](#custom-event-handler)
42-
- [Token expiry Handler](#token-expiry-handler)
43-
- [NFC capture](#nfc-capture)
44-
- [Going live](#going-live)
45-
- [Additional info](#additional-info)
9+
- [ComplyCube Flutter SDK](#complycube-flutter-sdk)
10+
- [Table of contents](#table-of-contents)
11+
- [Features](#features)
12+
- [Requirements](#requirements)
13+
- [Getting Started](#getting-started)
14+
- [1. Installing the SDK](#1-installing-the-sdk)
15+
- [Flutter package](#flutter-package)
16+
- [CocoaPods](#cocoapods)
17+
- [Application permissions](#application-permissions)
18+
- [iOS](#ios)
19+
- [Android](#android)
20+
- [2. Creating a client](#2-creating-a-client)
21+
- [Example request](#example-request)
22+
- [Example response](#example-response)
23+
- [3. Creating an SDK token](#3-creating-an-sdk-token)
24+
- [Example request](#example-request-1)
25+
- [Example response](#example-response-1)
26+
- [4. Prepare the SDK stages](#4-prepare-the-sdk-stages)
27+
- [5. Initialize the Flutter Widget](#5-initialize-the-flutter-widget)
28+
- [6. Perform checks](#6-perform-checks)
29+
- [Example response](#example-response-2)
30+
- [7. Setup webhooks and retrieve results](#7-setup-webhooks-and-retrieve-results)
31+
- [4. Customization](#4-customization)
32+
- [Stages](#stages)
33+
- [Welcome stage](#welcome-stage)
34+
- [Consent stage](#consent-stage)
35+
- [Document stage](#document-stage)
36+
- [Selfie photo and video stage](#selfie-photo-and-video-stage)
37+
- [Proof of address stage](#proof-of-address-stage)
38+
- [Look and feel](#look-and-feel)
39+
- [| uiInterfaceStyle | Set the SDK to use dark mode (`dark`), light mode (`light`), or system inherited (`inherit`). |](#-uiinterfacestyle----------------set-the-sdk-to-use-dark-mode-dark--light-mode-light-or-system-inherited-inherit---------------------)
40+
- [Localization](#localization)
41+
- [Result handling](#result-handling)
42+
- [Error handling](#error-handling)
43+
- [Events tracking](#events-tracking)
44+
- [Custom event handler](#custom-event-handler)
45+
- [Token expiry Handler](#token-expiry-handler)
46+
- [NFC capture](#nfc-capture)
47+
- [Going live](#going-live)
48+
- [Additional info](#additional-info)
4649

4750
## Features
4851

@@ -80,7 +83,9 @@ Install the ComplyCube Flutter package by adding it to your `pubspec.yaml` file:
8083

8184
```yaml
8285
dependencies:
83-
complycube_flutter: ^latest_version
86+
complycube:
87+
hosted: 'https://complycuberepo.jfrog.io/artifactory/api/pub/cc-pub-dev-local/'
88+
version: ^0.0.1
8489
```
8590
Next, add your token from [jFrog](https://complycuberepo.jfrog.io/ui/repos/tree/General/cc-pub-release-local) to gain access to the artifactory repository. This can be done with the following command:
8691

analysis_options.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "com.complycube.flutter.complycube_example"
27+
compileSdkVersion flutter.compileSdkVersion
28+
ndkVersion flutter.ndkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
}
42+
43+
defaultConfig {
44+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45+
applicationId "com.complycube.flutter.complycube_example"
46+
// You can update the following values to match your application needs.
47+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48+
minSdkVersion flutter.minSdkVersion
49+
targetSdkVersion flutter.targetSdkVersion
50+
versionCode flutterVersionCode.toInteger()
51+
versionName flutterVersionName
52+
}
53+
54+
buildTypes {
55+
release {
56+
// TODO: Add your own signing config for the release build.
57+
// Signing with the debug keys for now, so `flutter run --release` works.
58+
signingConfig signingConfigs.debug
59+
}
60+
}
61+
}
62+
63+
flutter {
64+
source '../..'
65+
}
66+
67+
dependencies {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="complycube_example"
4+
android:name="${applicationName}"
5+
android:theme="@style/LaunchTheme"
6+
android:icon="@mipmap/ic_launcher">
7+
<activity
8+
android:name=".MainActivity"
9+
android:exported="true"
10+
android:launchMode="singleTop"
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
<category android:name="android.intent.category.LAUNCHER"/>
26+
</intent-filter>
27+
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30+
<meta-data
31+
android:name="flutterEmbedding"
32+
android:value="2" />
33+
</application>
34+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.complycube.flutter.complycube_example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>

0 commit comments

Comments
 (0)