├── .idea ├── .gitignore ├── UIDAI-Hackathon.iml ├── libraries │ ├── Dart_Packages.xml │ └── Dart_SDK.xml ├── modules.xml ├── runConfigurations │ └── client_app.xml └── vcs.xml ├── README.md ├── Resident App.mp4 ├── Verifier App.mp4 ├── architecture_diagram.png ├── banner - 16:9.png ├── banner.png ├── resident_app ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── resident_app │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ └── splash.png ├── lib │ ├── api │ │ ├── captcha_generation.dart │ │ ├── captcha_generation_util.dart │ │ ├── get_ekyc.dart │ │ ├── get_ekyc_util.dart │ │ ├── otp_auth.dart │ │ ├── otp_auth_util.dart │ │ ├── otp_request.dart │ │ ├── otp_request_util.dart │ │ ├── vid_generate.dart │ │ ├── vid_generate_util.dart │ │ ├── vid_otp_request.dart │ │ └── vid_otp_request_util.dart │ ├── camera_screen.dart │ ├── home_screen.dart │ ├── login_screen.dart │ ├── main.dart │ └── resident_data.dart ├── pubspec.lock └── pubspec.yaml └── verifier_app ├── .gitignore ├── .metadata ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── verifier_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── api │ ├── captcha_generation.dart │ ├── captcha_generation_util.dart │ ├── get_ekyc.dart │ ├── get_ekyc_util.dart │ ├── offline_ekyc_otp_request.dart │ ├── offline_ekyc_otp_request_util.dart │ ├── otp_auth.dart │ ├── otp_auth_util.dart │ ├── otp_request.dart │ ├── otp_request_util.dart │ ├── vid_generate.dart │ ├── vid_generate_util.dart │ ├── vid_otp_request.dart │ └── vid_otp_request_util.dart ├── camera_screen.dart ├── home_screen.dart ├── main.dart ├── qr_scanner.dart ├── resident_data.dart └── verifier_data.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/UIDAI-Hackathon.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_Packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/runConfigurations/client_app.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Banner](https://user-images.githubusercontent.com/64774148/192003176-88cd889a-c30a-4534-8c32-45e600d55286.png) 2 | 3 | ### 100% Authentication success in Rural India 4 | 5 | Second Place Winner for the UIDAI Hackathon 2021 by Team 202 ACCEPTED. Our Project was to develop 2 Applications for Verification and Authentication of identity using Aadhaar biometrics on mobile devices. 6 | 7 | ##### Please do not ask how to implement this as the Aadhaar API is disabled completely. It was only available during the hackathon and cannot be used now. 8 | 9 |
10 | 11 | ## Important Links 12 | 13 | * [Video Recording of Apps](https://drive.google.com/drive/folders/1322cyvZyhc_71UxXgd9phQR2dFMM7lZ2?usp=sharing) 14 | * [Compiled APKs (Verifier and Resident)](https://drive.google.com/drive/folders/1Nm-D_hOP8DvX-84G0MmmSq87CFw2rvel?usp=sharing) 15 | * [Presentation of Solution](https://docs.google.com/presentation/d/1Y_3-m4eiQ-Im2bgNyngsnCTiFiHP7KJJ8Qe4wQY0Hn0/edit?usp=sharing) 16 | * [Screenshots of App](https://drive.google.com/drive/folders/1yqrvqmFdz82PvhLRp3VgP-M9xBx-h8UG?usp=sharing) 17 | * [Google Drive Link](https://drive.google.com/drive/u/1/folders/1UCbi8d1H3KmbGus2gnI6PwYWdqzX4PD0) 18 | 19 | 20 |
21 | 22 | ### App Flow 23 | 24 | #### Scenario 25 | * Resident approaches PDS shop for Ration. 26 | * Located in Rural India with no 3G/4G connectivity. 27 | 28 | #### Verifier APP 29 | * Uses OTP Authentication as primary mechanism. 30 | * Resident Shares Virtual Aadhaar Number / Offline eKYC with PDS shop. 31 | * Application facilitates OTP Authentication, Online/Offline Face Authentication for Completely inclusive authentication. 32 | 33 | #### Resident App 34 | * OTP verification for secure login. 35 | * Facilitates generation of Virtual Aadhaar Number with Captcha and OTP based security. 36 | * Facilitates downloading eKYC XML to share with Verifier using QR code for OFfline Face Auth. 37 | 38 |
39 | 40 | ### General 41 | 42 | This is a project submitted to the UIDAI Aadhar Authentication Hackathon. We try to explore authentication options in a variety of ways, while providing a seamless transition from online to offline. The methods of Authentication are: 43 | - Fingerprint Matching (Simulated due to lack of fingerprint sensors) 44 | - Aadhaar based OTP matching (Via SMS or email) 45 | - Stateless Face Matching 46 | 47 | The navigational structure of the project looks something like this 48 | 49 | ``` 50 | resident_app 51 | ├── android/.. 52 | ├── assets/.. 53 | ├── lib 54 | │   ├── camera_screen.dart 55 | │   ├── home_screen.dart 56 | │   ├── login_screen.dart 57 | │   ├── main.dart 58 | │   └── resident_data.dart 59 | ├── pubspec.lock 60 | └── pubspec.yaml 61 | ``` 62 | 63 | with the files in `lib` containing the important application data 64 | 65 |
66 | 67 | ![Architecture Diagram](architecture_diagram.png) 68 | 69 | ### Approach 70 | 71 | #### Offline Fingerprint Authentication 72 | * UIDAI server generates a secure hash of the recorded fingerprint and sends it to the resident application as unique id (at setup). 73 | * Verifier accepts hash value from resident application using QR code. 74 | * Verifier also takes actual fingerprint and computes its hash. 75 | * If both hashes match, authenticity is proven completely offline (extremely fast). 76 | 77 | #### Offline Face Match 78 | * If fingerprint authentication not possible, Offline Stateless Face match implemented from the API 79 | * Resident app will obtain eKYC XML from UIDAI server (at setup). 80 | * Stateless match performed as already supported in the Verifier App. 81 | 82 |
83 | 84 | ### Tech Stack 85 | We use a modified Flutter (Kotlin/Swift) Techstack implemented mostly in flutter with a few calls to Native code in Kotlin. All use of API's is limited to those provided by the UIDAI for the purposes of the Hackathon due to safety reasons. 86 | 87 | #### API Usage 88 | - OTP API to simulate Fingerprint Hash (as mentioned in the docs) 89 | - OTP API for Mobile phone Auth 90 | - eKYC API for Stateless Matching. 91 | - Face RD APK for Online/Offline 92 | - Aadhaar Auth API 93 | 94 |
95 | 96 | ### About Us - 202ACCEPTED 97 | - Omkar Prabhune, CSE Junior at VIT Pune 98 | - Atharva Rajadhyaksha, Instrumentation Junior at VIT Pune 99 | -------------------------------------------------------------------------------- /Resident App.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/Resident App.mp4 -------------------------------------------------------------------------------- /Verifier App.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/Verifier App.mp4 -------------------------------------------------------------------------------- /architecture_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/architecture_diagram.png -------------------------------------------------------------------------------- /banner - 16:9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/banner - 16:9.png -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/banner.png -------------------------------------------------------------------------------- /resident_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /resident_app/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /resident_app/README.md: -------------------------------------------------------------------------------- 1 | # resident_app 2 | 3 | Client or Resident Application for the UIDAI Hackathon 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://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /resident_app/analysis_options.yaml: -------------------------------------------------------------------------------- 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 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /resident_app/android/.gitignore: -------------------------------------------------------------------------------- 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 14 | -------------------------------------------------------------------------------- /resident_app/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 30 29 | 30 | compileOptions { 31 | sourceCompatibility JavaVersion.VERSION_1_8 32 | targetCompatibility JavaVersion.VERSION_1_8 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.resident_app" 38 | minSdkVersion 21 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | -------------------------------------------------------------------------------- /resident_app/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 14 | 18 | 22 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/java/com/example/resident_app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.resident_app; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /resident_app/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /resident_app/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resident_app/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:4.1.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | project.evaluationDependsOn(':app') 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /resident_app/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /resident_app/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /resident_app/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /resident_app/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/resident_app/assets/splash.png -------------------------------------------------------------------------------- /resident_app/lib/api/captcha_generation.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'captcha_generation_util.dart'; 3 | 4 | Future> generateCaptchaapi() async{ 5 | 6 | requestHandler request = requestHandler(); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | var retval = { 'captchaBase64String' : response.captchaBase64String, 'captchaTxnId' : response.captchaTxnId}; 19 | 20 | return Future.value(retval); 21 | } -------------------------------------------------------------------------------- /resident_app/lib/api/captcha_generation_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class urlHandler { 4 | Uri url = Uri.parse( 5 | "https://stage1.uidai.gov.in/unifiedAppAuthService/api/v2/get/captcha"); 6 | } 7 | 8 | class requestHandler { 9 | String langCode = "en"; 10 | String captchaLength = "3"; 11 | String captchaType = "2"; 12 | 13 | requestHandler(); 14 | 15 | String? getBody() { 16 | return json.encode({ 17 | 'langCode': langCode, 18 | 'captchaLength': captchaLength, 19 | 'captchaType': captchaType 20 | }); 21 | } 22 | } 23 | 24 | class responseHandler { 25 | String? status; 26 | String? captchaBase64String; 27 | String? captchaTxnId; 28 | String? requestedDate; 29 | String? statusCode; 30 | String? message; 31 | 32 | responseHandler(String responsejson) { 33 | var response = jsonDecode(responsejson); 34 | status = response['status']; 35 | captchaBase64String = response['captchaBase64String']; 36 | captchaTxnId = response['captchaTxnId']; 37 | requestedDate = response['requestedDate']; 38 | statusCode = response['statusCode'].toString(); 39 | message = response['message']; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /resident_app/lib/api/get_ekyc.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'get_ekyc_util.dart'; 3 | 4 | Future> getEkycapi(String aadhar, String otp, String txnId) async{ 5 | 6 | requestHandler request = requestHandler.uid(aadhar, otp, txnId); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.uid); 10 | print(request.getBody()); 11 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 12 | if (httpresponse.statusCode == 200) { 13 | response = responseHandler(httpresponse.body); 14 | } 15 | else { 16 | print("Kahitari error with status code ${httpresponse.statusCode}"); 17 | throw Exception("http response failed"); 18 | } 19 | 20 | print(response.status); 21 | 22 | bool verify = false; 23 | if (response.status == "Success"){ 24 | verify = true; 25 | } 26 | return Future.value({'eKycXML' : response.eKycXML , 'filename' : response.fileName}); 27 | } -------------------------------------------------------------------------------- /resident_app/lib/api/get_ekyc_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | import 'dart:math'; 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/eAadhaarService/api/downloadOfflineEkyc"); 7 | } 8 | 9 | class requestHandler{ 10 | String? txnNumber; 11 | String? otp; 12 | String? shareCode; 13 | String? uid; 14 | String? vid; 15 | 16 | requestHandler.uid(this.uid,this.otp,this.txnNumber){ 17 | var random = Random(10); 18 | shareCode = random.nextInt(9999).toString(); 19 | } 20 | requestHandler.vid(this.vid,this.otp,this.txnNumber){ 21 | var random = Random(10); 22 | shareCode = random.nextInt(9999).toString(); 23 | } 24 | 25 | String? getBody() { 26 | if(vid == null && uid == null){ 27 | throw Exception("Both uid and vid null"); 28 | } 29 | else if (vid == null) { 30 | return json.encode({'txnNumber': txnNumber, 'otp': otp, 'shareCode' : shareCode, 'uid' : uid }); 31 | } 32 | else if (uid == null) { 33 | return json.encode({'txnNumber': txnNumber, 'otp': otp, 'shareCode' : shareCode, 'vid' : vid }); 34 | } 35 | } 36 | } 37 | 38 | class responseHandler{ 39 | String? eKycXML; 40 | String? fileName; 41 | String? status; 42 | String? requestDate; 43 | String? uidNumber; 44 | 45 | responseHandler(String responsejson){ 46 | var response = jsonDecode(responsejson); 47 | eKycXML = response['eKycXML'].toString(); 48 | fileName = response['fileName'].toString(); 49 | status = response['status'].toString(); 50 | requestDate = response['requestDate'].toString(); 51 | uidNumber = response['uidNumber'].toString(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /resident_app/lib/api/otp_auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'otp_auth_util.dart'; 3 | 4 | Future verifyOTPapi(String aadhar,int otp, String txnId) async{ 5 | 6 | requestHandler request = requestHandler.uid(aadhar,otp,txnId); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | print(response.status); 19 | print(response.errcode); 20 | bool verify = false; 21 | if (response.status == "y" || response.status == "Y"){ 22 | verify = true; 23 | } 24 | return Future.value(verify); 25 | } -------------------------------------------------------------------------------- /resident_app/lib/api/otp_auth_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | class urlHandler{ 5 | Uri url = Uri.parse("https://stage1.uidai.gov.in/onlineekyc/getAuth/"); 6 | } 7 | 8 | class requestHandler{ 9 | String? uid; 10 | String? vid; 11 | String? txnId; 12 | int? otp; 13 | requestHandler.uid(this.uid,int otp, String txnId){ 14 | this.txnId = txnId; 15 | this.otp = otp; 16 | } 17 | requestHandler.vid(this.vid); 18 | String? getBody(){ 19 | if(vid == null && uid == null){ 20 | throw Exception("Both uid and vid null"); 21 | } 22 | else if (uid == null) { 23 | return json.encode({'vid': vid, 'txnId': txnId, 'otp' : "$otp"}); 24 | } 25 | else if (vid == null) { 26 | return json.encode({'uid': uid, 'txnId': txnId, 'otp' : "$otp"}); 27 | } 28 | } 29 | } 30 | 31 | class responseHandler{ 32 | String? status; 33 | int? errcode; 34 | 35 | responseHandler(String responsejson){ 36 | var response = jsonDecode(responsejson); 37 | status = response['status']; 38 | errcode = int.parse(response['errCode'] ?? "0"); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resident_app/lib/api/otp_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'otp_request_util.dart'; 3 | 4 | Future generateOTPapi(String aadhar) async{ 5 | 6 | requestHandler request = requestHandler.uid(aadhar); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | print(response.status); 19 | print(response.errcode); 20 | return Future.value(request.txnId); 21 | } -------------------------------------------------------------------------------- /resident_app/lib/api/otp_request_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | import 'package:uuid/uuid.dart'; 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/onlineekyc/getOtp/"); 7 | } 8 | 9 | class requestHandler{ 10 | String? uid; 11 | String? vid; 12 | String? txnId = "0acbaa8b-b3ae-433d-a5d2-51250ea8e970"; 13 | 14 | requestHandler.uid(this.uid){ 15 | const uuid = Uuid(); 16 | txnId = uuid.v4(); 17 | } 18 | requestHandler.vid(this.vid); 19 | String? getBody(){ 20 | if(vid == null && uid == null){ 21 | throw Exception("Both uid and vid null"); 22 | } 23 | else if (uid == null) { 24 | return json.encode({'vid': vid, 'txnId': txnId}); 25 | } 26 | else if (vid == null) { 27 | return json.encode({'uid': uid, 'txnId': txnId}); 28 | } 29 | } 30 | } 31 | 32 | class responseHandler{ 33 | String? status; 34 | int? errcode; 35 | 36 | responseHandler(String responsejson){ 37 | var response = jsonDecode(responsejson); 38 | status = response['status']; 39 | errcode = int.parse(response['errCode'] ?? "0"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /resident_app/lib/api/vid_generate.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | 3 | import 'vid_generate_util.dart'; 4 | 5 | Future generateVidapi( 6 | String aadhar, String mobile, int otp, String txnId) async { 7 | requestHandler request = requestHandler(aadhar, mobile, otp, txnId); 8 | urlHandler url = urlHandler(); 9 | responseHandler? response; 10 | print(request.getBody()); 11 | http.Response httpresponse = await http.post(url.url, 12 | headers: {'Content-type': 'application/json'}, body: request.getBody()); 13 | if (httpresponse.statusCode == 200) { 14 | response = responseHandler(httpresponse.body); 15 | } else { 16 | print("Kahitari error with status code ${httpresponse.statusCode}"); 17 | throw Exception("http response failed"); 18 | } 19 | print(response.status); 20 | bool verify = false; 21 | if (response.status == "Success") { 22 | verify = true; 23 | } 24 | return Future.value(response.vid); 25 | } 26 | -------------------------------------------------------------------------------- /resident_app/lib/api/vid_generate_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | class urlHandler{ 5 | Uri url = Uri.parse("https://stage1.uidai.gov.in/vidwrapper/generate"); 6 | } 7 | 8 | class requestHandler{ 9 | String? uid; 10 | String? mobile; 11 | String? otpTxnId; 12 | int? otp; 13 | 14 | requestHandler(this.uid,String mobile, int otp, String otpTxnId){ 15 | this.otpTxnId = otpTxnId; 16 | this.otp = otp; 17 | this.mobile = mobile; 18 | } 19 | 20 | String? getBody() { 21 | return json.encode({'uid': uid, 'mobile': "$mobile", 'otp': "$otp" , 'otpTxnId' : "$otpTxnId"}); 22 | } 23 | } 24 | 25 | class responseHandler{ 26 | String? status; 27 | String? vid; 28 | String? message; 29 | String? errorCode; 30 | 31 | responseHandler(String responsejson){ 32 | var response = jsonDecode(responsejson); 33 | status = response['status']; 34 | vid = response['vid']; 35 | message = response['message']; 36 | errorCode = response['errorCode']; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /resident_app/lib/api/vid_otp_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'vid_otp_request_util.dart'; 3 | 4 | Future vidGenerateOTPapi(String aadhar,String captchaTxnId, String captchaValue) async{ 5 | 6 | requestHandler request = requestHandler(aadhar,captchaTxnId,captchaValue); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'x-request-id' : request.transactionId, 'appid' : 'MYAADHAAR','Accept-Language' : 'en_in','Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | 19 | print(response.mobileNumber); 20 | 21 | return Future.value(response.txnId); 22 | } -------------------------------------------------------------------------------- /resident_app/lib/api/vid_otp_request_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:uuid/uuid.dart'; 3 | 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/unifiedAppAuthService/api/v2/generate/aadhaar/otp"); 7 | } 8 | 9 | class requestHandler{ 10 | String? uid; 11 | String? captchaTxnId; 12 | String? captchaValue; 13 | String transactionId = "Init"; 14 | 15 | requestHandler(this.uid, this.captchaTxnId,this.captchaValue){ 16 | const uuid = Uuid(); 17 | transactionId = uuid.v4(); 18 | } 19 | 20 | String? getBody(){ 21 | return json.encode({'uidNumber' : uid, 'captchaTxnId' : captchaTxnId, 'captchaValue' : captchaValue, 'transactionID' : "MYAADHAAR:" + transactionId}); 22 | } 23 | } 24 | 25 | class responseHandler{ 26 | String? uidNumber; 27 | String? mobileNumber; 28 | String? txnId; 29 | String? status; 30 | String? message; 31 | 32 | 33 | responseHandler(String responsejson){ 34 | var response = jsonDecode(responsejson); 35 | uidNumber = response['uidNumber'].toString(); 36 | mobileNumber = response['mobileNumber'].toString(); 37 | txnId = response['txnId'].toString(); 38 | status = response['status'].toString(); 39 | message = response ['message'].toString(); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /resident_app/lib/camera_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:camera/camera.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class TakePhoto extends StatefulWidget { 5 | const TakePhoto({this.camera}); 6 | final CameraDescription? camera; 7 | 8 | 9 | @override 10 | _TakePhotoState createState() => _TakePhotoState(); 11 | } 12 | 13 | class _TakePhotoState extends State { 14 | late CameraController _controller; 15 | late Future _initializeControllerFuture; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | 21 | _controller = CameraController( 22 | // Get a specific camera from the list of available cameras. 23 | widget.camera as CameraDescription, 24 | // Define the resolution to use. 25 | ResolutionPreset.medium, 26 | ); 27 | 28 | // Next, initialize the controller. This returns a Future. 29 | _initializeControllerFuture = _controller.initialize(); 30 | } 31 | 32 | Future takePicture() async { 33 | if (_controller.value.isTakingPicture) { 34 | return null; 35 | } 36 | 37 | try { 38 | XFile file = await _controller.takePicture(); 39 | return file; 40 | } on CameraException catch (e) { 41 | return null; 42 | } 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Scaffold( 48 | appBar: AppBar( 49 | title: const Text('Take A Photo'), 50 | ), 51 | floatingActionButton: FloatingActionButton( 52 | onPressed: () async { 53 | final file = await takePicture(); 54 | Navigator.of(context).pop(file?.path); 55 | }, 56 | child: const Icon(Icons.camera_alt), 57 | ), 58 | body: FutureBuilder( 59 | future: _initializeControllerFuture, 60 | builder: (context, snapshot) { 61 | if (snapshot.connectionState == ConnectionState.done) { 62 | return CameraPreview(_controller); 63 | } else { 64 | return const Center( 65 | child: CircularProgressIndicator(), 66 | ); 67 | } 68 | }, 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /resident_app/lib/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:archive/archive.dart'; 5 | import 'package:camera/camera.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:google_fonts/google_fonts.dart'; 9 | import 'package:qr_flutter/qr_flutter.dart'; 10 | import 'package:resident_app/api/get_ekyc.dart'; 11 | import 'package:resident_app/api/vid_otp_request.dart'; 12 | import 'package:resident_app/resident_data.dart'; 13 | 14 | import 'api/captcha_generation.dart'; 15 | import 'api/vid_generate.dart'; 16 | import 'camera_screen.dart'; 17 | 18 | class HomeScreen extends StatefulWidget { 19 | const HomeScreen({Key? key}) : super(key: key); 20 | 21 | @override 22 | _HomeScreenState createState() => _HomeScreenState(); 23 | } 24 | 25 | class _HomeScreenState extends State { 26 | final Color primaryColor = const Color(0xff202020); 27 | final Color secondaryColor = const Color(0xff565656); 28 | 29 | final Color logoGreen = const Color(0xff25bcbb); 30 | 31 | final TextEditingController captchaController = TextEditingController(); 32 | final TextEditingController phoneController = TextEditingController(); 33 | final TextEditingController otpController = TextEditingController(); 34 | 35 | String vidTxnID = ""; 36 | Map? captcha; 37 | 38 | Future generateCaptcha() async { 39 | captcha = await generateCaptchaapi(); 40 | return captcha!['captchaBase64String']; 41 | } 42 | 43 | void generateOTP( 44 | String aadhar, String captchaTxnId, String captchaValue) async { 45 | vidTxnID = await vidGenerateOTPapi(aadhar, captchaTxnId, captchaValue); 46 | } 47 | 48 | Future generateVid( 49 | String aadhar, String mobile, int otp, String txnId) { 50 | return generateVidapi(aadhar, mobile, otp, txnId); 51 | } 52 | 53 | void verifyOTPEKYC(String OTP, String txnID) async { 54 | var eKYC = await getEkycapi(Resident.aadharNum, OTP, txnID); 55 | 56 | String decompress(String zipText) { 57 | final List compressed = base64Decode(zipText); 58 | if (compressed.length > 4) { 59 | List uint8list = GZipDecoder() 60 | .decodeBytes(compressed.sublist(4, compressed.length - 4)); 61 | print(String.fromCharCodes(uint8list)); 62 | return String.fromCharCodes(uint8list); 63 | } else { 64 | return ""; 65 | } 66 | } 67 | 68 | String xml = decompress(eKYC['eKycXML']!); 69 | 70 | _showErrorDialog(context, eKYC.toString() + "\n\n\n" + xml); 71 | } 72 | 73 | void verifyOTP(int OTP, String txnID) async { 74 | bool verified = true; 75 | 76 | Resident.phoneNum = phoneController.text; 77 | Resident.VID = 78 | await generateVid(Resident.aadharNum, phoneController.text, OTP, txnID); 79 | 80 | print(Resident.VID); 81 | 82 | if (verified) { 83 | Resident.isVIDUploaded = true; 84 | Navigator.pop(context); 85 | setState(() {}); 86 | } else { 87 | otpController.text = "Invalid OTP"; 88 | } 89 | } 90 | 91 | // void uploadPhoto(String imageURI) { 92 | // //in case you need the image as a file 93 | // File image = File(imageURI); 94 | // 95 | // //same image as a string of bytes, easier to upload in a http request 96 | // String imageBytes = 97 | // 'data:image/png;base64,' + base64Encode(image.readAsBytesSync()); 98 | // 99 | // // TODO 100 | // } 101 | 102 | @override 103 | Widget build(BuildContext context) { 104 | return Scaffold( 105 | backgroundColor: primaryColor, 106 | body: Container( 107 | padding: const EdgeInsets.symmetric(horizontal: 30), 108 | child: SingleChildScrollView( 109 | child: Column( 110 | crossAxisAlignment: CrossAxisAlignment.start, 111 | children: [ 112 | const SizedBox(height: 60), 113 | Text( 114 | 'View Details', 115 | style: GoogleFonts.openSans(color: Colors.white, fontSize: 28), 116 | ), 117 | const SizedBox(height: 100), 118 | Text( 119 | 'Upload Information', 120 | style: GoogleFonts.openSans(color: Colors.white, fontSize: 18), 121 | ), 122 | const SizedBox(height: 20), 123 | _getVIDButton(), 124 | const SizedBox(height: 20), 125 | EditButton( 126 | innerText: 'Get eKYC Document', 127 | buttonColor: Colors.amber, 128 | textColor: Colors.black, 129 | onPressed: () { 130 | _showCaptchaDialog(context, true); 131 | }, 132 | ), 133 | const SizedBox(height: 20), 134 | EditButton( 135 | innerText: 'Test Camera', 136 | buttonColor: Colors.amber, 137 | textColor: Colors.black, 138 | onPressed: () { 139 | _showFaceDialog(context); 140 | }, 141 | ), 142 | const SizedBox(height: 80), 143 | Text( 144 | 'Verify Identity', 145 | style: GoogleFonts.openSans(color: Colors.white, fontSize: 18), 146 | ), 147 | const SizedBox(height: 20), 148 | EditButton( 149 | innerText: 'Generate QR Code', 150 | buttonColor: Colors.redAccent, 151 | textColor: Colors.white, 152 | onPressed: () { 153 | _showQRDialog(context); 154 | }, 155 | ), 156 | const SizedBox(height: 180), 157 | Padding( 158 | padding: const EdgeInsets.only(left: 190), 159 | child: Text( 160 | '202 ACCEPTED', 161 | style: GoogleFonts.jetBrainsMono( 162 | color: Colors.white, fontSize: 18), 163 | textAlign: TextAlign.right, 164 | ), 165 | ), 166 | ], 167 | ), 168 | ), 169 | ), 170 | ); 171 | } 172 | 173 | _getVIDButton() { 174 | String buttonTitle = 'Get VID'; 175 | if (Resident.isVIDUploaded) { 176 | buttonTitle = 'Recieved VID'; 177 | } 178 | 179 | return EditButton( 180 | innerText: buttonTitle, 181 | buttonColor: _getButtonColor(Resident.isVIDUploaded), 182 | textColor: Colors.black, 183 | onPressed: () async { 184 | _showCaptchaDialog(context); 185 | }, 186 | ); 187 | } 188 | 189 | _getButtonColor(bool isUploaded) { 190 | if (isUploaded) { 191 | return Colors.grey; 192 | } else { 193 | return Colors.amber; 194 | } 195 | } 196 | 197 | _showCaptchaDialog(BuildContext context, [bool isEKYC = false]) { 198 | showDialog( 199 | context: context, 200 | builder: (BuildContext context) { 201 | String image64 = ''; 202 | return AlertDialog( 203 | content: SizedBox( 204 | height: 360, 205 | width: 300, 206 | child: StatefulBuilder( 207 | builder: (BuildContext context, StateSetter setState) { 208 | if (image64.isEmpty) { 209 | generateCaptcha().then((imageBase64) { 210 | setState(() { 211 | image64 = imageBase64!; 212 | }); 213 | }); 214 | } 215 | 216 | getImage() { 217 | if (image64.isNotEmpty) { 218 | return Image.memory(base64Decode(image64)); 219 | } else { 220 | return Container(); 221 | } 222 | } 223 | 224 | return Container( 225 | padding: const EdgeInsets.only(top: 15.0), 226 | color: primaryColor, 227 | child: Column( 228 | children: [ 229 | Container( 230 | padding: const EdgeInsets.symmetric(horizontal: 15.0), 231 | height: 100, 232 | child: getImage(), 233 | ), 234 | const SizedBox(height: 20.0), 235 | Padding( 236 | padding: const EdgeInsets.symmetric(horizontal: 10), 237 | child: _buildTextField( 238 | phoneController, Icons.phone, 'Phone Number'), 239 | ), 240 | const SizedBox(height: 20.0), 241 | Padding( 242 | padding: const EdgeInsets.symmetric(horizontal: 10), 243 | child: _buildTextField(captchaController, 244 | Icons.text_format, 'Captcha Value'), 245 | ), 246 | const SizedBox(height: 20.0), 247 | Padding( 248 | padding: const EdgeInsets.all(10.0), 249 | child: EditButton( 250 | buttonColor: Colors.redAccent, 251 | innerText: "Verify Value", 252 | textColor: Colors.white, 253 | onPressed: () { 254 | generateOTP( 255 | Resident.aadharNum, 256 | captcha!['captchaTxnId']!, 257 | captchaController.text, 258 | ); 259 | Navigator.pop(context); 260 | _showOTPDialog(context, isEKYC); 261 | }, 262 | ), 263 | ), 264 | ], 265 | ), 266 | ); 267 | }, 268 | )), 269 | contentPadding: const EdgeInsets.all(0), 270 | backgroundColor: Colors.white, 271 | scrollable: true, 272 | ); 273 | }, 274 | barrierColor: Colors.black.withOpacity(0.75), 275 | ); 276 | } 277 | 278 | _showOTPDialog(BuildContext context, bool isEKYC) { 279 | showDialog( 280 | context: context, 281 | builder: (BuildContext context) => AlertDialog( 282 | content: Padding( 283 | padding: const EdgeInsets.all(15), 284 | child: Column( 285 | crossAxisAlignment: CrossAxisAlignment.start, 286 | children: [ 287 | Text( 288 | 'Enter the OTP you recieved', 289 | style: GoogleFonts.openSans( 290 | color: Colors.white, 291 | fontSize: 18, 292 | fontWeight: FontWeight.w600, 293 | ), 294 | ), 295 | const SizedBox(height: 20), 296 | _buildTextField(otpController, Icons.lock, 'OTP'), 297 | const SizedBox(height: 20), 298 | EditButton( 299 | innerText: "Verify", 300 | buttonColor: Colors.redAccent, 301 | textColor: Colors.white, 302 | onPressed: () { 303 | String stringOtp = otpController.text; 304 | int intOtp; 305 | 306 | if (_isInValid(stringOtp)) { 307 | otpController.text = "Enter a Valid OTP"; 308 | return; 309 | } 310 | 311 | intOtp = int.parse(stringOtp); 312 | if (isEKYC) { 313 | verifyOTPEKYC(stringOtp, vidTxnID); 314 | return; 315 | } 316 | 317 | verifyOTP(intOtp, vidTxnID); 318 | }, 319 | ), 320 | ], 321 | ), 322 | ), 323 | contentPadding: const EdgeInsets.all(0), 324 | backgroundColor: primaryColor, 325 | scrollable: true, 326 | ), 327 | barrierColor: Colors.black.withOpacity(0.75), 328 | ); 329 | } 330 | 331 | _showFaceDialog(BuildContext context) { 332 | showDialog( 333 | context: context, 334 | builder: (BuildContext context) { 335 | late CameraDescription _cameraDescription; 336 | String _imagePath = ''; 337 | 338 | return AlertDialog( 339 | content: SizedBox( 340 | height: 400, 341 | width: 400, 342 | child: StatefulBuilder( 343 | builder: (BuildContext context, StateSetter setState) { 344 | availableCameras().then((cameras) { 345 | final camera = cameras 346 | .where((camera) => 347 | camera.lensDirection == CameraLensDirection.back) 348 | .toList() 349 | .first; 350 | setState(() { 351 | _cameraDescription = camera; 352 | }); 353 | }).catchError((err) {}); 354 | 355 | return Container( 356 | padding: const EdgeInsets.only(top: 15.0), 357 | color: primaryColor, 358 | child: Column( 359 | children: [ 360 | Container( 361 | padding: const EdgeInsets.symmetric(horizontal: 15.0), 362 | height: 300, 363 | child: ListView( 364 | scrollDirection: Axis.horizontal, 365 | children: [ 366 | CardPicture( 367 | onTap: () async { 368 | final String? path = 369 | await Navigator.of(context).push( 370 | MaterialPageRoute( 371 | builder: (_) => TakePhoto( 372 | camera: _cameraDescription, 373 | ), 374 | ), 375 | ); 376 | 377 | // print('imagepath: $path'); 378 | if (path != null && path.isNotEmpty) { 379 | setState(() { 380 | _imagePath = path; 381 | }); 382 | } 383 | }, 384 | imagePath: _imagePath, 385 | ), 386 | ], 387 | ), 388 | ), 389 | const SizedBox(height: 20.0), 390 | Padding( 391 | padding: const EdgeInsets.all(10.0), 392 | child: EditButton( 393 | buttonColor: Colors.redAccent, 394 | innerText: "Upload Image", 395 | textColor: Colors.white, 396 | onPressed: () { 397 | Navigator.pop(context); 398 | }, 399 | ), 400 | ), 401 | ], 402 | ), 403 | ); 404 | }, 405 | )), 406 | contentPadding: const EdgeInsets.all(0), 407 | backgroundColor: Colors.white, 408 | scrollable: true, 409 | ); 410 | }, 411 | barrierColor: Colors.black.withOpacity(0.75), 412 | ); 413 | } 414 | 415 | _showQRDialog(BuildContext context) { 416 | showDialog( 417 | context: context, 418 | builder: (BuildContext context) => AlertDialog( 419 | content: SizedBox( 420 | width: 320, 421 | height: 312, 422 | child: QrImage( 423 | data: Resident.VID, 424 | version: QrVersions.auto, 425 | foregroundColor: Colors.black, 426 | padding: const EdgeInsets.all(10), 427 | size: 300, 428 | gapless: false, 429 | ), 430 | ), 431 | contentPadding: const EdgeInsets.all(0), 432 | backgroundColor: Colors.white, 433 | scrollable: true, 434 | ), 435 | barrierColor: Colors.black.withOpacity(0.75), 436 | ); 437 | } 438 | 439 | _showErrorDialog(BuildContext context, String message, 440 | [Color color = Colors.red]) { 441 | showDialog( 442 | context: context, 443 | builder: (BuildContext context) => AlertDialog( 444 | content: Padding( 445 | padding: const EdgeInsets.all(15), 446 | child: Text(message, style: TextStyle(color: color)), 447 | ), 448 | contentPadding: const EdgeInsets.all(0), 449 | backgroundColor: Colors.white, 450 | scrollable: true, 451 | ), 452 | barrierColor: Colors.black.withOpacity(0.75), 453 | ); 454 | } 455 | 456 | bool _isInValid(String s) { 457 | if (s == '') { 458 | return true; 459 | } 460 | 461 | if (int.tryParse(s) == null) { 462 | return true; 463 | } 464 | 465 | //6 digit 466 | if (s.length == 6) { 467 | return false; 468 | } else { 469 | return true; 470 | } 471 | } 472 | 473 | _buildTextField( 474 | TextEditingController controller, IconData icon, String labelText, 475 | [bool isDense = false]) { 476 | return Container( 477 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), 478 | decoration: BoxDecoration( 479 | color: secondaryColor, border: Border.all(color: Colors.black38)), 480 | child: TextField( 481 | controller: controller, 482 | style: const TextStyle(color: Colors.white), 483 | keyboardType: TextInputType.number, 484 | decoration: InputDecoration( 485 | icon: Icon( 486 | icon, 487 | color: Colors.white, 488 | ), 489 | isDense: isDense, 490 | border: InputBorder.none, 491 | focusedBorder: InputBorder.none, 492 | enabledBorder: InputBorder.none, 493 | errorBorder: InputBorder.none, 494 | disabledBorder: InputBorder.none, 495 | contentPadding: const EdgeInsets.symmetric(horizontal: 10), 496 | hintText: labelText, 497 | hintStyle: TextStyle(color: Colors.white.withOpacity(0.8)), 498 | ), 499 | ), 500 | ); 501 | } 502 | } 503 | 504 | class EditButton extends StatelessWidget { 505 | final String innerText; 506 | final Color buttonColor; 507 | final Color textColor; 508 | final VoidCallback onPressed; 509 | 510 | // ignore: sort_constructors_first, use_key_in_widget_constructors 511 | const EditButton({ 512 | required this.innerText, 513 | required this.buttonColor, 514 | required this.textColor, 515 | required this.onPressed, 516 | }); 517 | 518 | @override 519 | Widget build(BuildContext context) { 520 | return Material( 521 | color: buttonColor, 522 | borderRadius: BorderRadius.circular(6.0), 523 | child: InkWell( 524 | onTap: onPressed, 525 | child: Container( 526 | padding: const EdgeInsets.all(12), 527 | width: double.infinity, 528 | child: Text( 529 | innerText, 530 | style: TextStyle( 531 | fontSize: 18, 532 | color: textColor, 533 | fontWeight: FontWeight.w600, 534 | ), 535 | textAlign: TextAlign.center, 536 | ), 537 | ), 538 | ), 539 | ); 540 | } 541 | } 542 | 543 | class CardPicture extends StatelessWidget { 544 | const CardPicture({this.onTap, this.imagePath}); 545 | 546 | final Function()? onTap; 547 | final String? imagePath; 548 | final color = Colors.white24; 549 | 550 | @override 551 | Widget build(BuildContext context) { 552 | final size = MediaQuery.of(context).size; 553 | 554 | if (imagePath != null && imagePath != '') { 555 | return Card( 556 | color: color, 557 | child: InkWell( 558 | onTap: onTap, 559 | child: Container( 560 | height: 200, 561 | padding: const EdgeInsets.all(10.0), 562 | width: size.width * .70, 563 | decoration: BoxDecoration( 564 | borderRadius: const BorderRadius.all(Radius.circular(4.0)), 565 | image: DecorationImage( 566 | fit: BoxFit.cover, 567 | image: FileImage(File(imagePath as String)), 568 | ), 569 | ), 570 | ), 571 | ), 572 | ); 573 | } 574 | 575 | return Card( 576 | color: color, 577 | elevation: 3, 578 | child: InkWell( 579 | onTap: onTap, 580 | child: Container( 581 | padding: const EdgeInsets.symmetric(vertical: 18, horizontal: 25), 582 | width: size.width * .70, 583 | height: 200, 584 | child: Column( 585 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 586 | crossAxisAlignment: CrossAxisAlignment.start, 587 | children: const [ 588 | Text( 589 | 'Attach Picture', 590 | style: TextStyle(fontSize: 17.0, color: Colors.white), 591 | ), 592 | Icon( 593 | Icons.photo_camera, 594 | color: Colors.white54, 595 | ) 596 | ], 597 | ), 598 | ), 599 | ), 600 | ); 601 | } 602 | } 603 | -------------------------------------------------------------------------------- /resident_app/lib/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | import 'package:resident_app/home_screen.dart'; 4 | import 'package:resident_app/resident_data.dart'; 5 | 6 | import 'api/otp_auth.dart'; 7 | import 'api/otp_request.dart'; 8 | 9 | class LoginScreen extends StatefulWidget { 10 | const LoginScreen({Key? key}) : super(key: key); 11 | 12 | @override 13 | _LoginScreenState createState() => _LoginScreenState(); 14 | } 15 | 16 | class _LoginScreenState extends State { 17 | final Color primaryColor = const Color(0xff202020); 18 | final Color secondaryColor = const Color(0xff565656); 19 | 20 | final Color logoGreen = const Color(0xff25bcbb); 21 | 22 | final TextEditingController nameController = TextEditingController(); 23 | final TextEditingController passwordController = TextEditingController(); 24 | 25 | String txnId = "Init"; 26 | 27 | void generateOTP(int aadhaarNumber) async { 28 | Resident.aadharNum = aadhaarNumber.toString(); 29 | txnId = await generateOTPapi(aadhaarNumber.toString()); 30 | } 31 | 32 | void verifyOTP(int OTP) async { 33 | bool verified = await verifyOTPapi(Resident.aadharNum, OTP, txnId); 34 | 35 | if (verified) { 36 | Navigator.pop(context); 37 | Navigator.push( 38 | context, 39 | MaterialPageRoute(builder: (context) => const HomeScreen()), 40 | ); 41 | } else { 42 | passwordController.text = "Invalid OTP"; 43 | } 44 | } 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return Scaffold( 49 | appBar: AppBar( 50 | backgroundColor: Colors.transparent, 51 | elevation: 0, 52 | ), 53 | backgroundColor: primaryColor, 54 | body: Container( 55 | alignment: Alignment.topCenter, 56 | margin: const EdgeInsets.symmetric(horizontal: 30), 57 | child: SingleChildScrollView( 58 | child: Column( 59 | mainAxisAlignment: MainAxisAlignment.center, 60 | crossAxisAlignment: CrossAxisAlignment.center, 61 | children: [ 62 | Text( 63 | 'Enter your Details', 64 | textAlign: TextAlign.center, 65 | style: GoogleFonts.openSans(color: Colors.white, fontSize: 28), 66 | ), 67 | const SizedBox(height: 20), 68 | Text( 69 | 'Enter your Aadhaar Number and OTP below to continue!', 70 | textAlign: TextAlign.center, 71 | style: GoogleFonts.openSans(color: Colors.white, fontSize: 14), 72 | ), 73 | const SizedBox(height: 50), 74 | _buildTextField(nameController, Icons.account_circle, 'Aadhaar'), 75 | const SizedBox(height: 20), 76 | _buildTextField(passwordController, Icons.lock, 'OTP'), 77 | const SizedBox(height: 150), 78 | EditButton( 79 | innerText: "Generate OTP", 80 | buttonColor: Colors.amber, 81 | textColor: Colors.white, 82 | onPressed: () { 83 | String stringAadhaarNum = nameController.text; 84 | int aadhaarNum; 85 | 86 | if (_isInValidAadhar(stringAadhaarNum)) { 87 | nameController.text = "Enter a Valid Aadhar Number"; 88 | return; 89 | } 90 | 91 | aadhaarNum = int.parse(stringAadhaarNum); 92 | generateOTP(aadhaarNum); 93 | }, 94 | ), 95 | const SizedBox(height: 20), 96 | EditButton( 97 | innerText: "Verify", 98 | buttonColor: Colors.redAccent, 99 | textColor: Colors.white, 100 | onPressed: () { 101 | String stringOtp = passwordController.text; 102 | int intOtp; 103 | 104 | if (_isInValid(stringOtp)) { 105 | passwordController.text = "Enter a Valid OTP"; 106 | return; 107 | } 108 | 109 | intOtp = int.parse(stringOtp); 110 | verifyOTP(intOtp); 111 | }, 112 | ), 113 | const SizedBox(height: 20), 114 | ], 115 | ), 116 | ), 117 | ), 118 | ); 119 | } 120 | 121 | bool _isInValid(String s) { 122 | if (s == '') { 123 | return true; 124 | } 125 | 126 | if (int.tryParse(s) == null) { 127 | return true; 128 | } 129 | 130 | //6 digit 131 | if (s.length == 6) { 132 | return false; 133 | } else { 134 | return true; 135 | } 136 | } 137 | 138 | bool _isInValidAadhar(String s) { 139 | if (s == '') { 140 | return true; 141 | } 142 | 143 | if (int.tryParse(s) == null) { 144 | return true; 145 | } 146 | 147 | //6 digit 148 | if (s.length == 12) { 149 | return false; 150 | } else { 151 | return true; 152 | } 153 | } 154 | 155 | _buildTextField( 156 | TextEditingController controller, IconData icon, String labelText) { 157 | return Container( 158 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), 159 | decoration: BoxDecoration( 160 | color: secondaryColor, border: Border.all(color: Colors.white38)), 161 | child: TextField( 162 | controller: controller, 163 | style: const TextStyle(color: Colors.white), 164 | keyboardType: TextInputType.number, 165 | decoration: InputDecoration( 166 | icon: Icon( 167 | icon, 168 | color: Colors.white, 169 | ), 170 | border: InputBorder.none, 171 | focusedBorder: InputBorder.none, 172 | enabledBorder: InputBorder.none, 173 | errorBorder: InputBorder.none, 174 | disabledBorder: InputBorder.none, 175 | contentPadding: const EdgeInsets.symmetric(horizontal: 10), 176 | hintText: labelText, 177 | hintStyle: TextStyle(color: Colors.white.withOpacity(0.8)), 178 | ), 179 | ), 180 | ); 181 | } 182 | } 183 | 184 | class EditButton extends StatelessWidget { 185 | final String innerText; 186 | final Color buttonColor; 187 | final Color textColor; 188 | final VoidCallback onPressed; 189 | 190 | // ignore: sort_constructors_first, use_key_in_widget_constructors 191 | const EditButton({ 192 | required this.innerText, 193 | required this.buttonColor, 194 | required this.textColor, 195 | required this.onPressed, 196 | }); 197 | 198 | @override 199 | Widget build(BuildContext context) { 200 | return Material( 201 | color: buttonColor, 202 | borderRadius: BorderRadius.circular(6.0), 203 | child: InkWell( 204 | onTap: onPressed, 205 | child: Container( 206 | padding: const EdgeInsets.all(12), 207 | width: double.infinity, 208 | child: Text( 209 | innerText, 210 | style: TextStyle( 211 | fontSize: 18, 212 | color: textColor, 213 | fontWeight: FontWeight.w600, 214 | ), 215 | textAlign: TextAlign.center, 216 | ), 217 | ), 218 | ), 219 | ); 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /resident_app/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'login_screen.dart'; 4 | 5 | void main() { 6 | runApp(const MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({Key? key}) : super(key: key); 11 | 12 | // This widget is the root of your application. 13 | @override 14 | Widget build(BuildContext context) { 15 | return MaterialApp( 16 | title: 'Client App', 17 | theme: ThemeData( 18 | primarySwatch: Colors.blue, 19 | ), 20 | home: const LoginScreen(), 21 | debugShowCheckedModeBanner: false, 22 | ); 23 | } 24 | } -------------------------------------------------------------------------------- /resident_app/lib/resident_data.dart: -------------------------------------------------------------------------------- 1 | // basically user 2 | class Resident { 3 | static String aadharNum = ""; 4 | static String phoneNum = ""; 5 | static String VID = ""; 6 | 7 | static bool isVIDUploaded = false; 8 | } 9 | -------------------------------------------------------------------------------- /resident_app/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: "direct dev" 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "3.1.6" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.8.1" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | camera: 26 | dependency: "direct dev" 27 | description: 28 | name: camera 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "0.9.4+3" 32 | camera_platform_interface: 33 | dependency: transitive 34 | description: 35 | name: camera_platform_interface 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.1" 39 | camera_web: 40 | dependency: transitive 41 | description: 42 | name: camera_web 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.2.1+1" 46 | characters: 47 | dependency: transitive 48 | description: 49 | name: characters 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | charcode: 54 | dependency: transitive 55 | description: 56 | name: charcode 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.3.1" 60 | clock: 61 | dependency: transitive 62 | description: 63 | name: clock 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.1.0" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.15.0" 74 | cross_file: 75 | dependency: transitive 76 | description: 77 | name: cross_file 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.3.1+5" 81 | crypto: 82 | dependency: transitive 83 | description: 84 | name: crypto 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "3.0.1" 88 | cupertino_icons: 89 | dependency: "direct main" 90 | description: 91 | name: cupertino_icons 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.0.3" 95 | fake_async: 96 | dependency: transitive 97 | description: 98 | name: fake_async 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.2.0" 102 | ffi: 103 | dependency: transitive 104 | description: 105 | name: ffi 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.1.2" 109 | file: 110 | dependency: transitive 111 | description: 112 | name: file 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "6.1.2" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_lints: 122 | dependency: "direct dev" 123 | description: 124 | name: flutter_lints 125 | url: "https://pub.dartlang.org" 126 | source: hosted 127 | version: "1.0.4" 128 | flutter_plugin_android_lifecycle: 129 | dependency: transitive 130 | description: 131 | name: flutter_plugin_android_lifecycle 132 | url: "https://pub.dartlang.org" 133 | source: hosted 134 | version: "2.0.4" 135 | flutter_test: 136 | dependency: "direct dev" 137 | description: flutter 138 | source: sdk 139 | version: "0.0.0" 140 | flutter_web_plugins: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.0" 145 | google_fonts: 146 | dependency: "direct dev" 147 | description: 148 | name: google_fonts 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.0" 152 | http: 153 | dependency: "direct dev" 154 | description: 155 | name: http 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.13.4" 159 | http_parser: 160 | dependency: transitive 161 | description: 162 | name: http_parser 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "4.0.0" 166 | js: 167 | dependency: transitive 168 | description: 169 | name: js 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.6.3" 173 | lints: 174 | dependency: transitive 175 | description: 176 | name: lints 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.0.1" 180 | matcher: 181 | dependency: transitive 182 | description: 183 | name: matcher 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.12.10" 187 | meta: 188 | dependency: transitive 189 | description: 190 | name: meta 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.7.0" 194 | path: 195 | dependency: transitive 196 | description: 197 | name: path 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.8.0" 201 | path_provider: 202 | dependency: transitive 203 | description: 204 | name: path_provider 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.5" 208 | path_provider_linux: 209 | dependency: transitive 210 | description: 211 | name: path_provider_linux 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "2.1.0" 215 | path_provider_macos: 216 | dependency: transitive 217 | description: 218 | name: path_provider_macos 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "2.0.2" 222 | path_provider_platform_interface: 223 | dependency: transitive 224 | description: 225 | name: path_provider_platform_interface 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.0.1" 229 | path_provider_windows: 230 | dependency: transitive 231 | description: 232 | name: path_provider_windows 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.0.3" 236 | pedantic: 237 | dependency: transitive 238 | description: 239 | name: pedantic 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.11.1" 243 | platform: 244 | dependency: transitive 245 | description: 246 | name: platform 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "3.0.2" 250 | plugin_platform_interface: 251 | dependency: transitive 252 | description: 253 | name: plugin_platform_interface 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.2" 257 | process: 258 | dependency: transitive 259 | description: 260 | name: process 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "4.2.4" 264 | qr: 265 | dependency: transitive 266 | description: 267 | name: qr 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.1.0" 271 | qr_flutter: 272 | dependency: "direct dev" 273 | description: 274 | name: qr_flutter 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "4.0.0" 278 | quiver: 279 | dependency: transitive 280 | description: 281 | name: quiver 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "3.0.1+1" 285 | sky_engine: 286 | dependency: transitive 287 | description: flutter 288 | source: sdk 289 | version: "0.0.99" 290 | source_span: 291 | dependency: transitive 292 | description: 293 | name: source_span 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.8.1" 297 | stack_trace: 298 | dependency: transitive 299 | description: 300 | name: stack_trace 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "1.10.0" 304 | stream_channel: 305 | dependency: transitive 306 | description: 307 | name: stream_channel 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "2.1.0" 311 | stream_transform: 312 | dependency: transitive 313 | description: 314 | name: stream_transform 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "2.0.0" 318 | string_scanner: 319 | dependency: transitive 320 | description: 321 | name: string_scanner 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "1.1.0" 325 | term_glyph: 326 | dependency: transitive 327 | description: 328 | name: term_glyph 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "1.2.0" 332 | test_api: 333 | dependency: transitive 334 | description: 335 | name: test_api 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "0.4.2" 339 | typed_data: 340 | dependency: transitive 341 | description: 342 | name: typed_data 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "1.3.0" 346 | uuid: 347 | dependency: "direct dev" 348 | description: 349 | name: uuid 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "3.0.5" 353 | vector_math: 354 | dependency: transitive 355 | description: 356 | name: vector_math 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "2.1.0" 360 | win32: 361 | dependency: transitive 362 | description: 363 | name: win32 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "2.2.10" 367 | xdg_directories: 368 | dependency: transitive 369 | description: 370 | name: xdg_directories 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "0.2.0" 374 | sdks: 375 | dart: ">=2.14.0 <3.0.0" 376 | flutter: ">=2.5.0" 377 | -------------------------------------------------------------------------------- /resident_app/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: resident_app 2 | description: Client or Resident Application for the UIDAI Hackathon 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | 38 | dev_dependencies: 39 | flutter_test: 40 | sdk: flutter 41 | uuid: ^3.0.5 42 | http: 43 | camera: 44 | archive: ^3.1.6 45 | qr_flutter: ^4.0.0 46 | google_fonts: 47 | flutter_lints: ^1.0.0 48 | 49 | # For information on the generic Dart part of this file, see the 50 | # following page: https://dart.dev/tools/pub/pubspec 51 | 52 | # The following section is specific to Flutter. 53 | flutter: 54 | 55 | # The following line ensures that the Material Icons font is 56 | # included with your application, so that you can use the icons in 57 | # the material Icons class. 58 | uses-material-design: true 59 | 60 | assets: 61 | - assets/ 62 | 63 | # An image asset can refer to one or more resolution-specific "variants", see 64 | # https://flutter.dev/assets-and-images/#resolution-aware. 65 | 66 | # For details regarding adding assets from package dependencies, see 67 | # https://flutter.dev/assets-and-images/#from-packages 68 | 69 | # To add custom fonts to your application, add a fonts section here, 70 | # in this "flutter" section. Each entry in this list should have a 71 | # "family" key with the font family name, and a "fonts" key with a 72 | # list giving the asset and other descriptors for the font. For 73 | # example: 74 | # fonts: 75 | # - family: Schyler 76 | # fonts: 77 | # - asset: fonts/Schyler-Regular.ttf 78 | # - asset: fonts/Schyler-Italic.ttf 79 | # style: italic 80 | # - family: Trajan Pro 81 | # fonts: 82 | # - asset: fonts/TrajanPro.ttf 83 | # - asset: fonts/TrajanPro_Bold.ttf 84 | # weight: 700 85 | # 86 | # For details regarding fonts from package dependencies, 87 | # see https://flutter.dev/custom-fonts/#from-packages 88 | -------------------------------------------------------------------------------- /verifier_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /verifier_app/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /verifier_app/analysis_options.yaml: -------------------------------------------------------------------------------- 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 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /verifier_app/android/.gitignore: -------------------------------------------------------------------------------- 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 14 | -------------------------------------------------------------------------------- /verifier_app/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.verifier_app" 47 | minSdkVersion 21 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/kotlin/com/example/verifier_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.verifier_app 2 | 3 | import android.app.Activity 4 | import android.content.Intent 5 | import androidx.annotation.NonNull 6 | 7 | import io.flutter.embedding.android.FlutterActivity 8 | import io.flutter.embedding.engine.FlutterEngine 9 | import io.flutter.plugin.common.MethodChannel 10 | 11 | class MainActivity : FlutterActivity() { 12 | var RESULT = true; 13 | private val CHANNEL = "faceRD" 14 | 15 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 16 | super.configureFlutterEngine(flutterEngine) 17 | MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result -> 18 | if (call.method == "captureIntent") { 19 | invokeCaptureIntent() 20 | } else if (call.method == "lightingIntent") { 21 | invokeLightingIntent() 22 | } else if (call.method == "getResult") { 23 | result.success(RESULT) 24 | } else { 25 | result.notImplemented() 26 | } 27 | } 28 | } 29 | 30 | fun createPidOptions(txnId: String, purpose: String): String { 31 | return "\n" + 32 | "\n" + 33 | " \n" + 34 | " \n" + 35 | " \n" + 36 | " \n" + 37 | " \n" + 38 | " \n" + 39 | "" 40 | } 41 | 42 | fun invokeCaptureIntent() { 43 | val intent = Intent("in.gov.uidai.rdservice.face.CAPTURE") 44 | 45 | intent.putExtra("request", createPidOptions("1000", "auth")) 46 | 47 | startActivityForResult(intent, 123) 48 | } 49 | 50 | fun invokeLightingIntent() { 51 | val intent = Intent("in.gov.uidai.rdservice.face.CHECK_LIGHTING") 52 | 53 | intent.putExtra("request", "") 54 | 55 | startActivityForResult(intent, 123) 56 | } 57 | 58 | fun launchFaceMatchIntent(request: String) { 59 | val intent = Intent("in.gov.uidai.rdservice.face.MATCH") 60 | 61 | intent.putExtra("request", request) 62 | 63 | startActivityForResult(intent, 1233) 64 | 65 | } 66 | 67 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 68 | super.onActivityResult(requestCode, resultCode, data) 69 | data?.let { 70 | if (resultCode == Activity.RESULT_OK && requestCode == 1231) { 71 | handleLightingResponse(data.getStringExtra("response")); 72 | } 73 | } 74 | } 75 | 76 | fun handleLightingResponse(response: String?){ 77 | val res = response?.toString() ?: "" 78 | print(res); 79 | RESULT = Regex("errCode = \"0\"").matches(res) 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /verifier_app/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /verifier_app/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.32' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /verifier_app/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /verifier_app/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /verifier_app/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /verifier_app/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /verifier_app/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /verifier_app/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /verifier_app/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.verifierApp; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.verifierApp; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.verifierApp; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OverPoweredDev/Authentication-Reimagined/fb245a84585104e98b4625256d1d388421f5f3e6/verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | verifier_app 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /verifier_app/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /verifier_app/lib/api/captcha_generation.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'captcha_generation_util.dart'; 3 | 4 | Future> generateCaptchaapi() async{ 5 | 6 | requestHandler request = requestHandler(); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | var retval = { 'captchaBase64String' : response.captchaBase64String, 'captchaTxnId' : response.captchaTxnId}; 19 | 20 | return Future.value(retval); 21 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/captcha_generation_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class urlHandler{ 4 | Uri url = Uri.parse("https://stage1.uidai.gov.in/unifiedAppAuthService/api/v2/get/captcha"); 5 | } 6 | 7 | class requestHandler{ 8 | String langCode = "en"; 9 | String captchaLength = "3"; 10 | String captchaType = "2"; 11 | 12 | requestHandler(); 13 | 14 | String? getBody(){ 15 | return json.encode({'langCode' : langCode, 'captchaLength' : captchaLength, 'captchaType' : captchaType}); 16 | } 17 | } 18 | 19 | class responseHandler{ 20 | String? status; 21 | String? captchaBase64String; 22 | String? captchaTxnId; 23 | String? requestedDate; 24 | String? statusCode; 25 | String? message; 26 | 27 | responseHandler(String responsejson){ 28 | var response = jsonDecode(responsejson); 29 | status = response['status']; 30 | captchaBase64String = response['captchaBase64String']; 31 | captchaTxnId = response['captchaTxnId']; 32 | requestedDate = response['requestedDate']; 33 | statusCode = response ['statusCode'].toString(); 34 | message = response['message']; 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/get_ekyc.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'get_ekyc_util.dart'; 3 | 4 | Future> getEkycapi(String aadhar, String otp, String txnId) async{ 5 | 6 | requestHandler request = requestHandler.uid(aadhar, otp, txnId); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.uid); 10 | print(request.getBody()); 11 | http.Response httpresponse = await http.post(url.url,headers: {'Content-type' : 'application/json'},body:request.getBody()); 12 | if (httpresponse.statusCode == 200) { 13 | response = responseHandler(httpresponse.body); 14 | } 15 | else { 16 | print("Kahitari error with status code ${httpresponse.statusCode}"); 17 | throw Exception("http response failed"); 18 | } 19 | 20 | print(response.status); 21 | 22 | bool verify = false; 23 | if (response.status == "Success"){ 24 | verify = true; 25 | } 26 | return Future.value({'eKycXML' : response.eKycXML , 'filename' : response.fileName}); 27 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/get_ekyc_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | import 'dart:math'; 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/eAadhaarService/api/downloadOfflineEkyc"); 7 | } 8 | 9 | class requestHandler{ 10 | String? txnNumber; 11 | String? otp; 12 | String? shareCode; 13 | String? uid; 14 | String? vid; 15 | 16 | requestHandler.uid(this.uid,this.otp,this.txnNumber){ 17 | var random = Random(10); 18 | shareCode = random.nextInt(9999).toString(); 19 | } 20 | requestHandler.vid(this.vid,this.otp,this.txnNumber){ 21 | var random = Random(10); 22 | shareCode = random.nextInt(9999).toString(); 23 | } 24 | 25 | String? getBody() { 26 | if(vid == null && uid == null){ 27 | throw Exception("Both uid and vid null"); 28 | } 29 | else if (vid == null) { 30 | return json.encode({'txnNumber': txnNumber, 'otp': otp, 'shareCode' : shareCode, 'uid' : uid }); 31 | } 32 | else if (uid == null) { 33 | return json.encode({'txnNumber': txnNumber, 'otp': otp, 'shareCode' : shareCode, 'vid' : vid }); 34 | } 35 | } 36 | } 37 | 38 | class responseHandler{ 39 | String? eKycXML; 40 | String? fileName; 41 | String? status; 42 | String? requestDate; 43 | String? uidNumber; 44 | 45 | responseHandler(String responsejson){ 46 | var response = jsonDecode(responsejson); 47 | eKycXML = response['eKycXML'].toString(); 48 | fileName = response['fileName'].toString(); 49 | status = response['status'].toString(); 50 | requestDate = response['requestDate'].toString(); 51 | uidNumber = response['uidNumber'].toString(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /verifier_app/lib/api/offline_ekyc_otp_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'offline_ekyc_otp_request_util.dart'; 3 | 4 | Future vidGenerateOTPapi(String aadhar,String captchaTxnId, String captchaValue) async{ 5 | 6 | requestHandler request = requestHandler(aadhar,captchaTxnId,captchaValue); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'x-request-id' : request.transactionId, 'appid' : 'MYAADHAAR','Accept-Language' : 'en_in','Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | 19 | return Future.value(response.status); 20 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/offline_ekyc_otp_request_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:uuid/uuid.dart'; 3 | 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/unifiedAppAuthService/api/v2/generate/aadhaar/otp"); 7 | } 8 | 9 | class requestHandler{ 10 | String? uid; 11 | String? captchaTxnId; 12 | String? captchaValue; 13 | String transactionId = "Init"; 14 | 15 | requestHandler(this.uid, this.captchaTxnId,this.captchaValue){ 16 | const uuid = Uuid(); 17 | transactionId = uuid.v4(); 18 | } 19 | 20 | String? getBody(){ 21 | return json.encode({'uidNumber' : uid, 'captchaTxnId' : captchaTxnId, 'captchaValue' : captchaValue, 'transactionID' : "MYAADHAAR:" + transactionId}); 22 | } 23 | } 24 | 25 | class responseHandler{ 26 | String? uidNumber; 27 | String? mobileNumber; 28 | String? txnId; 29 | String? status; 30 | String? message; 31 | 32 | 33 | responseHandler(String responsejson){ 34 | var response = jsonDecode(responsejson); 35 | uidNumber = response['uidNumber']; 36 | mobileNumber = response['mobileNumber']; 37 | txnId = response['txnId']; 38 | status = response['status']; 39 | message = response ['message']; 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/otp_auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | 3 | import 'otp_auth_util.dart'; 4 | 5 | Future verifyOTPapi(String vid, int otp, String txnId) async { 6 | requestHandler request = requestHandler.vid(vid, otp, txnId); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | 10 | print(request.getBody()); 11 | 12 | http.Response httpresponse = await http.post(url.url, 13 | headers: {'Content-type': 'application/json'}, body: request.getBody()); 14 | if (httpresponse.statusCode == 200) { 15 | response = responseHandler(httpresponse.body); 16 | } else { 17 | print("Kahitari error with status code ${httpresponse.statusCode}"); 18 | throw Exception("http response failed"); 19 | } 20 | 21 | print(response.status); 22 | print(response.errcode); 23 | 24 | bool verify = false; 25 | if (response.status == "y" || response.status == "Y") { 26 | verify = true; 27 | } 28 | 29 | return Future.value(verify); 30 | } 31 | -------------------------------------------------------------------------------- /verifier_app/lib/api/otp_auth_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | class urlHandler{ 5 | Uri url = Uri.parse("https://stage1.uidai.gov.in/onlineekyc/getAuth/"); 6 | } 7 | 8 | class requestHandler{ 9 | String? uid; 10 | String? vid; 11 | String? txnId; 12 | int? otp; 13 | requestHandler.vid(this.vid,int otp, String txnId){ 14 | this.txnId = txnId; 15 | this.otp = otp; 16 | } 17 | String? getBody(){ 18 | if(vid == null && uid == null){ 19 | throw Exception("Both uid and vid null"); 20 | } 21 | else if (uid == null) { 22 | return json.encode({'vid': vid, 'txnId': txnId, 'otp' : "$otp"}); 23 | } 24 | else if (vid == null) { 25 | return json.encode({'uid': uid, 'txnId': txnId, 'otp' : "$otp"}); 26 | } 27 | } 28 | } 29 | 30 | class responseHandler{ 31 | String? status; 32 | int? errcode; 33 | 34 | responseHandler(String responsejson){ 35 | var response = jsonDecode(responsejson); 36 | status = response['status']; 37 | errcode = int.parse(response['errCode'] ?? "0"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /verifier_app/lib/api/otp_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | 3 | import 'otp_request_util.dart'; 4 | 5 | Future generateOTPapi(String vid) async { 6 | requestHandler request = requestHandler.vid(vid); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | 10 | print(request.getBody()); 11 | 12 | http.Response httpresponse = await http.post(url.url, 13 | headers: {'Content-type': 'application/json'}, body: request.getBody()); 14 | if (httpresponse.statusCode == 200) { 15 | response = responseHandler(httpresponse.body); 16 | } else { 17 | print("Kahitari error with status code ${httpresponse.statusCode}"); 18 | throw Exception("http response failed"); 19 | } 20 | print(response.status); 21 | print(response.errcode); 22 | return Future.value(request.txnId); 23 | } 24 | -------------------------------------------------------------------------------- /verifier_app/lib/api/otp_request_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | import 'package:uuid/uuid.dart'; 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/onlineekyc/getOtp/"); 7 | } 8 | 9 | class requestHandler{ 10 | String? uid; 11 | String? vid; 12 | String? txnId = "0acbaa8b-b3ae-433d-a5d2-51250ea8e970"; 13 | 14 | requestHandler.uid(this.uid){ 15 | const uuid = Uuid(); 16 | txnId = uuid.v4(); 17 | } 18 | requestHandler.vid(this.vid); 19 | String? getBody(){ 20 | if(vid == null && uid == null){ 21 | throw Exception("Both uid and vid null"); 22 | } 23 | else if (uid == null) { 24 | return json.encode({'vid': vid, 'txnId': txnId}); 25 | } 26 | else if (vid == null) { 27 | return json.encode({'uid': uid, 'txnId': txnId}); 28 | } 29 | } 30 | } 31 | 32 | class responseHandler{ 33 | String? status; 34 | int? errcode; 35 | 36 | responseHandler(String responsejson){ 37 | var response = jsonDecode(responsejson); 38 | status = response['status']; 39 | errcode = int.parse(response['errCode'] ?? "0"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /verifier_app/lib/api/vid_generate.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | 3 | import 'vid_generate_util.dart'; 4 | 5 | Future generateVidapi( 6 | String aadhar, String mobile, int otp, String txnId) async { 7 | requestHandler request = requestHandler(aadhar, mobile, otp, txnId); 8 | urlHandler url = urlHandler(); 9 | responseHandler? response; 10 | print(request.getBody()); 11 | http.Response httpresponse = await http.post(url.url, 12 | headers: {'Content-type': 'application/json'}, body: request.getBody()); 13 | if (httpresponse.statusCode == 200) { 14 | response = responseHandler(httpresponse.body); 15 | } else { 16 | print("Kahitari error with status code ${httpresponse.statusCode}"); 17 | throw Exception("http response failed"); 18 | } 19 | print(response.status); 20 | bool verify = false; 21 | if (response.status == "Success") { 22 | verify = true; 23 | } 24 | return Future.value(response.vid); 25 | } 26 | -------------------------------------------------------------------------------- /verifier_app/lib/api/vid_generate_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | class urlHandler{ 5 | Uri url = Uri.parse("https://stage1.uidai.gov.in/vidwrapper/generate"); 6 | } 7 | 8 | class requestHandler{ 9 | String? uid; 10 | String? mobile; 11 | String? otpTxnId; 12 | int? otp; 13 | 14 | requestHandler(this.uid,String mobile, int otp, String otpTxnId){ 15 | this.otpTxnId = otpTxnId; 16 | this.otp = otp; 17 | this.mobile = mobile; 18 | } 19 | 20 | String? getBody() { 21 | return json.encode({'uid': uid, 'mobile': "$mobile", 'otp': "$otp" , 'otpTxnId' : "$otpTxnId"}); 22 | } 23 | } 24 | 25 | class responseHandler{ 26 | String? status; 27 | String? vid; 28 | String? message; 29 | String? errorCode; 30 | 31 | responseHandler(String responsejson){ 32 | var response = jsonDecode(responsejson); 33 | status = response['status']; 34 | vid = response['vid']; 35 | message = response['message']; 36 | errorCode = response['errorCode']; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /verifier_app/lib/api/vid_otp_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'vid_otp_request_util.dart'; 3 | 4 | Future vidGenerateOTPapi(String aadhar,String captchaTxnId, String captchaValue) async{ 5 | 6 | requestHandler request = requestHandler(aadhar,captchaTxnId,captchaValue); 7 | urlHandler url = urlHandler(); 8 | responseHandler? response; 9 | print(request.getBody()); 10 | http.Response httpresponse = await http.post(url.url,headers: {'x-request-id' : request.transactionId, 'appid' : 'MYAADHAAR','Accept-Language' : 'en_in','Content-type' : 'application/json'},body:request.getBody()); 11 | if (httpresponse.statusCode == 200) { 12 | response = responseHandler(httpresponse.body); 13 | } 14 | else { 15 | print("Kahitari error with status code ${httpresponse.statusCode}"); 16 | throw Exception("http response failed"); 17 | } 18 | 19 | print(response.mobileNumber); 20 | 21 | return Future.value(response.txnId); 22 | } -------------------------------------------------------------------------------- /verifier_app/lib/api/vid_otp_request_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:uuid/uuid.dart'; 3 | 4 | 5 | class urlHandler{ 6 | Uri url = Uri.parse("https://stage1.uidai.gov.in/unifiedAppAuthService/api/v2/generate/aadhaar/otp"); 7 | } 8 | 9 | class requestHandler{ 10 | String? uid; 11 | String? captchaTxnId; 12 | String? captchaValue; 13 | String transactionId = "Init"; 14 | 15 | requestHandler(this.uid, this.captchaTxnId,this.captchaValue){ 16 | const uuid = Uuid(); 17 | transactionId = uuid.v4(); 18 | } 19 | 20 | String? getBody(){ 21 | return json.encode({'uidNumber' : uid, 'captchaTxnId' : captchaTxnId, 'captchaValue' : captchaValue, 'transactionID' : "MYAADHAAR:" + transactionId}); 22 | } 23 | } 24 | 25 | class responseHandler{ 26 | String? uidNumber; 27 | String? mobileNumber; 28 | String? txnId; 29 | String? status; 30 | String? message; 31 | 32 | 33 | responseHandler(String responsejson){ 34 | var response = jsonDecode(responsejson); 35 | uidNumber = response['uidNumber'].toString(); 36 | mobileNumber = response['mobileNumber'].toString(); 37 | txnId = response['txnId'].toString(); 38 | status = response['status'].toString(); 39 | message = response ['message'].toString(); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /verifier_app/lib/camera_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:camera/camera.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class TakePhoto extends StatefulWidget { 5 | const TakePhoto({this.camera}); 6 | final CameraDescription? camera; 7 | 8 | 9 | @override 10 | _TakePhotoState createState() => _TakePhotoState(); 11 | } 12 | 13 | class _TakePhotoState extends State { 14 | late CameraController _controller; 15 | late Future _initializeControllerFuture; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | 21 | _controller = CameraController( 22 | // Get a specific camera from the list of available cameras. 23 | widget.camera as CameraDescription, 24 | // Define the resolution to use. 25 | ResolutionPreset.medium, 26 | ); 27 | 28 | // Next, initialize the controller. This returns a Future. 29 | _initializeControllerFuture = _controller.initialize(); 30 | } 31 | 32 | Future takePicture() async { 33 | if (_controller.value.isTakingPicture) { 34 | return null; 35 | } 36 | 37 | try { 38 | XFile file = await _controller.takePicture(); 39 | return file; 40 | } on CameraException catch (e) { 41 | return null; 42 | } 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Scaffold( 48 | appBar: AppBar( 49 | title: const Text('Take A Photo'), 50 | ), 51 | floatingActionButton: FloatingActionButton( 52 | onPressed: () async { 53 | final file = await takePicture(); 54 | Navigator.of(context).pop(file?.path); 55 | }, 56 | child: const Icon(Icons.camera_alt), 57 | ), 58 | body: FutureBuilder( 59 | future: _initializeControllerFuture, 60 | builder: (context, snapshot) { 61 | if (snapshot.connectionState == ConnectionState.done) { 62 | return CameraPreview(_controller); 63 | } else { 64 | return const Center( 65 | child: CircularProgressIndicator(), 66 | ); 67 | } 68 | }, 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /verifier_app/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:verifier_app/home_screen.dart'; 3 | 4 | void main() { 5 | runApp(const MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | const MyApp({Key? key}) : super(key: key); 10 | 11 | // This widget is the root of your application. 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | title: 'Verifier App', 16 | theme: ThemeData( 17 | primarySwatch: Colors.blue, 18 | ), 19 | home: const HomeScreen(), 20 | debugShowCheckedModeBanner: false, 21 | ); 22 | } 23 | } -------------------------------------------------------------------------------- /verifier_app/lib/qr_scanner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:qr_code_scanner/qr_code_scanner.dart'; 4 | import 'package:verifier_app/verifier_data.dart'; 5 | 6 | class Scanner extends StatefulWidget { 7 | @override 8 | _ScannerState createState() => _ScannerState(); 9 | } 10 | 11 | class _ScannerState extends State { 12 | final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); 13 | late QRViewController controller; 14 | 15 | @override 16 | void dispose() { 17 | controller?.dispose(); 18 | super.dispose(); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | appBar: AppBar( 25 | title: const Text("Scanner"), 26 | ), 27 | body: Stack( 28 | children: [ 29 | Column( 30 | children: [ 31 | Expanded( 32 | flex: 5, 33 | child: Stack( 34 | children: [ 35 | QRView( 36 | key: qrKey, 37 | onQRViewCreated: _onQRViewCreated, 38 | ), 39 | Center( 40 | child: Container( 41 | width: 300, 42 | height: 300, 43 | decoration: BoxDecoration( 44 | border: Border.all( 45 | color: Colors.red, 46 | width: 4, 47 | ), 48 | borderRadius: BorderRadius.circular(12), 49 | ), 50 | ), 51 | ) 52 | ], 53 | ), 54 | ), 55 | const Expanded( 56 | flex: 1, 57 | child: Center( 58 | child: Text('Scan a code'), 59 | ), 60 | ) 61 | ], 62 | ), 63 | ], 64 | ), 65 | ); 66 | } 67 | 68 | void _onQRViewCreated(QRViewController controller) { 69 | this.controller = controller; 70 | controller.scannedDataStream.listen((scanData) { 71 | controller.pauseCamera(); 72 | 73 | VerifierData.qrData = scanData.code; 74 | print(scanData.code); 75 | Navigator.pop(context); 76 | 77 | showDialog( 78 | context: context, 79 | builder: (BuildContext context) { 80 | return AlertDialog( 81 | title: Text('Could not find viable url'), 82 | content: SingleChildScrollView( 83 | child: ListBody( 84 | children: [ 85 | Text('Barcode Type: ${describeEnum(scanData.format)}'), 86 | Text('Data: ${scanData.code}'), 87 | ], 88 | ), 89 | ), 90 | actions: [ 91 | TextButton( 92 | child: Text('Ok'), 93 | onPressed: () { 94 | Navigator.of(context).pop(); 95 | }, 96 | ), 97 | ], 98 | ); 99 | }, 100 | ).then((value) => controller.resumeCamera()); 101 | }); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /verifier_app/lib/resident_data.dart: -------------------------------------------------------------------------------- 1 | // basically user 2 | class Resident { 3 | static String aadharNum = ""; 4 | static String phoneNum = ""; 5 | static String VID = ""; 6 | 7 | static bool isVIDUploaded = false; 8 | } 9 | -------------------------------------------------------------------------------- /verifier_app/lib/verifier_data.dart: -------------------------------------------------------------------------------- 1 | class VerifierData { 2 | static String qrData = ""; 3 | } -------------------------------------------------------------------------------- /verifier_app/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: "direct main" 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "3.1.6" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.8.1" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | camera: 26 | dependency: "direct main" 27 | description: 28 | name: camera 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "0.9.4+3" 32 | camera_platform_interface: 33 | dependency: transitive 34 | description: 35 | name: camera_platform_interface 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.1" 39 | camera_web: 40 | dependency: transitive 41 | description: 42 | name: camera_web 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.2.1+1" 46 | characters: 47 | dependency: transitive 48 | description: 49 | name: characters 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.0" 53 | charcode: 54 | dependency: transitive 55 | description: 56 | name: charcode 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.3.1" 60 | clock: 61 | dependency: transitive 62 | description: 63 | name: clock 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.1.0" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.15.0" 74 | cross_file: 75 | dependency: transitive 76 | description: 77 | name: cross_file 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.3.2" 81 | crypto: 82 | dependency: transitive 83 | description: 84 | name: crypto 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "3.0.1" 88 | cupertino_icons: 89 | dependency: "direct main" 90 | description: 91 | name: cupertino_icons 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.0.3" 95 | fake_async: 96 | dependency: transitive 97 | description: 98 | name: fake_async 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.2.0" 102 | ffi: 103 | dependency: transitive 104 | description: 105 | name: ffi 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.1.2" 109 | file: 110 | dependency: transitive 111 | description: 112 | name: file 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "6.1.2" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_lints: 122 | dependency: "direct dev" 123 | description: 124 | name: flutter_lints 125 | url: "https://pub.dartlang.org" 126 | source: hosted 127 | version: "1.0.4" 128 | flutter_plugin_android_lifecycle: 129 | dependency: transitive 130 | description: 131 | name: flutter_plugin_android_lifecycle 132 | url: "https://pub.dartlang.org" 133 | source: hosted 134 | version: "2.0.4" 135 | flutter_test: 136 | dependency: "direct dev" 137 | description: flutter 138 | source: sdk 139 | version: "0.0.0" 140 | flutter_web_plugins: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.0" 145 | google_fonts: 146 | dependency: "direct main" 147 | description: 148 | name: google_fonts 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.0" 152 | http: 153 | dependency: transitive 154 | description: 155 | name: http 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.13.4" 159 | http_parser: 160 | dependency: transitive 161 | description: 162 | name: http_parser 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "4.0.0" 166 | js: 167 | dependency: transitive 168 | description: 169 | name: js 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.6.3" 173 | lints: 174 | dependency: transitive 175 | description: 176 | name: lints 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.0.1" 180 | matcher: 181 | dependency: transitive 182 | description: 183 | name: matcher 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.12.10" 187 | meta: 188 | dependency: transitive 189 | description: 190 | name: meta 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.7.0" 194 | path: 195 | dependency: transitive 196 | description: 197 | name: path 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.8.0" 201 | path_provider: 202 | dependency: transitive 203 | description: 204 | name: path_provider 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.6" 208 | path_provider_linux: 209 | dependency: transitive 210 | description: 211 | name: path_provider_linux 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "2.1.0" 215 | path_provider_macos: 216 | dependency: transitive 217 | description: 218 | name: path_provider_macos 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "2.0.2" 222 | path_provider_platform_interface: 223 | dependency: transitive 224 | description: 225 | name: path_provider_platform_interface 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "2.0.1" 229 | path_provider_windows: 230 | dependency: transitive 231 | description: 232 | name: path_provider_windows 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.0.3" 236 | pedantic: 237 | dependency: transitive 238 | description: 239 | name: pedantic 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.11.1" 243 | platform: 244 | dependency: transitive 245 | description: 246 | name: platform 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "3.0.2" 250 | plugin_platform_interface: 251 | dependency: transitive 252 | description: 253 | name: plugin_platform_interface 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.2" 257 | process: 258 | dependency: transitive 259 | description: 260 | name: process 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "4.2.4" 264 | qr_code_scanner: 265 | dependency: "direct main" 266 | description: 267 | name: qr_code_scanner 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "0.5.2" 271 | quiver: 272 | dependency: transitive 273 | description: 274 | name: quiver 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "3.0.1+1" 278 | sky_engine: 279 | dependency: transitive 280 | description: flutter 281 | source: sdk 282 | version: "0.0.99" 283 | source_span: 284 | dependency: transitive 285 | description: 286 | name: source_span 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.8.1" 290 | stack_trace: 291 | dependency: transitive 292 | description: 293 | name: stack_trace 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.10.0" 297 | stream_channel: 298 | dependency: transitive 299 | description: 300 | name: stream_channel 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "2.1.0" 304 | stream_transform: 305 | dependency: transitive 306 | description: 307 | name: stream_transform 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "2.0.0" 311 | string_scanner: 312 | dependency: transitive 313 | description: 314 | name: string_scanner 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "1.1.0" 318 | term_glyph: 319 | dependency: transitive 320 | description: 321 | name: term_glyph 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "1.2.0" 325 | test_api: 326 | dependency: transitive 327 | description: 328 | name: test_api 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "0.4.2" 332 | typed_data: 333 | dependency: transitive 334 | description: 335 | name: typed_data 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "1.3.0" 339 | uuid: 340 | dependency: "direct main" 341 | description: 342 | name: uuid 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "3.0.5" 346 | vector_math: 347 | dependency: transitive 348 | description: 349 | name: vector_math 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "2.1.0" 353 | win32: 354 | dependency: transitive 355 | description: 356 | name: win32 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "2.2.10" 360 | xdg_directories: 361 | dependency: transitive 362 | description: 363 | name: xdg_directories 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "0.2.0" 367 | sdks: 368 | dart: ">=2.14.0 <3.0.0" 369 | flutter: ">=2.5.0" 370 | -------------------------------------------------------------------------------- /verifier_app/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: verifier_app 2 | description: The Verifier of the two-part submission for the UIDAI Hackathon 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | camera: 34 | uuid: 35 | archive: ^3.1.6 36 | qr_code_scanner: 37 | google_fonts: 38 | cupertino_icons: ^1.0.2 39 | 40 | dev_dependencies: 41 | flutter_test: 42 | sdk: flutter 43 | 44 | flutter_lints: ^1.0.0 45 | 46 | # For information on the generic Dart part of this file, see the 47 | # following page: https://dart.dev/tools/pub/pubspec 48 | 49 | # The following section is specific to Flutter. 50 | flutter: 51 | 52 | # The following line ensures that the Material Icons font is 53 | # included with your application, so that you can use the icons in 54 | # the material Icons class. 55 | uses-material-design: true 56 | 57 | # To add assets to your application, add an assets section, like this: 58 | # assets: 59 | # - images/a_dot_burr.jpeg 60 | # - images/a_dot_ham.jpeg 61 | 62 | # An image asset can refer to one or more resolution-specific "variants", see 63 | # https://flutter.dev/assets-and-images/#resolution-aware. 64 | 65 | # For details regarding adding assets from package dependencies, see 66 | # https://flutter.dev/assets-and-images/#from-packages 67 | 68 | # To add custom fonts to your application, add a fonts section here, 69 | # in this "flutter" section. Each entry in this list should have a 70 | # "family" key with the font family name, and a "fonts" key with a 71 | # list giving the asset and other descriptors for the font. For 72 | # example: 73 | # fonts: 74 | # - family: Schyler 75 | # fonts: 76 | # - asset: fonts/Schyler-Regular.ttf 77 | # - asset: fonts/Schyler-Italic.ttf 78 | # style: italic 79 | # - family: Trajan Pro 80 | # fonts: 81 | # - asset: fonts/TrajanPro.ttf 82 | # - asset: fonts/TrajanPro_Bold.ttf 83 | # weight: 700 84 | # 85 | # For details regarding fonts from package dependencies, 86 | # see https://flutter.dev/custom-fonts/#from-packages 87 | -------------------------------------------------------------------------------- /verifier_app/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:verifier_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------