├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── 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
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── digital_wallet
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ └── xcshareddata
│ └── xcschemes
│ └── Runner.xcscheme
├── assets
├── images
│ ├── ccsad.png
│ ├── search.png
│ ├── thumb.jpg
│ ├── thumb2.jpg
│ ├── default.png
│ ├── cards
│ │ ├── gymCC.png
│ │ ├── CreditCC.png
│ │ ├── HealthCC.png
│ │ ├── driveCC.png
│ │ ├── giftCC.png
│ │ ├── airlineCC.png
│ │ ├── employeeCC.png
│ │ ├── loyalityCC.png
│ │ ├── studentCC.png
│ │ ├── identitycard.png
│ │ └── transportCC.png
│ ├── category
│ │ ├── cc.png
│ │ ├── id.png
│ │ ├── other.png
│ │ ├── student.jpg
│ │ ├── loyality.png
│ │ └── transport.png
│ ├── mockups
│ │ ├── gym.PNG
│ │ ├── id.PNG
│ │ ├── health.PNG
│ │ ├── driving.PNG
│ │ ├── loyality.PNG
│ │ ├── passport.PNG
│ │ ├── student.PNG
│ │ └── transport.PNG
│ └── notification.jpg
└── fonts
│ ├── Billabong.ttf
│ └── GoogleSansRegular.ttf
├── .metadata
├── .vscode
└── launch.json
├── lib
├── models
│ ├── User.dart
│ ├── stats.dart
│ └── creditcard_model.dart
├── main.dart
├── addPublicCard.dart
├── provider_models
│ └── theme_provider.dart
├── helper
│ ├── formatters.dart
│ ├── category_items.dart
│ └── DBHelper.dart
├── screens
│ ├── notifications_screen.dart
│ ├── add_screen.dart
│ ├── search_screen.dart
│ ├── home_screen.dart
│ ├── cardManage.dart
│ ├── profile_screen.dart
│ └── publicCardsViewer.dart
├── ui
│ ├── card_create.dart
│ ├── publicCards.dart
│ ├── viewStats.dart
│ └── createcard.dart
├── homepage.dart
├── addCard.dart
├── cardViewer.dart
├── creations
│ ├── cheque.dart
│ ├── giftCard.dart
│ ├── other.dart
│ ├── creditCC.dart
│ └── debitCard.dart
└── services
│ ├── Login.dart
│ └── signup.dart
├── README.md
├── test
└── widget_test.dart
├── .gitignore
├── pubspec.yaml
└── pubspec.lock
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/assets/images/ccsad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/ccsad.png
--------------------------------------------------------------------------------
/assets/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/search.png
--------------------------------------------------------------------------------
/assets/images/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/thumb.jpg
--------------------------------------------------------------------------------
/assets/images/thumb2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/thumb2.jpg
--------------------------------------------------------------------------------
/assets/fonts/Billabong.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/fonts/Billabong.ttf
--------------------------------------------------------------------------------
/assets/images/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/default.png
--------------------------------------------------------------------------------
/assets/images/cards/gymCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/gymCC.png
--------------------------------------------------------------------------------
/assets/images/category/cc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/cc.png
--------------------------------------------------------------------------------
/assets/images/category/id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/id.png
--------------------------------------------------------------------------------
/assets/images/mockups/gym.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/gym.PNG
--------------------------------------------------------------------------------
/assets/images/mockups/id.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/id.PNG
--------------------------------------------------------------------------------
/assets/images/cards/CreditCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/CreditCC.png
--------------------------------------------------------------------------------
/assets/images/cards/HealthCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/HealthCC.png
--------------------------------------------------------------------------------
/assets/images/cards/driveCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/driveCC.png
--------------------------------------------------------------------------------
/assets/images/cards/giftCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/giftCC.png
--------------------------------------------------------------------------------
/assets/images/category/other.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/other.png
--------------------------------------------------------------------------------
/assets/images/mockups/health.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/health.PNG
--------------------------------------------------------------------------------
/assets/images/notification.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/notification.jpg
--------------------------------------------------------------------------------
/assets/fonts/GoogleSansRegular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/fonts/GoogleSansRegular.ttf
--------------------------------------------------------------------------------
/assets/images/cards/airlineCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/airlineCC.png
--------------------------------------------------------------------------------
/assets/images/cards/employeeCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/employeeCC.png
--------------------------------------------------------------------------------
/assets/images/cards/loyalityCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/loyalityCC.png
--------------------------------------------------------------------------------
/assets/images/cards/studentCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/studentCC.png
--------------------------------------------------------------------------------
/assets/images/category/student.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/student.jpg
--------------------------------------------------------------------------------
/assets/images/mockups/driving.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/driving.PNG
--------------------------------------------------------------------------------
/assets/images/mockups/loyality.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/loyality.PNG
--------------------------------------------------------------------------------
/assets/images/mockups/passport.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/passport.PNG
--------------------------------------------------------------------------------
/assets/images/mockups/student.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/student.PNG
--------------------------------------------------------------------------------
/assets/images/cards/identitycard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/identitycard.png
--------------------------------------------------------------------------------
/assets/images/cards/transportCC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/cards/transportCC.png
--------------------------------------------------------------------------------
/assets/images/category/loyality.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/loyality.png
--------------------------------------------------------------------------------
/assets/images/category/transport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/category/transport.png
--------------------------------------------------------------------------------
/assets/images/mockups/transport.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/assets/images/mockups/transport.PNG
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-SLAYER/Card-Holder-Wallet-Stouche-/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/.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: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/digital_wallet/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.digital_wallet
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Flutter",
9 | "request": "launch",
10 | "type": "dart",
11 | // "flutterMode": "profile"
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/models/User.dart:
--------------------------------------------------------------------------------
1 |
2 | class User {
3 | String usrename;
4 | String password;
5 | int imageIndex;
6 |
7 | User(this.usrename, this.password, this.imageIndex);
8 |
9 | Map toMap() {
10 | var map = {
11 | 'username': this.usrename,
12 | 'password': this.password,
13 | };
14 | return map;
15 | }
16 |
17 | User.fromMap(Map map) {
18 | usrename = map['username'];
19 | password = map['password'];
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/lib/models/stats.dart:
--------------------------------------------------------------------------------
1 | class Stats {
2 | String usrename;
3 | String description;
4 | String date;
5 | int code;
6 |
7 | Stats(this.usrename, this.description, this.date, this.code);
8 |
9 | Map toMap() {
10 | var map = {
11 | 'username': this.usrename,
12 | 'description': this.description,
13 | 'time': this.date,
14 | 'code': this.code,
15 | };
16 | return map;
17 | }
18 |
19 | Stats.fromMap(Map map) {
20 | usrename = map['username'];
21 | description = map['description'];
22 | date = map['time'];
23 | code = map['code'];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.2.71'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.2.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Card Holder Wallet (Stouch)
2 |
3 | hold your cards, identity cards, visiting cards, bank cards, loyalty cards, credit & debit card, driving licence and more cards card with original photo and saved in local database.
4 |
5 | # Show some ❤️ and star the repo to support the project
6 |
7 | ## Screenshots
8 |
9 |
10 | 
11 |
12 |
13 | 
14 |
15 |
16 | 
17 |
18 |
19 | 
20 |
21 |
22 | 
23 |
24 |
25 | 
26 |
27 |
28 | 
29 |
30 |
31 | - [Youtube Channel](https://www.youtube.com/c/XSLAYERTN)
32 | - [Linkedin](https://www.linkedin.com/in/x-slayer/)
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/models/creditcard_model.dart:
--------------------------------------------------------------------------------
1 | class CreditCard {
2 | String username;
3 | String cardNumber;
4 | String expiryDate;
5 | String cardHolderName;
6 | String cvvCode;
7 | int colorIndex;
8 |
9 | CreditCard(this.username,{this.cardNumber, this.expiryDate, this.cardHolderName, this.cvvCode , this.colorIndex});
10 |
11 | Map toMap() {
12 | var map = {
13 | 'username': this.username,
14 | 'cardNumber': this.cardNumber,
15 | 'expiryDate': this.expiryDate,
16 | 'cardHolderName': this.cardHolderName,
17 | 'cvvCode': this.cvvCode,
18 | 'colorIndex': this.colorIndex,
19 | };
20 | return map;
21 | }
22 |
23 | CreditCard.fromMap(Map map){
24 | username = map['username'];
25 | cardNumber = map['cardNumber'];
26 | expiryDate = map['expiryDate'];
27 | cardHolderName = map['cardHolderName'];
28 | cvvCode = map['cvvCode'];
29 | colorIndex = map['colorIndex'];
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 | import 'package:digital_wallet/provider_models/theme_provider.dart';
4 | import 'package:digital_wallet/services/Login.dart';
5 | import 'package:digital_wallet/services/signup.dart';
6 |
7 | import 'homepage.dart';
8 |
9 | Future main() async {
10 | runApp(
11 | ChangeNotifierProvider(
12 | builder: (_) => ThemeProvider(isLightTheme: true),
13 | child: MyApp(),
14 | ),
15 | );
16 | }
17 |
18 | class MyApp extends StatelessWidget {
19 | @override
20 | Widget build(BuildContext context) {
21 | final themeProvider = Provider.of(context);
22 | return MaterialApp(
23 | routes: {
24 | Login.id: (context) => Login(),
25 | SignUp.id: (context) => SignUp(),
26 | HomePage.id: (context) => HomePage(),
27 | },
28 | debugShowMaterialGrid: false,
29 | title: 'digital_wallet',
30 | theme: themeProvider.getThemeData,
31 | debugShowCheckedModeBanner: false,
32 | home: Login(),
33 | );
34 | }
35 | }
--------------------------------------------------------------------------------
/lib/addPublicCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AddPublicCard extends StatelessWidget {
4 | final List children;
5 | AddPublicCard({@required this.children});
6 | @override
7 | Widget build(BuildContext context) {
8 | return Scaffold(
9 | appBar: AppBar(
10 | centerTitle: true,
11 | leading: IconButton(
12 | onPressed: () => Navigator.of(context).pop(),
13 | icon: Icon(Icons.clear,
14 | color: Theme.of(context).accentColor, size: 18.0),
15 | ),
16 | title: Text(
17 | "Select Type",
18 | style: TextStyle(color: Theme.of(context).accentColor),
19 | ),
20 | backgroundColor: Theme.of(context).cardColor,
21 | ),
22 | body: Container(
23 | color: Colors.white30,
24 | child: Padding(
25 | padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 35.0),
26 | child: Container(
27 | child: Column(
28 | children: this.children
29 | ),
30 | ),
31 | ),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/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:digital_wallet/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(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 |
--------------------------------------------------------------------------------
/lib/provider_models/theme_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ThemeProvider with ChangeNotifier {
4 | bool isLightTheme;
5 |
6 | ThemeProvider({this.isLightTheme});
7 |
8 | ThemeData get getThemeData => isLightTheme ? lightTheme : darkTheme;
9 |
10 | set setThemeData(bool val) {
11 | if (val) {
12 | isLightTheme = true;
13 | } else {
14 | isLightTheme = false;
15 | }
16 | notifyListeners();
17 | }
18 | }
19 |
20 | final darkTheme = ThemeData(
21 | primarySwatch: Colors.grey,
22 | primaryColor: Colors.black,
23 | brightness: Brightness.dark,
24 | backgroundColor: Color(0xFF000000),
25 | accentColor: Colors.white,
26 | cardColor: Color.fromRGBO(28,28,28, 1),
27 | accentIconTheme: IconThemeData(color: Colors.black),
28 | dividerColor: Colors.black54,
29 | );
30 |
31 | final lightTheme = ThemeData(
32 | primarySwatch: Colors.grey,
33 | primaryColor: Colors.white,
34 | brightness: Brightness.light,
35 | backgroundColor: Color(0xFFE5E5E5),
36 | cardColor: Colors.grey[100],
37 | accentColor: Colors.black,
38 | accentIconTheme: IconThemeData(color: Colors.white),
39 | dividerColor: Colors.white54,
40 | );
--------------------------------------------------------------------------------
/lib/helper/formatters.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | class MaskedTextInputFormatter extends TextInputFormatter {
5 | final String mask;
6 | final String separator;
7 |
8 | MaskedTextInputFormatter({
9 | @required this.mask,
10 | @required this.separator,
11 | }) {
12 | assert(mask != null);
13 | assert(separator != null);
14 | }
15 |
16 | @override
17 | TextEditingValue formatEditUpdate(
18 | TextEditingValue oldValue, TextEditingValue newValue) {
19 | if (newValue.text.length > 0) {
20 | if (newValue.text.length > oldValue.text.length) {
21 | if (newValue.text.length > mask.length) return oldValue;
22 | if (newValue.text.length < mask.length &&
23 | mask[newValue.text.length - 1] == separator) {
24 | return TextEditingValue(
25 | text:
26 | '${oldValue.text}$separator${newValue.text.substring(newValue.text.length - 1)}',
27 | selection: TextSelection.collapsed(
28 | offset: newValue.selection.end + 1,
29 | ),
30 | );
31 | }
32 | }
33 | }
34 | return newValue;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/screens/notifications_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class NotifcationsScreen extends StatefulWidget {
4 | NotifcationsScreen({Key key}) : super(key: key);
5 |
6 | @override
7 | _NotifcationsScreenState createState() => _NotifcationsScreenState();
8 | }
9 |
10 | class _NotifcationsScreenState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | body: Center(
15 | child: Container(
16 | child: Column(
17 | mainAxisAlignment: MainAxisAlignment.center,
18 | children: [
19 | Image(
20 | width: 162.0,
21 | height: 162.0,
22 | image: AssetImage("assets/images/notification.jpg"),
23 | ),
24 | SizedBox(
25 | height: 20.0,
26 | ),
27 | Text(
28 | "No Notifications Right Now !",
29 | style: TextStyle(
30 | color: Theme.of(context).accentColor,
31 | fontFamily: "Google",
32 | fontSize: 25.0),
33 | )
34 | ],
35 | ),
36 | )),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/ui/card_create.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:digital_wallet/creations/cheque.dart';
3 | import 'package:digital_wallet/creations/creditCC.dart';
4 | import 'package:digital_wallet/creations/debitCard.dart';
5 | import 'package:digital_wallet/creations/giftCard.dart';
6 | import 'package:digital_wallet/creations/other.dart';
7 |
8 | class CardCreate extends StatefulWidget {
9 | final String type;
10 |
11 | CardCreate({@required this.type});
12 |
13 | @override
14 | _CardCreateState createState() => _CardCreateState();
15 | }
16 |
17 | class _CardCreateState extends State {
18 | Widget what = CreditCC();
19 |
20 | @override
21 | void initState() {
22 | super.initState();
23 | switch (widget.type) {
24 | case "DC":
25 | what = DebitCard();
26 | break;
27 | case "CC":
28 | what = CreditCC();
29 | break;
30 | case "CH":
31 | what = Check();
32 | break;
33 | case "GC":
34 | what = GiftCard();
35 | break;
36 | case "OC":
37 | what = OtherCard();
38 | break;
39 | }
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return Scaffold(
45 | appBar: AppBar(
46 | backgroundColor: Colors.transparent,
47 | elevation: 0.0,
48 | leading: IconButton(
49 | color: Theme.of(context).accentColor,
50 | onPressed: () => Navigator.of(context).pop(),
51 | icon: Icon(Icons.clear),
52 | ),
53 | ),
54 | body: SingleChildScrollView(
55 | child: what,
56 | ),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | digital_wallet
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 |
--------------------------------------------------------------------------------
/.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 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/Flutter/flutter_export_environment.sh
65 | **/ios/ServiceDefinitions.json
66 | **/ios/Runner/GeneratedPluginRegistrant.*
67 |
68 | # Exceptions to above rules.
69 | !**/ios/**/default.mode1v3
70 | !**/ios/**/default.mode2v3
71 | !**/ios/**/default.pbxuser
72 | !**/ios/**/default.perspectivev3
73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
74 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/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 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.digital_wallet"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67 | }
68 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/homepage.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/models/User.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:digital_wallet/screens/add_screen.dart';
4 | import 'package:digital_wallet/screens/home_screen.dart';
5 | import 'package:digital_wallet/screens/notifications_screen.dart';
6 | import 'package:digital_wallet/screens/profile_screen.dart';
7 | import 'package:digital_wallet/screens/search_screen.dart';
8 |
9 | class HomePage extends StatefulWidget {
10 | static final id = "home_screen";
11 | static User user;
12 |
13 | HomePage();
14 |
15 | @override
16 | _HomePageState createState() => _HomePageState();
17 | }
18 |
19 | class _HomePageState extends State {
20 | int currentIndex = 0;
21 | PageController pageController;
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | pageController = PageController();
27 | }
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | return WillPopScope(
32 | onWillPop: () {
33 | return;
34 | },
35 | child: Scaffold(
36 | body: PageView(
37 | controller: pageController,
38 | children: [
39 | Dashboard(),
40 | SearchScreen(),
41 | AddScreen(),
42 | NotifcationsScreen(),
43 | ProfileScreen(),
44 | ],
45 | onPageChanged: (int index) {
46 | setState(() {
47 | currentIndex = index;
48 | });
49 | },
50 | ),
51 | bottomNavigationBar: bottomItems(),
52 | ),
53 | );
54 | }
55 |
56 | BottomNavigationBar bottomItems() {
57 | return BottomNavigationBar(
58 | selectedItemColor: Colors.blue,
59 | onTap: (int index) {
60 | setState(
61 | () {
62 | currentIndex = index;
63 | },
64 | );
65 | pageController.animateToPage(
66 | index,
67 | duration: Duration(
68 | milliseconds: 200,
69 | ),
70 | curve: Curves.easeIn,
71 | );
72 | },
73 | currentIndex: currentIndex,
74 | type: BottomNavigationBarType.fixed,
75 | items: [
76 | BottomNavigationBarItem(
77 | icon: Icon(Icons.home),
78 | title: SizedBox.shrink(),
79 | ),
80 | BottomNavigationBarItem(
81 | icon: Icon(Icons.search),
82 | title: SizedBox.shrink(),
83 | ),
84 | BottomNavigationBarItem(
85 | icon: Icon(
86 | Icons.add_circle,
87 | size: 35.0,
88 | ),
89 | title: SizedBox.shrink(),
90 | ),
91 | BottomNavigationBarItem(
92 | icon: Icon(Icons.notifications),
93 | title: SizedBox.shrink(),
94 | ),
95 | BottomNavigationBarItem(
96 | icon: Icon(Icons.supervised_user_circle),
97 | title: SizedBox.shrink(),
98 | ),
99 | ],
100 | );
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/screens/add_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:digital_wallet/helper/category_items.dart';
3 |
4 | class AddScreen extends StatefulWidget {
5 | AddScreen({Key key}) : super(key: key);
6 |
7 | @override
8 | _AddScreenState createState() => _AddScreenState();
9 | }
10 |
11 | class _AddScreenState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | body: Container(
16 | padding: EdgeInsets.only(top: 20.0),
17 | color: Theme.of(context).backgroundColor,
18 | child: ListView.builder(
19 | itemCount: CategoryItems.cards.length,
20 | itemBuilder: (context, index) {
21 | return GestureDetector(
22 | onTap: () {
23 | Navigator.push(
24 | context,
25 | MaterialPageRoute(
26 | builder: (context) =>
27 | CategoryItems.cards[index]['screen']),
28 | );
29 | },
30 | child: buildCard(index),
31 | );
32 | },
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | Column buildCard(int index) {
39 | return Column(
40 | mainAxisAlignment: MainAxisAlignment.start,
41 | children: [
42 | Padding(
43 | padding: const EdgeInsets.symmetric(horizontal: 8.0),
44 | child: Container(
45 | height: 120.0,
46 | decoration: BoxDecoration(
47 | boxShadow: [
48 | BoxShadow(
49 | color: Colors.black45,
50 | blurRadius: 15.0, // has the effect of softening the shadow
51 | spreadRadius: 1.0, // has the effect of extending the shadow
52 | offset: Offset(
53 | 3.0, // horizontal, move right 10
54 | 3.0, // vertical, move down 10
55 | ),
56 | )
57 | ],
58 | color: Theme.of(context).cardColor,
59 | borderRadius: BorderRadius.circular(8.0),
60 | ),
61 | child: Row(
62 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
63 | children: [
64 | Container(
65 | padding: EdgeInsets.only(left: 35.0),
66 | child: Text(
67 | CategoryItems.cards[index]['name'],
68 | style: TextStyle(
69 | fontSize: 16.0,
70 | fontFamily: "Google",
71 | fontStyle: FontStyle.italic,
72 | fontWeight: FontWeight.bold),
73 | ),
74 | ),
75 | Container(
76 | width: 175.0,
77 | decoration: BoxDecoration(
78 | image: DecorationImage(
79 | fit: BoxFit.cover,
80 | image: AssetImage(
81 | CategoryItems.cards[index]['img'],
82 | ),
83 | ),
84 | ),
85 | )
86 | ],
87 | ),
88 | ),
89 | ),
90 | SizedBox(
91 | height: 20.0,
92 | )
93 | ],
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: digital_wallet
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 | toast: ^0.1.5
23 |
24 | # The following adds the Cupertino Icons font to your application.
25 | # Use with the CupertinoIcons class for iOS style icons.
26 | cupertino_icons: ^0.1.2
27 |
28 | dev_dependencies:
29 | flutter_test:
30 | sdk: flutter
31 | flutter_credit_card: 0.1.1
32 | flutter_swiper: ^1.1.6
33 | provider: ^3.1.0+1
34 | snappable: ^1.0.1
35 | path_provider: ^0.5.0+1
36 | image_picker: ^0.6.2+1
37 | sqflite: ^1.1.7+3
38 | intl: ^0.16.0
39 |
40 |
41 |
42 |
43 |
44 | # For information on the generic Dart part of this file, see the
45 | # following page: https://dart.dev/tools/pub/pubspec
46 |
47 | # The following section is specific to Flutter.
48 | flutter:
49 |
50 | # The following line ensures that the Material Icons font is
51 | # included with your application, so that you can use the icons in
52 | # the material Icons class.
53 | uses-material-design: true
54 |
55 | # To add assets to your application, add an assets section, like this:
56 | assets:
57 | - assets/images/
58 | - assets/images/cards/
59 | - assets/images/category/
60 | - assets/images/mockups/
61 | # - images/a_dot_ham.jpeg
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: Google
76 | fonts:
77 | - asset: assets/fonts/GoogleSansRegular.ttf
78 | - family: Billabong
79 | fonts:
80 | - asset: assets/fonts/Billabong.ttf
81 | # - asset: fonts/Schyler-Italic.ttf
82 | # style: italic
83 | # - family: Trajan Pro
84 | # fonts:
85 | # - asset: fonts/TrajanPro.ttf
86 | # - asset: fonts/TrajanPro_Bold.ttf
87 | # weight: 700
88 | #
89 | # For details regarding fonts from package dependencies,
90 | # see https://flutter.dev/custom-fonts/#from-packages
91 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/ui/publicCards.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Cards extends StatefulWidget {
4 | String userName;
5 | String name;
6 | String prenom;
7 | String birthDate;
8 | String nationality;
9 | double height;
10 | CardType type;
11 | String imgBase64;
12 |
13 | Cards(
14 | {this.userName,
15 | this.name,
16 | this.prenom,
17 | this.birthDate,
18 | this.nationality,
19 | this.height,
20 | this.type,
21 | this.imgBase64});
22 |
23 | CardType getType(String str) {
24 | switch (str) {
25 | case "CardType.id":
26 | return CardType.id;
27 | break;
28 | case "CardType.driver":
29 | return CardType.driver;
30 | break;
31 | case "CardType.gym":
32 | return CardType.gym;
33 | break;
34 | case "CardType.health":
35 | return CardType.health;
36 | break;
37 | case "CardType.loyality":
38 | return CardType.loyality;
39 | break;
40 | case "CardType.passport":
41 | return CardType.passport;
42 | break;
43 | case "CardType.transport":
44 | return CardType.transport;
45 | break;
46 | case "CardType.student":
47 | return CardType.student;
48 | break;
49 | default:
50 | return CardType.driver;
51 | }
52 | }
53 |
54 | Map toMap() {
55 | var map = {
56 | 'username': this.userName,
57 | 'name': this.name,
58 | 'prenom': this.prenom,
59 | 'birthDate': this.birthDate,
60 | 'nationality': this.nationality,
61 | 'type': this.type.toString(),
62 | 'img': this.imgBase64,
63 | };
64 | return map;
65 | }
66 |
67 | Cards.fromMap(Map map) {
68 | userName = map['username'];
69 | name = map['name'];
70 | prenom = map['prenom'];
71 | birthDate = map['birthDate'];
72 | nationality = map['nationality'];
73 | type = getType(map['type'].toString());
74 | imgBase64 = map['img'];
75 | }
76 |
77 | @override
78 | _CardsState createState() => _CardsState();
79 | }
80 |
81 | class _CardsState extends State {
82 | @override
83 | void initState() {
84 | super.initState();
85 | }
86 |
87 | String revealMockup() {
88 | switch (this.widget.type) {
89 | case CardType.id:
90 | return "assets/images/mockups/id.PNG";
91 | break;
92 | case CardType.driver:
93 | return "assets/images/mockups/driving.PNG";
94 | break;
95 | case CardType.gym:
96 | return "assets/images/mockups/gym.PNG";
97 | break;
98 | case CardType.health:
99 | return "assets/images/mockups/health.PNG";
100 | break;
101 | case CardType.loyality:
102 | return "assets/images/mockups/loyality.PNG";
103 | break;
104 | case CardType.passport:
105 | return "assets/images/mockups/passport.PNG";
106 | break;
107 | case CardType.transport:
108 | return "assets/images/mockups/transport.PNG";
109 | break;
110 | case CardType.student:
111 | return "assets/images/mockups/student.PNG";
112 | break;
113 | default:
114 | return "Idle";
115 | }
116 | }
117 |
118 | @override
119 | Widget build(BuildContext context) {
120 | return Container(
121 | height: this.widget.height,
122 | width: double.infinity,
123 | decoration: BoxDecoration(
124 | image: DecorationImage(
125 | image: AssetImage(
126 | revealMockup(),
127 | ),
128 | fit: BoxFit.cover),
129 | boxShadow: [
130 | BoxShadow(
131 | color: Colors.black45,
132 | blurRadius: 15.0,
133 | spreadRadius: 1.0,
134 | offset: Offset(
135 | 3.0,
136 | 3.0,
137 | ),
138 | )
139 | ],
140 | borderRadius: BorderRadius.circular(18.0),
141 | ),
142 | child: Padding(
143 | padding: const EdgeInsets.all(20.0),
144 | ),
145 | );
146 | }
147 | }
148 |
149 | enum CardType {
150 | id,
151 | passport,
152 | driver,
153 | health,
154 | gym,
155 | transport,
156 | loyality,
157 | student
158 | }
159 |
--------------------------------------------------------------------------------
/lib/addCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:digital_wallet/ui/card_create.dart';
3 |
4 | class AddCards extends StatelessWidget {
5 | const AddCards({Key key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Scaffold(
10 | appBar: AppBar(
11 | centerTitle: true,
12 | leading: IconButton(
13 | onPressed: () => Navigator.of(context).pop(),
14 | icon: Icon(Icons.clear,
15 | color: Theme.of(context).accentColor, size: 18.0),
16 | ),
17 | title: Text(
18 | "Select Type",
19 | style: TextStyle(color: Theme.of(context).accentColor),
20 | ),
21 | backgroundColor: Theme.of(context).cardColor,
22 | ),
23 | body: Container(
24 | color: Colors.white30,
25 | child: Padding(
26 | padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 35.0),
27 | child: Container(
28 | child: Column(
29 | children: [
30 | addButton(
31 | context, 1, "Credit Card", Colors.white70, Colors.blue),
32 | SizedBox(
33 | height: 20.0,
34 | ),
35 | addButton(
36 | context, 2, "Debit Card", Colors.black54, Colors.white),
37 | SizedBox(
38 | height: 20.0,
39 | ),
40 | addButton(context, 3, "Check", Colors.black54, Colors.white),
41 | SizedBox(
42 | height: 20.0,
43 | ),
44 | addButton(
45 | context, 4, "Gift Card", Colors.black54, Colors.white),
46 | SizedBox(height: 28.0),
47 | addButton(
48 | context, 5, "Other Card", Colors.black54, Colors.white),
49 | SizedBox(height: 28.0),
50 | Text(
51 | "You Can now add credit cards with specific balance into wallet." +
52 | " when the cards hits \$0.00 it will auomatically disappear.want to know if your gift card will link ?",
53 | textAlign: TextAlign.center,
54 | style: TextStyle(
55 | fontFamily: "Google",
56 | fontSize: 16.0,
57 | ),
58 | )
59 | ],
60 | ),
61 | ),
62 | ),
63 | ),
64 | );
65 | }
66 |
67 | MaterialButton addButton(BuildContext context, int indice, String text,
68 | Color txtColor, Color buttonColor) {
69 | return MaterialButton(
70 | onPressed: () {
71 | switch (indice) {
72 | case 1:
73 | {
74 | Navigator.push(
75 | context,
76 | MaterialPageRoute(
77 | builder: (BuildContext context) => CardCreate(type: "CC"),
78 | ),
79 | );
80 | break;
81 | }
82 | case 2:
83 | {
84 | Navigator.push(
85 | context,
86 | MaterialPageRoute(
87 | builder: (BuildContext context) => CardCreate(type: "DC"),
88 | ),
89 | );
90 | break;
91 | }
92 | case 3:
93 | {
94 | Navigator.push(
95 | context,
96 | MaterialPageRoute(
97 | builder: (BuildContext context) => CardCreate(type: "CH"),
98 | ),
99 | );
100 | break;
101 | }
102 | case 4:
103 | {
104 | Navigator.push(
105 | context,
106 | MaterialPageRoute(
107 | builder: (BuildContext context) => CardCreate(type: "GC"),
108 | ),
109 | );
110 | break;
111 | }
112 | case 5:
113 | {
114 | Navigator.push(
115 | context,
116 | MaterialPageRoute(
117 | builder: (BuildContext context) => CardCreate(type: "OC"),
118 | ),
119 | );
120 | break;
121 | }
122 | default:
123 | {}
124 | }
125 | },
126 | color: buttonColor,
127 | child: Center(
128 | child: Text(
129 | text,
130 | style: TextStyle(color: txtColor),
131 | ),
132 | ),
133 | );
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/lib/cardViewer.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:digital_wallet/addCard.dart';
3 | import 'package:digital_wallet/helper/category_items.dart';
4 | import 'package:flutter_credit_card/flutter_credit_card.dart';
5 | import 'package:digital_wallet/homepage.dart';
6 | import 'package:digital_wallet/screens/cardManage.dart' as cc;
7 |
8 | class CardViewer extends StatefulWidget {
9 | @override
10 | _CardViewerState createState() => _CardViewerState();
11 | }
12 |
13 | class _CardViewerState extends State {
14 | @override
15 | void initState() {
16 | super.initState();
17 | }
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | final _screenSize = MediaQuery.of(context).size;
22 | return Scaffold(
23 | appBar: AppBar(
24 | centerTitle: true,
25 | title: Text(
26 | "Your Cards (${CategoryItems.cardsList.length})",
27 | style: TextStyle(color: Theme.of(context).accentColor),
28 | ),
29 | backgroundColor: Theme.of(context).cardColor,
30 | elevation: 1.5,
31 | leading: IconButton(
32 | onPressed: () {
33 | Navigator.push(
34 | context,
35 | MaterialPageRoute(builder: (BuildContext context) => HomePage()),
36 | );
37 | },
38 | icon: Icon(
39 | Icons.clear,
40 | size: 25.0,
41 | color: Theme.of(context).accentColor,
42 | ),
43 | ),
44 | actions: [
45 | IconButton(
46 | onPressed: () {
47 | Navigator.push(
48 | context,
49 | MaterialPageRoute(
50 | builder: (BuildContext context) => AddCards(),
51 | ),
52 | );
53 | },
54 | icon: Icon(
55 | Icons.add,
56 | size: 25.0,
57 | color: Theme.of(context).accentColor,
58 | ),
59 | ),
60 | ],
61 | ),
62 | body: (CategoryItems.cardsList == null ||
63 | CategoryItems.cardsList.length == 0)
64 | ? noCards()
65 | : Column(
66 | children: [
67 | SizedBox(
68 | height: _screenSize.height * 0.8,
69 | child: ListView.builder(
70 | itemCount: CategoryItems.cardsList.length == 0
71 | ? 0
72 | : CategoryItems.cardsList.length,
73 | itemBuilder: (BuildContext context, int index) {
74 | return InkWell(
75 | onTap: () {
76 | Navigator.push(
77 | context,
78 | MaterialPageRoute(
79 | builder: (BuildContext context) =>
80 | cc.CardManagment(
81 | indice: index,
82 | card: CategoryItems.cardsList[index],
83 | ),
84 | ),
85 | );
86 | },
87 | child: CreditCardWidget(
88 | height: _screenSize.height * 0.35,
89 | cardHolderName:
90 | CategoryItems.cardsList[index].cardHolderName,
91 | cardNumber: CategoryItems.cardsList[index].cardNumber,
92 | cvvCode: CategoryItems.cardsList[index].cvvCode,
93 | expiryDate: CategoryItems.cardsList[index].expiryDate,
94 | showBackView: false,
95 | cardbgColor: CategoryItems.colorsList[
96 | CategoryItems.cardsList[index].colorIndex],
97 | ),
98 | );
99 | },
100 | ),
101 | ),
102 | ],
103 | ),
104 | );
105 | }
106 |
107 | Widget noCards() {
108 | return Center(
109 | child: Column(
110 | mainAxisAlignment: MainAxisAlignment.center,
111 | children: [
112 | Image(
113 | image: AssetImage("assets/images/ccsad.png"),
114 | width: 165.0,
115 | height: 155.0,
116 | ),
117 | SizedBox(
118 | height: 9.0,
119 | ),
120 | Text(
121 | "You have no cards to display",
122 | textAlign: TextAlign.center,
123 | style: TextStyle(
124 | fontStyle: FontStyle.italic,
125 | fontSize: 20.0,
126 | color: Theme.of(context).accentColor),
127 | )
128 | ],
129 | ),
130 | );
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/lib/screens/search_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:typed_data';
3 |
4 | import 'package:digital_wallet/helper/category_items.dart';
5 | import 'package:digital_wallet/ui/publicCards.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:toast/toast.dart';
8 |
9 | class SearchScreen extends StatefulWidget {
10 |
11 |
12 | @override
13 | _SearchScreenState createState() => _SearchScreenState();
14 | }
15 |
16 | class _SearchScreenState extends State {
17 | TextEditingController searchController = new TextEditingController();
18 | List lookCards = [];
19 |
20 | _searchForCards(String keyword) {
21 | if (keyword.isEmpty) return;
22 | for (var pCard in CategoryItems.publicCardsList) {
23 | if (pCard.type.toString().toLowerCase().contains(keyword.toLowerCase())) {
24 | setState(() {
25 | lookCards.add(pCard);
26 | });
27 | }
28 | }
29 | }
30 |
31 | _showOriginal(int index) {
32 | showDialog(
33 | context: context,
34 | builder: (BuildContext context) {
35 | return AlertDialog(
36 | content: Container(
37 | child: _b64Toimage(lookCards[index].imgBase64),
38 | ),
39 | );
40 | },
41 | );
42 | }
43 |
44 | _b64Toimage(String base) {
45 | Uint8List bytes = base64.decode(base);
46 | return Image.memory(
47 | bytes,
48 | fit: BoxFit.cover,
49 | );
50 | }
51 |
52 | showToast() {
53 | return Toast.show("You Have No Original Copy To Display", context,
54 | duration: 3, gravity: Toast.BOTTOM);
55 | }
56 |
57 | @override
58 | Widget build(BuildContext context) {
59 | return Scaffold(
60 | appBar: AppBar(
61 | leading: SizedBox.shrink(),
62 | backgroundColor: Theme.of(context).backgroundColor,
63 | title: Container(
64 | child: TextField(
65 | controller: searchController,
66 | decoration: InputDecoration(
67 | filled: true,
68 | contentPadding: EdgeInsets.symmetric(vertical: 15.0),
69 | border: InputBorder.none,
70 | hintText: "Search For Card ..",
71 | hintStyle: TextStyle(
72 | color: Theme.of(context).accentColor, fontSize: 16.0),
73 | prefixIcon: Icon(
74 | Icons.search,
75 | size: 30.0,
76 | ),
77 | suffixIcon: IconButton(
78 | onPressed: () {
79 | WidgetsBinding.instance.addPostFrameCallback((_) {
80 | searchController.clear();
81 | lookCards.clear();
82 | });
83 | },
84 | icon: Icon(
85 | Icons.clear,
86 | ),
87 | ),
88 | ),
89 | onSubmitted: (input) => _searchForCards(input),
90 | ),
91 | ),
92 | ),
93 | body: lookCards.length != 0
94 | ? searchList()
95 | : Padding(
96 | padding:
97 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 33.0),
98 | child: Column(
99 | children: [
100 | Image(
101 | image: AssetImage(
102 | "assets/images/search.png",
103 | ),
104 | width: 145,
105 | height: 155,
106 | ),
107 | Text(
108 | "Enter a few words to search for on stouche.",
109 | textAlign: TextAlign.center,
110 | style: TextStyle(
111 | fontSize: 19.0,
112 | color: Theme.of(context).accentColor,
113 | fontFamily: "Google",
114 | ),
115 | )
116 | ],
117 | ),
118 | ),
119 | );
120 | }
121 |
122 | Widget searchList() {
123 | return ListView.builder(
124 | itemCount: lookCards.length,
125 | itemBuilder: (context, index) {
126 | return InkWell(
127 | onTap: () {
128 | lookCards[index].imgBase64 != null
129 | ? _showOriginal(index)
130 | : showToast();
131 | },
132 | child: Padding(
133 | padding: const EdgeInsets.all(15.0),
134 | child: Cards(
135 | userName: lookCards[index].userName,
136 | height: MediaQuery.of(context).size.height * 0.35,
137 | name: lookCards[index].name,
138 | prenom: lookCards[index].prenom,
139 | nationality: CategoryItems.publicCardsList[index].nationality,
140 | type: lookCards[index].type,
141 | birthDate: lookCards[index].birthDate,
142 | ),
143 | ),
144 | );
145 | },
146 | );
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/lib/ui/viewStats.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/models/stats.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:digital_wallet/helper/DBHelper.dart';
5 |
6 | import '../homepage.dart';
7 |
8 | class ViewStats extends StatefulWidget {
9 | ViewStats({Key key}) : super(key: key);
10 |
11 | @override
12 | _ViewStatsState createState() => _ViewStatsState();
13 | }
14 |
15 | class _ViewStatsState extends State {
16 | List stats = [];
17 |
18 | Widget _getLeading(int code) {
19 | switch (code) {
20 | case 1:
21 | return Icon(
22 | Icons.done,
23 | color: Colors.greenAccent,
24 | size: 35.0,
25 | );
26 | break;
27 | case 2:
28 | return Icon(
29 | Icons.delete_outline,
30 | color: Colors.red,
31 | size: 35.0,
32 | );
33 | break;
34 | default:
35 | return null;
36 | }
37 | }
38 |
39 | _getStats() async {
40 | try {
41 | stats.clear();
42 | List statis = await DBHlper().getStats(HomePage.user.usrename);
43 | if (statis.length == 0) return;
44 | setState(() {
45 | stats = statis;
46 | });
47 | } catch (ex) {}
48 | }
49 |
50 | _clearStats() async {
51 | try {
52 | setState(() {
53 | DBHlper().deleteStats(HomePage.user.usrename);
54 | stats.clear();
55 | });
56 | } catch (ex) {}
57 | }
58 |
59 | @override
60 | void initState() {
61 | super.initState();
62 | _getStats();
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 | ThemeData theme = Theme.of(context);
68 | return Scaffold(
69 | appBar: AppBar(
70 | elevation: 0.0,
71 | title: Text(
72 | "My Statistics",
73 | style: TextStyle(color: Theme.of(context).accentColor),
74 | ),
75 | actions: [
76 | Padding(
77 | padding: EdgeInsets.all(10.0),
78 | child: IconButton(
79 | color: Colors.redAccent,
80 | onPressed: () {
81 | showDialog(
82 | context: context,
83 | builder: (context) {
84 | return AlertDialog(
85 | title: new Text("Are You Sure !",
86 | style: TextStyle(fontWeight: FontWeight.bold)),
87 | content: new Text("This will delete all your stats !"),
88 | actions: [
89 | new FlatButton(
90 | child: new Text("continue"),
91 | onPressed: () {
92 | _clearStats();
93 | Navigator.of(context).pop();
94 | },
95 | ),
96 | new FlatButton(
97 | child: new Text("Close"),
98 | onPressed: () {
99 | Navigator.of(context).pop();
100 | },
101 | ),
102 | ],
103 | );
104 | });
105 | },
106 | icon: Icon(
107 | Icons.clear_all,
108 | size: 30.0,
109 | ),
110 | ),
111 | ),
112 | ],
113 | ),
114 | body: stats.length != 0
115 | ? listStats(theme)
116 | : Center(
117 | child: Padding(
118 | padding: const EdgeInsets.symmetric(horizontal: 20.0),
119 | child: Text(
120 | "You Have No Data To Display",
121 | textAlign: TextAlign.center,
122 | style: TextStyle(
123 | color: theme.accentColor,
124 | fontSize: 30.0,
125 | fontFamily: "Google"),
126 | ),
127 | ),
128 | ),
129 | );
130 | }
131 |
132 | Widget listStats(ThemeData theme) {
133 | return Container(
134 | child: ListView.builder(
135 | itemCount: stats.length == 0 ? 0 : stats.length,
136 | itemBuilder: (context, index) {
137 | return Padding(
138 | padding: const EdgeInsets.only(top: 12.0),
139 | child: Column(
140 | children: [
141 | ListTile(
142 | leading: _getLeading(stats[index].code),
143 | title: Text(
144 | stats[index].description,
145 | overflow: TextOverflow.ellipsis,
146 | style: TextStyle(color: theme.accentColor),
147 | ),
148 | subtitle: Text(
149 | stats[index].date,
150 | style: TextStyle(color: theme.accentColor.withOpacity(0.8)),
151 | ),
152 | ),
153 | Divider(),
154 | ],
155 | ),
156 | );
157 | },
158 | ),
159 | );
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/lib/creations/cheque.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/homepage.dart';
3 | import 'package:digital_wallet/models/stats.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:digital_wallet/cardViewer.dart';
6 | import 'package:digital_wallet/helper/category_items.dart';
7 | import 'package:digital_wallet/models/creditcard_model.dart';
8 | import 'package:flutter_credit_card/flutter_credit_card.dart' as cr;
9 |
10 | class Check extends StatefulWidget {
11 | static String name = "Check";
12 |
13 | @override
14 | _CheckState createState() => _CheckState();
15 | }
16 |
17 | class _CheckState extends State {
18 | FocusNode ccvFocused = new FocusNode();
19 | bool ccv = false;
20 | TextEditingController cardNumber = TextEditingController();
21 | TextEditingController cardHolderName = TextEditingController();
22 | TextEditingController _ccv = TextEditingController();
23 | TextEditingController expiredate = TextEditingController();
24 |
25 | String name, number, expir, cc;
26 |
27 | @override
28 | void initState() {
29 | super.initState();
30 |
31 | ccvFocused.addListener(() {
32 | setState(() {
33 | ccv = ccvFocused.hasFocus;
34 | });
35 | });
36 | }
37 |
38 | @override
39 | void dispose() {
40 | cardHolderName.dispose();
41 | super.dispose();
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | return Container(
47 | child: Column(
48 | crossAxisAlignment: CrossAxisAlignment.start,
49 | children: [
50 | cardModel(),
51 | SizedBox(
52 | height: 2.0,
53 | ),
54 | Padding(
55 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
56 | child: Container(
57 | padding: EdgeInsets.all(8.0),
58 | child: TextField(
59 | controller: expiredate,
60 | onChanged: (nb) {
61 | setState(() {
62 | expir = nb;
63 | });
64 | },
65 | decoration: InputDecoration(
66 | border: OutlineInputBorder(
67 | borderSide: BorderSide(
68 | color: Theme.of(context).accentColor,
69 | ),
70 | ),
71 | labelText: "Pay To John Doe",
72 | hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
73 | ),
74 | ),
75 | ),
76 | ),
77 |
78 | Padding(
79 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
80 | child: Container(
81 | padding: EdgeInsets.all(8.0),
82 | child: TextField(
83 | keyboardType: TextInputType.number,
84 | controller: cardHolderName,
85 | onChanged: (input) {
86 | setState(
87 | () {
88 | name = input;
89 | },
90 | );
91 | },
92 | decoration: InputDecoration(
93 | border: OutlineInputBorder(
94 | borderSide: BorderSide(
95 | color: Theme.of(context).accentColor,
96 | ),
97 | ),
98 | labelText: "Montant",
99 | hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
100 | ),
101 | ),
102 | ),
103 | ),
104 | //---------------------------------------
105 | Padding(
106 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
107 | child: MaterialButton(
108 | onPressed: () {
109 | CreditCard cCard = CreditCard(HomePage.user.usrename,
110 | cardHolderName: cardHolderName.text,
111 | cardNumber: cardNumber.text,
112 | cvvCode: _ccv.text,
113 | expiryDate: expiredate.text,
114 | colorIndex: 2);
115 | DBHlper().insertCC(cCard);
116 | DBHlper().insertSTAT(
117 | new Stats(HomePage.user.usrename, "New Cheque has been added",
118 | CategoryItems.returnDate(), 1),
119 | );
120 | setState(() {
121 | CategoryItems.cardsList.add(cCard);
122 | });
123 | Navigator.push(
124 | context,
125 | MaterialPageRoute(
126 | builder: (BuildContext context) => CardViewer(),
127 | ),
128 | );
129 | },
130 | color: Colors.blue,
131 | child: Center(
132 | child: Text(
133 | "Add Card",
134 | style: TextStyle(color: Colors.white),
135 | ),
136 | ),
137 | ),
138 | ),
139 | ],
140 | ),
141 | );
142 | }
143 |
144 | Widget cardModel() {
145 | return Container(
146 | child: cr.CreditCardWidget(
147 | cardbgColor: CategoryItems.colorsList[2],
148 | height: 200.0,
149 | cardHolderName: name == null ? "John Doe" : name + "£",
150 | cardNumber:
151 | cardNumber == null ? "1111 1111 1111 1111" : cardNumber.text,
152 | cvvCode: _ccv == null ? "111" : _ccv.text,
153 | expiryDate: expiredate == null ? "11/1999" : expiredate.text,
154 | showBackView: ccvFocused.hasFocus,
155 | ),
156 | );
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/lib/creations/giftCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/models/stats.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:digital_wallet/cardViewer.dart';
5 | import 'package:digital_wallet/helper/category_items.dart';
6 | import 'package:digital_wallet/models/creditcard_model.dart';
7 | import 'package:flutter_credit_card/flutter_credit_card.dart' as cr;
8 |
9 | import '../homepage.dart';
10 |
11 | class GiftCard extends StatefulWidget {
12 | @override
13 | _GiftCardState createState() => _GiftCardState();
14 | }
15 |
16 | class _GiftCardState extends State {
17 | FocusNode ccvFocused = new FocusNode();
18 | bool ccv = false;
19 | TextEditingController cardNumber = TextEditingController();
20 | TextEditingController cardHolderName = TextEditingController();
21 | TextEditingController _ccv = TextEditingController();
22 | TextEditingController expiredate = TextEditingController();
23 |
24 | String name, number, expir, cc;
25 |
26 | @override
27 | void initState() {
28 | super.initState();
29 | number = "1111 1111 1111 1111";
30 | cc = "111";
31 | ccvFocused.addListener(() {
32 | setState(() {
33 | ccv = ccvFocused.hasFocus;
34 | });
35 | });
36 | }
37 |
38 | @override
39 | void dispose() {
40 | cardHolderName.dispose();
41 | super.dispose();
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | return Container(
47 | child: Column(
48 | crossAxisAlignment: CrossAxisAlignment.start,
49 | children: [
50 | cardModel(),
51 | SizedBox(
52 | height: 2.0,
53 | ),
54 | Padding(
55 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
56 | child: Container(
57 | padding: EdgeInsets.all(8.0),
58 | child: TextField(
59 | controller: expiredate,
60 | onChanged: (nb) {
61 | setState(() {
62 | number = nb;
63 | });
64 | },
65 | decoration: InputDecoration(
66 | border: OutlineInputBorder(
67 | borderSide: BorderSide(
68 | color: Theme.of(context).accentColor,
69 | ),
70 | ),
71 | labelText: "Google , Steam , Itunes ...",
72 | hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
73 | ),
74 | ),
75 | ),
76 | ),
77 | //---------------------------------------
78 |
79 | Padding(
80 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
81 | child: Container(
82 | padding: EdgeInsets.all(8.0),
83 | child: TextField(
84 | controller: cardHolderName,
85 | onChanged: (input) {
86 | setState(
87 | () {
88 | name = input;
89 | },
90 | );
91 | },
92 | decoration: InputDecoration(
93 | border: OutlineInputBorder(
94 | borderSide: BorderSide(
95 | color: Theme.of(context).accentColor,
96 | ),
97 | ),
98 | labelText: "Holder Name",
99 | hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
100 | ),
101 | ),
102 | ),
103 | ),
104 | //---------------------------------------
105 | Padding(
106 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
107 | child: MaterialButton(
108 | onPressed: () {
109 | CreditCard cCard = CreditCard(HomePage.user.usrename,
110 | cardHolderName: cardHolderName.text,
111 | cardNumber: cardNumber.text,
112 | cvvCode: _ccv.text,
113 | expiryDate: expiredate.text,
114 | colorIndex: 3);
115 | DBHlper().insertCC(cCard);
116 | DBHlper().insertSTAT(
117 | new Stats(
118 | HomePage.user.usrename,
119 | "New Gift Card has been added",
120 | CategoryItems.returnDate(),
121 | 1),
122 | );
123 | setState(() {
124 | CategoryItems.cardsList.add(cCard);
125 | });
126 | Navigator.push(
127 | context,
128 | MaterialPageRoute(
129 | builder: (BuildContext context) => CardViewer(),
130 | ),
131 | );
132 | },
133 | color: Colors.blue,
134 | child: Center(
135 | child: Text(
136 | "Add Card",
137 | style: TextStyle(color: Colors.white),
138 | ),
139 | ),
140 | ),
141 | ),
142 | ],
143 | ),
144 | );
145 | }
146 |
147 | Widget cardModel() {
148 | return Container(
149 | child: cr.CreditCardWidget(
150 | cardbgColor: CategoryItems.colorsList[3],
151 | height: 200.0,
152 | cardHolderName: name == null ? "John Doe" : name,
153 | cardNumber:
154 | cardNumber == null ? "1111 1111 1111 1111" : cardNumber.text,
155 | cvvCode: _ccv == null ? "111" : _ccv.text,
156 | expiryDate: expiredate == null ? "11/1999" : expiredate.text,
157 | showBackView: ccvFocused.hasFocus,
158 | ),
159 | );
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/lib/creations/other.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/models/stats.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:digital_wallet/cardViewer.dart';
5 | import 'package:digital_wallet/helper/category_items.dart';
6 | import 'package:digital_wallet/models/creditcard_model.dart';
7 | import 'package:flutter_credit_card/flutter_credit_card.dart' as cr;
8 |
9 | import '../homepage.dart';
10 |
11 | class OtherCard extends StatefulWidget {
12 | static String name = "OtherCard";
13 |
14 | @override
15 | _OtherCardState createState() => _OtherCardState();
16 | }
17 |
18 | class _OtherCardState extends State {
19 | FocusNode ccvFocused = new FocusNode();
20 | bool ccv = false;
21 | TextEditingController cardNumber = TextEditingController();
22 | TextEditingController cardHolderName = TextEditingController();
23 | TextEditingController _ccv = TextEditingController();
24 | TextEditingController expiredate = TextEditingController();
25 |
26 | String name, number, expir, cc;
27 |
28 | @override
29 | void initState() {
30 | super.initState();
31 |
32 | ccvFocused.addListener(() {
33 | setState(() {
34 | ccv = ccvFocused.hasFocus;
35 | });
36 | });
37 | }
38 |
39 | @override
40 | void dispose() {
41 | cardHolderName.dispose();
42 | super.dispose();
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return Container(
48 | child: Column(
49 | crossAxisAlignment: CrossAxisAlignment.start,
50 | children: [
51 | cardModel(),
52 | SizedBox(
53 | height: 2.0,
54 | ),
55 | Padding(
56 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
57 | child: Container(
58 | padding: EdgeInsets.all(8.0),
59 | child: TextField(
60 | maxLines: 4,
61 | controller: expiredate,
62 | onChanged: (nb) {
63 | setState(() {
64 | expir = nb;
65 | });
66 | },
67 | decoration: InputDecoration(
68 | border: OutlineInputBorder(
69 | borderSide: BorderSide(
70 | color: Theme.of(context).accentColor,
71 | ),
72 | ),
73 | labelText: "Description ",
74 | hintStyle: TextStyle(
75 | color: Colors.blueGrey,
76 | fontSize: 16.0,
77 | ),
78 | ),
79 | ),
80 | ),
81 | ),
82 |
83 | Padding(
84 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
85 | child: Container(
86 | padding: EdgeInsets.all(8.0),
87 | child: TextField(
88 | keyboardType: TextInputType.number,
89 | controller: cardHolderName,
90 | onChanged: (input) {
91 | setState(
92 | () {
93 | name = input;
94 | },
95 | );
96 | },
97 | decoration: InputDecoration(
98 | border: OutlineInputBorder(
99 | borderSide: BorderSide(
100 | color: Theme.of(context).accentColor,
101 | ),
102 | ),
103 | labelText: "Name",
104 | hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
105 | ),
106 | ),
107 | ),
108 | ),
109 | //---------------------------------------
110 | Padding(
111 | padding: const EdgeInsets.symmetric(horizontal: 22.0),
112 | child: MaterialButton(
113 | onPressed: () {
114 | CreditCard cCard = CreditCard(HomePage.user.usrename,
115 | cardHolderName: cardHolderName.text,
116 | cardNumber: "1111 1111 1111 1111",
117 | cvvCode: "111",
118 | expiryDate: expiredate.text,
119 | colorIndex: 5);
120 | DBHlper().insertCC(cCard);
121 | DBHlper().insertSTAT(
122 | new Stats(HomePage.user.usrename, "New Others card has been added",
123 | CategoryItems.returnDate(), 1),
124 | );
125 | setState(() {
126 | CategoryItems.cardsList.add(cCard);
127 | });
128 | Navigator.push(
129 | context,
130 | MaterialPageRoute(
131 | builder: (BuildContext context) => CardViewer(),
132 | ),
133 | );
134 | },
135 | color: Colors.blue,
136 | child: Center(
137 | child: Text(
138 | "Add Card",
139 | style: TextStyle(color: Colors.white),
140 | ),
141 | ),
142 | ),
143 | ),
144 | ],
145 | ),
146 | );
147 | }
148 |
149 | Widget cardModel() {
150 | return Container(
151 | child: cr.CreditCardWidget(
152 | cardbgColor: CategoryItems.colorsList[5],
153 | height: 200.0,
154 | cardHolderName: name == null ? "John Doe" : name + "£",
155 | cardNumber:
156 | cardNumber == null ? "1111 1111 1111 1111" : cardNumber.text,
157 | cvvCode: _ccv == null ? "111" : _ccv.text,
158 | expiryDate: expiredate == null ? "11/1999" : expiredate.text,
159 | showBackView: ccvFocused.hasFocus,
160 | ),
161 | );
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/lib/screens/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:digital_wallet/helper/category_items.dart';
4 |
5 | class Dashboard extends StatefulWidget {
6 | Dashboard({Key key}) : super(key: key);
7 |
8 | @override
9 | _DashboardState createState() => _DashboardState();
10 | }
11 |
12 | class _DashboardState extends State {
13 | @override
14 | void initState() {
15 | super.initState();
16 | }
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | var screenHeight = MediaQuery.of(context).size;
21 |
22 | return Scaffold(
23 | body: SafeArea(
24 | child: SingleChildScrollView(
25 | child: Stack(
26 | children: [
27 | Container(
28 | height: screenHeight.height,
29 | ),
30 | buildThumbnail(screenHeight.height),
31 | floatingContainer(),
32 | thirdPart(screenHeight.width),
33 | ],
34 | ),
35 | ),
36 | ),
37 | );
38 | }
39 |
40 | Container buildThumbnail(double screenHeight) {
41 | return Container(
42 | height: screenHeight / 4,
43 | width: double.infinity,
44 | decoration: BoxDecoration(
45 | image: DecorationImage(
46 | image: AssetImage('assets/images/thumb.jpg'),
47 | fit: BoxFit.fill,
48 | ),
49 | ),
50 | );
51 | }
52 |
53 | Padding floatingContainer() {
54 | return Padding(
55 | padding: const EdgeInsets.only(top: 110.0, left: 25.0, right: 25.0),
56 | child: Container(
57 | height: 110.0,
58 | width: double.infinity,
59 | padding: EdgeInsets.only(left: 25.0, right: 25.0),
60 | decoration: BoxDecoration(
61 | color: Color.fromRGBO(36, 49, 64, 0.9),
62 | borderRadius: BorderRadius.circular(18.0),
63 | ),
64 | child: Center(
65 | child: Container(
66 | padding: EdgeInsets.symmetric(horizontal: 20.0),
67 | decoration: BoxDecoration(
68 | // color: Colors.white,
69 | borderRadius: BorderRadius.circular(10.0),
70 | ),
71 | child: Text(
72 | "Welcome To Stouche",
73 | textAlign: TextAlign.center,
74 | style: TextStyle(
75 | color: Colors.white,
76 | fontSize: 35.0,
77 | fontFamily: "Billabong",
78 | fontWeight: FontWeight.bold,
79 | ),
80 | ),
81 | // child: TextField(
82 | // decoration: InputDecoration(
83 | // border: InputBorder.none,
84 | // hintText: "Search here ..",
85 | // hintStyle: TextStyle(color: Colors.blueGrey, fontSize: 16.0),
86 | // icon: Icon(
87 | // Icons.search,
88 | // color: Colors.blueGrey,
89 | // ),
90 | // ),
91 | // ),
92 | ),
93 | ),
94 | ),
95 | );
96 | }
97 |
98 | Widget gridView(List whom) {
99 | return Container(
100 | child: GridView.builder(
101 | shrinkWrap: true,
102 | itemCount: whom.length,
103 | gridDelegate:
104 | SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
105 | physics: ScrollPhysics(),
106 | itemBuilder: (context, index) {
107 | return GestureDetector(
108 | onTap: () => Navigator.push(
109 | context,
110 | MaterialPageRoute(
111 | builder: (BuildContext context) => whom[index]['screen'],
112 | ),
113 | ),
114 | child: Card(
115 | elevation: 1.0,
116 | child: Column(
117 | crossAxisAlignment: CrossAxisAlignment.center,
118 | children: [
119 | Container(
120 | padding: EdgeInsets.all(8.0),
121 | width: 60.0,
122 | height: 54.0,
123 | decoration: BoxDecoration(
124 | image: DecorationImage(
125 | image: AssetImage(whom[index]['img']),
126 | fit: BoxFit.contain),
127 | ),
128 | ),
129 | SizedBox(
130 | height: 7.0,
131 | ),
132 | Expanded(
133 | child: Text(
134 | whom[index]['name'],
135 | overflow: TextOverflow.ellipsis,
136 | style: TextStyle(
137 | color: Theme.of(context).accentColor,
138 | fontSize: 14.0,
139 | fontFamily: "Google"),
140 | ),
141 | )
142 | ],
143 | ),
144 | ),
145 | );
146 | },
147 | ),
148 | );
149 | }
150 |
151 | Widget thirdPart(double width) {
152 | return Positioned(
153 | top: 220.0,
154 | child: Padding(
155 | padding: EdgeInsets.only(top: 25.0),
156 | child: Container(
157 | width: width,
158 | padding: EdgeInsets.symmetric(horizontal: 35.0),
159 | child: Column(
160 | crossAxisAlignment: CrossAxisAlignment.center,
161 | children: [
162 | //Here Welcome
163 | SizedBox(
164 | height: 20.0,
165 | ),
166 | Text(
167 | "Stouche allows you to store all your cards & id's safe in one place without having carrying them all with you every time",
168 | textAlign: TextAlign.center,
169 | style: TextStyle(
170 | color: Theme.of(context).accentColor,
171 | fontSize: 16.0,
172 | fontFamily: "Google",
173 | fontStyle: FontStyle.italic),
174 | ),
175 | SizedBox(
176 | height: 20.0,
177 | ),
178 | gridView(CategoryItems.category),
179 | ],
180 | ),
181 | ),
182 | ),
183 | );
184 | }
185 | }
186 |
--------------------------------------------------------------------------------
/lib/services/Login.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/helper/category_items.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:digital_wallet/services/signup.dart';
5 | import 'package:toast/toast.dart';
6 |
7 | import '../homepage.dart';
8 |
9 | class Login extends StatefulWidget {
10 | static final id = "Login_screen";
11 | @override
12 | _LoginState createState() => _LoginState();
13 | }
14 |
15 | class _LoginState extends State {
16 | final formKey = GlobalKey();
17 | String username, password;
18 | bool isLoading = false;
19 |
20 | _revealCC(String userName) async {
21 | setState(() {
22 | CategoryItems.cardsList.clear();
23 | });
24 | var o = await DBHlper().getCC(userName);
25 | if (o.length == 0) return;
26 | o.forEach((card) {
27 | setState(() {
28 | CategoryItems.cardsList.add(card);
29 | });
30 | });
31 | print(o[0].cardHolderName);
32 | }
33 |
34 | _revealPC(String userName) async {
35 | setState(() {
36 | CategoryItems.publicCardsList.clear();
37 | });
38 | var o = await DBHlper().getPC(userName);
39 | if (o.length == 0) return;
40 | o.forEach((card) {
41 | setState(() {
42 | CategoryItems.publicCardsList.add(card);
43 | });
44 | });
45 | }
46 |
47 | _submit() async {
48 | if (formKey.currentState.validate()) {
49 | formKey.currentState.save();
50 | try {
51 | setState(() {
52 | isLoading = true;
53 | });
54 | var users = await DBHlper().getUser(username, password);
55 | setState(() {
56 | isLoading = false;
57 | });
58 | if (users.length == 0) {
59 | Toast.show("Inccorect Credentials", context,
60 | duration: 3, gravity: Toast.BOTTOM);
61 | } else {
62 | HomePage.user = users[0];
63 | _revealCC(users[0].usrename);
64 | _revealPC(users[0].usrename);
65 | Navigator.push(
66 | context,
67 | MaterialPageRoute(
68 | builder: (BuildContext context) => HomePage(),
69 | ),
70 | );
71 | }
72 | } catch (ex) {
73 | print(ex.toString());
74 | }
75 | }
76 | }
77 |
78 | @override
79 | Widget build(BuildContext context) {
80 | return WillPopScope(
81 | onWillPop: () {
82 | return;
83 | },
84 | child: Scaffold(
85 | body: Center(
86 | child: Column(
87 | mainAxisAlignment: MainAxisAlignment.center,
88 | children: [
89 | Text(
90 | "Stouche",
91 | style: TextStyle(
92 | color: Theme.of(context).accentColor,
93 | fontSize: 50.0,
94 | fontFamily: "Billabong"),
95 | ),
96 | Form(
97 | key: formKey,
98 | child: Column(
99 | mainAxisSize: MainAxisSize.min,
100 | children: [
101 | Padding(
102 | padding: EdgeInsets.symmetric(
103 | horizontal: 35.0, vertical: 10.0),
104 | child: TextFormField(
105 | decoration: InputDecoration(
106 | labelText: "Username",
107 | labelStyle: TextStyle(
108 | color:
109 | Theme.of(context).accentColor.withOpacity(0.7),
110 | ),
111 | ),
112 | validator: (String inpute) =>
113 | inpute.isEmpty ? "fill the username !" : null,
114 | onSaved: (input) => username = input,
115 | ),
116 | ),
117 | Padding(
118 | padding: EdgeInsets.symmetric(
119 | horizontal: 35.0, vertical: 10.0),
120 | child: TextFormField(
121 | decoration: InputDecoration(
122 | labelText: "Password",
123 | labelStyle: TextStyle(
124 | color:
125 | Theme.of(context).accentColor.withOpacity(0.7),
126 | ),
127 | ),
128 | validator: (String inpute) =>
129 | inpute.isEmpty ? "fill the Password !" : null,
130 | onSaved: (input) => password = input,
131 | obscureText: true,
132 | ),
133 | ),
134 | SizedBox(
135 | height: 20.0,
136 | ),
137 | Container(
138 | width: 250.0,
139 | child: FlatButton(
140 | padding: EdgeInsets.all(10.0),
141 | onPressed: _submit,
142 | color: Colors.blue,
143 | child: Text(
144 | "Login",
145 | style: TextStyle(color: Colors.white, fontSize: 16.0),
146 | ),
147 | ),
148 | ),
149 | SizedBox(
150 | height: 10.0,
151 | ),
152 | Container(
153 | width: 250.0,
154 | child: FlatButton(
155 | padding: EdgeInsets.all(10.0),
156 | onPressed: () =>
157 | Navigator.pushNamed(context, SignUp.id),
158 | color: Theme.of(context).accentColor,
159 | child: Text(
160 | "Signup",
161 | style: TextStyle(
162 | color: Theme.of(context).primaryColor,
163 | fontSize: 16.0),
164 | ),
165 | ),
166 | )
167 | ],
168 | ),
169 | )
170 | ],
171 | ),
172 | ),
173 | ),
174 | );
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/lib/services/signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:digital_wallet/helper/DBHelper.dart';
2 | import 'package:digital_wallet/models/User.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:toast/toast.dart';
5 |
6 | class SignUp extends StatefulWidget {
7 | static final id = "Signup_screen";
8 |
9 | @override
10 | _SignUpState createState() => _SignUpState();
11 | }
12 |
13 | class _SignUpState extends State {
14 | final formKey = GlobalKey();
15 | String username, password, email;
16 | bool isLoading = false;
17 |
18 | _submit() async {
19 | if (formKey.currentState.validate()) {
20 | formKey.currentState.save();
21 | try {
22 | setState(() {
23 | isLoading = true;
24 | });
25 | User user = await DBHlper().insert(new User(username, password, 1));
26 | print(user.usrename);
27 | setState(() {
28 | isLoading = false;
29 | });
30 | Toast.show("Inscription Completed", context,
31 | duration: 2, gravity: Toast.BOTTOM);
32 | Navigator.pop(context);
33 | } catch (ex) {
34 | setState(() {
35 | isLoading = false;
36 | });
37 | Toast.show("Username already in use", context, duration: 3, gravity: Toast.BOTTOM);
38 | }
39 | }
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return Scaffold(
45 | body: Center(
46 | child: SingleChildScrollView(
47 | child: Column(
48 | mainAxisAlignment: MainAxisAlignment.center,
49 | children: [
50 | Text(
51 | "Stouche",
52 | style: TextStyle(
53 | color: Theme.of(context).accentColor,
54 | fontSize: 50.0,
55 | fontFamily: "Billabong"),
56 | ),
57 | Form(
58 | key: formKey,
59 | child: Column(
60 | mainAxisSize: MainAxisSize.min,
61 | children: [
62 | Padding(
63 | padding: EdgeInsets.symmetric(
64 | horizontal: 35.0, vertical: 10.0),
65 | child: TextFormField(
66 | decoration: InputDecoration(
67 | labelText: "Username",
68 | labelStyle: TextStyle(
69 | color:
70 | Theme.of(context).accentColor.withOpacity(0.7),
71 | ),
72 | ),
73 | validator: (String inpute) =>
74 | inpute.isEmpty ? "fill the username !" : null,
75 | onSaved: (input) => username = input,
76 | ),
77 | ),
78 | Padding(
79 | padding: EdgeInsets.symmetric(
80 | horizontal: 35.0, vertical: 10.0),
81 | child: TextFormField(
82 | decoration: InputDecoration(
83 | labelText: "Password",
84 | labelStyle: TextStyle(
85 | color:
86 | Theme.of(context).accentColor.withOpacity(0.7),
87 | ),
88 | ),
89 | validator: (String inpute) =>
90 | inpute.isEmpty ? "fill the Password !" : null,
91 | onSaved: (input) => password = input,
92 | obscureText: true,
93 | ),
94 | ),
95 | Padding(
96 | padding: EdgeInsets.symmetric(
97 | horizontal: 35.0, vertical: 10.0),
98 | child: TextFormField(
99 | decoration: InputDecoration(
100 | labelText: "email",
101 | labelStyle: TextStyle(
102 | color:
103 | Theme.of(context).accentColor.withOpacity(0.7),
104 | ),
105 | ),
106 | validator: (String inpute) =>
107 | inpute.isEmpty ? "fill the email !" : null,
108 | onSaved: (input) => email = input,
109 | obscureText: true,
110 | ),
111 | ),
112 | SizedBox(
113 | height: 20.0,
114 | ),
115 | Container(
116 | width: 250.0,
117 | child: FlatButton(
118 | padding: EdgeInsets.all(10.0),
119 | onPressed: () {
120 | isLoading ? print("Nothing") : _submit();
121 | },
122 | color: Colors.blue,
123 | child: isLoading
124 | ? CircularProgressIndicator()
125 | : Text(
126 | "SignUp",
127 | style: TextStyle(
128 | color: Colors.white, fontSize: 16.0),
129 | ),
130 | ),
131 | ),
132 | SizedBox(
133 | height: 10.0,
134 | ),
135 | isLoading
136 | ? SizedBox.shrink()
137 | : Container(
138 | width: 250.0,
139 | child: FlatButton(
140 | padding: EdgeInsets.all(10.0),
141 | onPressed: () => Navigator.pop(context),
142 | color: Theme.of(context).accentColor,
143 | child: Text(
144 | "Go back To Login",
145 | style: TextStyle(
146 | color: Theme.of(context).primaryColor,
147 | fontSize: 16.0),
148 | ),
149 | ),
150 | )
151 | ],
152 | ),
153 | )
154 | ],
155 | ),
156 | ),
157 | ),
158 | );
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/lib/helper/category_items.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:digital_wallet/cardViewer.dart';
4 | import 'package:digital_wallet/models/creditcard_model.dart';
5 | import 'package:digital_wallet/screens/publicCardsViewer.dart';
6 | import 'package:digital_wallet/ui/card_create.dart';
7 | import 'package:digital_wallet/ui/createcard.dart';
8 | import 'package:digital_wallet/ui/publicCards.dart';
9 | import 'package:intl/intl.dart';
10 |
11 | class CategoryItems {
12 | static List