├── 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.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── assets ├── pay.png ├── card.png ├── coin.png ├── batman.png ├── crypto.png ├── payment.png ├── wallet.png └── flares │ └── feelings.flr ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── divyam │ │ │ │ │ └── nft_marketplace │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── .metadata ├── lib ├── utils │ ├── empty_screen.dart │ ├── hexcolor.dart │ └── colors.dart ├── main.dart ├── model │ ├── data.dart │ └── nft_model.dart ├── widgets │ ├── contra_text.dart │ ├── button_plain.dart │ ├── clip_shadow_path.dart │ ├── button_around.dart │ ├── video_player.dart │ ├── uihelper.dart │ ├── heading.dart │ ├── footer.dart │ ├── balance_card.dart │ ├── top_right_clipper.dart │ ├── bottom_left_clipper.dart │ ├── top_right_cipper_bottom.dart │ ├── bottom_left_clipper_bottom.dart │ ├── header_home_page.dart │ ├── home_cardpage.dart │ └── bottom_sheet_buy.dart ├── routes.dart ├── animations │ ├── image_animation.dart │ ├── letter_spacing.dart │ └── siwpe_button.dart └── screens │ ├── homepage.dart │ ├── start_page.dart │ ├── trending_nft.dart │ ├── collection_page.dart │ ├── nft_art.dart │ ├── profile_page.dart │ ├── detail_page.dart │ └── balance.dart ├── .gitignore ├── LICENSE ├── test └── widget_test.dart ├── analysis_options.yaml ├── README.md ├── pubspec.yaml └── pubspec.lock /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" 2 | -------------------------------------------------------------------------------- /assets/pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/pay.png -------------------------------------------------------------------------------- /assets/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/card.png -------------------------------------------------------------------------------- /assets/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/coin.png -------------------------------------------------------------------------------- /assets/batman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/batman.png -------------------------------------------------------------------------------- /assets/crypto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/crypto.png -------------------------------------------------------------------------------- /assets/payment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/payment.png -------------------------------------------------------------------------------- /assets/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/wallet.png -------------------------------------------------------------------------------- /assets/flares/feelings.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/assets/flares/feelings.flr -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvmjoshi/nft_marketplace/HEAD/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/dvmjoshi/nft_marketplace/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/divyam/nft_marketplace/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.divyam.nft_marketplace 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: 4c6e70fd95c208c733ec65fa6351acd3012191a4 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/utils/empty_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class EmptyState extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Material( 8 | child: Container( 9 | child: Center( 10 | child: Text("Coming soon!"), 11 | ), 12 | ), 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/utils/hexcolor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | class HexColor extends Color { 4 | static int _getColorFromHex(String hexColor) { 5 | hexColor = hexColor.toUpperCase().replaceAll("#", ""); 6 | if (hexColor.length == 6) { 7 | hexColor = "FF" + hexColor; 8 | } 9 | return int.parse(hexColor, radix: 16); 10 | } 11 | 12 | HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); 13 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nft_marketplace/routes.dart'; 3 | 4 | 5 | void main() { 6 | runApp(const MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({Key? key}) : super(key: key); 11 | @override 12 | Widget build(BuildContext context) { 13 | return const MaterialApp( 14 | debugShowCheckedModeBanner: false, 15 | initialRoute: RouteGenerator.startPage, 16 | onGenerateRoute:RouteGenerator.generateRoute , 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /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/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /lib/model/data.dart: -------------------------------------------------------------------------------- 1 | List images = [ 2 | "https://cdn.dribbble.com/users/16717/screenshots/5275208/collage96shot.jpg?compress=1&resize=800x600", 3 | "https://cdn.dribbble.com/users/16717/screenshots/5529708/collage103shot2_4x.jpg?compress=1&resize=1600x1200", 4 | "https://cdn.dribbble.com/users/16717/screenshots/15404075/media/c63254f4247765e521d1947285443351.jpg?compress=1&resize=1600x1200", 5 | "https://cdn.dribbble.com/users/16717/screenshots/14148173/media/143aef0787b67b26d46c3ab040efd1af.jpg?compress=1&resize=1600x1200", 6 | "https://cdn.dribbble.com/users/1207383/screenshots/15854306/media/fcfe2fef02fd46669b462b2fe1c29bd8.jpg?compress=1&resize=1600x1200", 7 | "https://cdn.dribbble.com/users/16717/screenshots/6993277/media/1412246b225db1f76bd82e6d47277ccc.jpg?compress=1&resize=800x600" 8 | ]; 9 | 10 | List title = [ 11 | "Hounted Ground", 12 | "Fallen In Love", 13 | "The Dreaming Moon", 14 | "Jack the Persian and the Black Castel", 15 | ]; 16 | -------------------------------------------------------------------------------- /lib/widgets/contra_text.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:nft_marketplace/utils/colors.dart'; 4 | 5 | class ContraText extends StatelessWidget { 6 | final Alignment ? alignment; 7 | final String ?text; 8 | final double? size; 9 | final Color ? color; 10 | final FontWeight? weight; 11 | final TextAlign ?textAlign; 12 | 13 | const ContraText( 14 | {this.alignment, 15 | this.text, 16 | this.size, 17 | this.color, 18 | this.weight, 19 | this.textAlign}); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Align( 24 | alignment: alignment!, 25 | child: Text( 26 | text!, 27 | textAlign: textAlign != null ? textAlign : TextAlign.start, 28 | style: TextStyle( 29 | fontSize: size == null ? 36 : size, 30 | fontWeight: weight != null ? weight : FontWeight.w800, 31 | color: color != null ? color : black), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/utils/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const persian_blue = Color(0xFF1947E6); 4 | const white = Color(0xFFFFFFFF); 5 | const athens_gray = Color(0xFFF4F5F7); 6 | const lightening_yellow = Color(0xFFFFBD12); 7 | const flamingo = Color(0xFFF95A2C); 8 | const black = Color(0xFF000000); 9 | const wood_smoke = Color(0xFF18191F); 10 | const trout = Color(0xFF474A57); 11 | const santas_gray = Color(0xFF969BAB); 12 | const selago = Color(0xFFE9E7FC); 13 | const carribean_green = Color(0xFF00C6AE); 14 | const santas_gray_10 = Color(0xFF9FA4B4); 15 | const dandelion = Color(0xFFFFD465); 16 | const caribbean_color = Color(0xFF00C6AE); 17 | const pastel_pink = Color(0xFFFFC7DE); 18 | const pink_salomn = Color(0xFFFF89BB); 19 | const athen_gray = Color(0xFFF4F5F7); 20 | const bareley_white = Color(0xFFFFF4CC); 21 | const fair_pink = Color(0xFFFFE8E8); 22 | const foam = Color(0xFFD6FCF7); 23 | const lavandar_bush = Color(0xFFFFF3F8); 24 | const mona_lisa = Color(0xFFFF9692); 25 | const athens = Color(0xFFEEEFF4); 26 | const turquoise_blue = Color(0xFF61E4C5); 27 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Divyam joshi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nft_marketplace/screens/collection_page.dart'; 3 | import 'package:nft_marketplace/screens/detail_page.dart'; 4 | import 'package:nft_marketplace/screens/homepage.dart'; 5 | import 'package:nft_marketplace/screens/start_page.dart'; 6 | 7 | class RouteGenerator { 8 | static const String homePage="/home"; 9 | static const String startPage="/"; 10 | static const String detailPage="/detailPage"; 11 | static const String collectionPage="/collection"; 12 | RouteGenerator._(){} 13 | static Route generateRoute(RouteSettings settings){ 14 | switch(settings.name){ 15 | case startPage: 16 | return MaterialPageRoute(builder: (_)=>const StartPage()); 17 | case homePage: 18 | return MaterialPageRoute(builder: (_)=>const HomePage()); 19 | case detailPage: 20 | return MaterialPageRoute(builder: (_)=>DetailPage()); 21 | case collectionPage: 22 | return MaterialPageRoute(builder: (_)=>CollectionPage()); 23 | default: 24 | throw const FormatException("Route not found"); 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /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:nft_marketplace/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | // await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/widgets/button_plain.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ButtonPlain extends StatelessWidget { 5 | final Color? color; 6 | final Color? borderColor; 7 | final Color ?textColor; 8 | final double? size; 9 | final String? text; 10 | final VoidCallback? onTap; 11 | final double? height; 12 | final double? textSize; 13 | 14 | const ButtonPlain( 15 | {this.color, 16 | this.textColor, 17 | this.borderColor, 18 | this.size, 19 | this.text, 20 | this.height, 21 | this.textSize, 22 | this.onTap}); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return ButtonTheme( 27 | height: height ?? 48, 28 | minWidth: size ?? MediaQuery.of(context).size.width, 29 | child: RaisedButton( 30 | padding: EdgeInsets.all(16), 31 | color: color, 32 | onPressed: onTap, 33 | textColor: textColor, 34 | child: Text( 35 | text!, 36 | maxLines: 1, 37 | style: TextStyle( 38 | fontSize: textSize != null ? textSize : 12, 39 | fontWeight: FontWeight.w800), 40 | ), 41 | shape: RoundedRectangleBorder( 42 | borderRadius: new BorderRadius.circular(16.0)), 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/widgets/clip_shadow_path.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | @immutable 4 | class ClipShadowPath extends StatelessWidget { 5 | final BoxShadow shadow; 6 | final CustomClipper clipper; 7 | final Widget child; 8 | 9 | ClipShadowPath({ 10 | required this.shadow, 11 | required this.clipper, 12 | required this.child, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return CustomPaint( 18 | painter: _ClipShadowShadowPainter( 19 | clipper: this.clipper, 20 | shadow: this.shadow, 21 | ), 22 | child: ClipPath(child: child, clipper: this.clipper), 23 | ); 24 | } 25 | } 26 | 27 | class _ClipShadowShadowPainter extends CustomPainter { 28 | final BoxShadow shadow; 29 | final CustomClipper clipper; 30 | 31 | _ClipShadowShadowPainter({required this.shadow, required this.clipper}); 32 | 33 | @override 34 | void paint(Canvas canvas, Size size) { 35 | var paint = shadow.toPaint() 36 | ..maskFilter = MaskFilter.blur( 37 | BlurStyle.normal, 38 | shadow.spreadRadius, 39 | ); 40 | var clipPath = clipper.getClip(size).shift(shadow.offset); 41 | canvas.drawPath(clipPath, paint); 42 | } 43 | 44 | @override 45 | bool shouldRepaint(CustomPainter oldDelegate) { 46 | return true; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/widgets/button_around.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/svg.dart'; 4 | 5 | class ButtonRoundWithShadow extends StatelessWidget { 6 | final Color ? borderColor; 7 | final Color ?shadowColor; 8 | final Color ?color; 9 | final String? iconPath; 10 | final VoidCallback? callback; 11 | final double ?size; 12 | 13 | const ButtonRoundWithShadow( 14 | {this.borderColor, 15 | this.shadowColor, 16 | this.color, 17 | this.iconPath, 18 | this.size, 19 | this.callback}); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return GestureDetector( 24 | onTap: callback, 25 | child: Container( 26 | height: size == null ? null : size, 27 | width: size == null ? null : size, 28 | padding: EdgeInsets.all(size != null ? 8 : 16), 29 | decoration: ShapeDecoration( 30 | shadows: [ 31 | BoxShadow( 32 | color: shadowColor!, 33 | offset: Offset( 34 | 0.0, // Move to right 10 horizontally 35 | 4.0, // Move to bottom 5 Vertically 36 | ), 37 | ) 38 | ], 39 | color: color, 40 | shape: 41 | CircleBorder(side: BorderSide(color: borderColor!, width: 2))), 42 | child: Icon(Icons.close_sharp,size: 30,), 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /lib/widgets/video_player.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:video_player/video_player.dart'; 3 | 4 | class NftVideoPlayer extends StatefulWidget { 5 | final String ? url; 6 | 7 | NftVideoPlayer({this.url}); 8 | 9 | @override 10 | _NftVideoPlayerState createState() => _NftVideoPlayerState(); 11 | } 12 | 13 | class _NftVideoPlayerState extends State { 14 | late VideoPlayerController ? controller; 15 | 16 | @override 17 | void initState() { 18 | super.initState(); 19 | controller = VideoPlayerController.network(widget.url!) 20 | ..initialize().then((_) { 21 | setState(() { 22 | controller!.play(); 23 | controller!.setVolume(1); 24 | controller!.setLooping(true); 25 | }); 26 | }); 27 | } 28 | 29 | @override 30 | void dispose() { 31 | super.dispose(); 32 | controller!.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Container( 38 | color: Colors.black, 39 | height: double.infinity, 40 | child: controller!.value.isInitialized 41 | ? GestureDetector( 42 | onTap: () { 43 | if (controller!.value.isPlaying) { 44 | controller!.pause(); 45 | } else { 46 | controller!.play(); 47 | } 48 | }, 49 | child: AspectRatio( 50 | aspectRatio: controller!.value.aspectRatio, 51 | child:VideoPlayer( 52 | controller!, 53 | 54 | ), 55 | 56 | ), 57 | ) 58 | : Container(), 59 | ); 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /lib/animations/image_animation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/animation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:transparent_image/transparent_image.dart'; 4 | import 'package:cached_network_image/cached_network_image.dart'; 5 | const kHomeImage = 6 | ''; 7 | class ImageAnimation extends StatefulWidget { 8 | const ImageAnimation({Key? key}) : super(key: key); 9 | 10 | @override 11 | _ImageAnimationState createState() => _ImageAnimationState(); 12 | } 13 | 14 | class _ImageAnimationState extends State with SingleTickerProviderStateMixin{ 15 | late final AnimationController _controller=AnimationController(vsync: this, 16 | duration:const Duration(seconds: 2))..forward(); 17 | late Animation _animation= Tween( 18 | begin: Offset(0,2), 19 | end: Offset.zero, 20 | ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeInOut)); 21 | @override 22 | void dispose() { 23 | // TODO: implement dispose 24 | super.dispose(); 25 | _controller.dispose(); 26 | } 27 | @override 28 | Widget build(BuildContext context) { 29 | final width= MediaQuery.of(context).size.width; 30 | final height = MediaQuery.of(context).size.height; 31 | return SlideTransition(position: _animation, 32 | child: SizedBox( 33 | width: width, 34 | height: height * 0.99, 35 | child: CachedNetworkImage( 36 | imageUrl:"https://user-images.githubusercontent.com/24698014/126030917-f040cad5-f6de-40d9-9eaf-6f4b79b6a16d.png", 37 | fit: BoxFit.contain, 38 | // placeholder:(context, url) =>kTransparentImage, 39 | ), 40 | ),); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /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 | nft_marketplace 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 | -------------------------------------------------------------------------------- /lib/widgets/uihelper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class UIHelper { 4 | static const double _VerticalSpaceExtraSmall = 4.0; 5 | static const double _VerticalSpaceSmall = 8.0; 6 | static const double _VerticalSpaceMedium = 16.0; 7 | static const double _VerticalSpaceLarge = 24.0; 8 | static const double _VerticalSpaceExtraLarge = 48; 9 | 10 | static const double _HorizontalSpaceExtraSmall = 4; 11 | static const double _HorizontalSpaceSmall = 8.0; 12 | static const double _HorizontalSpaceMedium = 16.0; 13 | static const double _HorizontalSpaceLarge = 24.0; 14 | static const double _HorizontalSpaceExtraLarge = 48.0; 15 | 16 | static SizedBox verticalSpaceExtraSmall() => 17 | verticalSpace(_VerticalSpaceExtraSmall); 18 | static SizedBox verticalSpaceSmall() => verticalSpace(_VerticalSpaceSmall); 19 | static SizedBox verticalSpaceMedium() => verticalSpace(_VerticalSpaceMedium); 20 | static SizedBox verticalSpaceLarge() => verticalSpace(_VerticalSpaceLarge); 21 | static SizedBox verticalSpaceExtraLarge() => 22 | verticalSpace(_VerticalSpaceExtraLarge); 23 | 24 | static SizedBox verticalSpace(double height) => SizedBox(height: height); 25 | 26 | static SizedBox horizontalSpaceExtraSmall() => 27 | horizontalSpace(_HorizontalSpaceExtraSmall); 28 | static SizedBox horizontalSpaceSmall() => 29 | horizontalSpace(_HorizontalSpaceSmall); 30 | static SizedBox horizontalSpaceMedium() => 31 | horizontalSpace(_HorizontalSpaceMedium); 32 | static SizedBox horizontalSpaceLarge() => 33 | horizontalSpace(_HorizontalSpaceLarge); 34 | static SizedBox horizontalSpaceExtraLarge() => 35 | horizontalSpace(_HorizontalSpaceExtraLarge); 36 | 37 | static SizedBox horizontalSpace(double width) => SizedBox(width: width); 38 | } 39 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.divyam.nft_marketplace" 47 | minSdkVersion 16 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /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/widgets/heading.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class Heading extends StatefulWidget { 6 | final String ? text; 7 | 8 | const Heading({Key? key, this.text}) : super(key: key); 9 | @override 10 | _HeadingState createState() => _HeadingState(); 11 | } 12 | 13 | class _HeadingState extends State with TickerProviderStateMixin { 14 | late AnimationController _colorController; 15 | Animatable background = TweenSequence([ 16 | TweenSequenceItem( 17 | weight: 1.0, 18 | tween: ColorTween( 19 | begin: Colors.red, 20 | end: Colors.green, 21 | ), 22 | ), 23 | TweenSequenceItem( 24 | weight: 1.0, 25 | tween: ColorTween( 26 | begin: Colors.green, 27 | end: Colors.blue, 28 | ), 29 | ), 30 | TweenSequenceItem( 31 | weight: 1.0, 32 | tween: ColorTween( 33 | begin: Colors.blue, 34 | end: Colors.pink, 35 | ), 36 | ), 37 | TweenSequenceItem( 38 | weight: 1.0, 39 | tween: ColorTween( 40 | begin: Colors.pink, 41 | end: Colors.red, 42 | ), 43 | ),]); 44 | @override 45 | void initState() { 46 | // TODO: implement initState 47 | super.initState(); 48 | setState(() { 49 | _colorController = AnimationController(vsync: this,duration: const Duration(seconds: 5),) 50 | ..addListener(() { 51 | setState(() { 52 | 53 | }); 54 | })..addStatusListener((status) { 55 | if(status == AnimationStatus.completed){ 56 | _colorController.forward(from: 0.0); 57 | } 58 | })..forward(); 59 | }); 60 | } 61 | @override 62 | void dispose() { 63 | // TODO: implement dispose 64 | super.dispose(); 65 | _colorController.dispose(); 66 | } 67 | @override 68 | Widget build(BuildContext context) { 69 | 70 | return Padding( 71 | padding: const EdgeInsets.all(10.0), 72 | child: Row( 73 | children: [ 74 | Container( 75 | width: 3.5, 76 | height: 22, 77 | color: background.evaluate(AlwaysStoppedAnimation(_colorController.value)), 78 | ), 79 | SizedBox(width: 4,), 80 | Text( 81 | widget.text!, 82 | style: const TextStyle( 83 | color: Colors.white, 84 | fontSize: 20, 85 | letterSpacing: 2, 86 | fontWeight: FontWeight.w500 87 | ), 88 | ) 89 | ], 90 | ), 91 | ); 92 | } 93 | } -------------------------------------------------------------------------------- /lib/widgets/footer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nft_marketplace/widgets/uihelper.dart'; 3 | class Footer extends StatelessWidget { 4 | const Footer({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container( 9 | margin: const EdgeInsets.only(top: 20.0), 10 | padding: const EdgeInsets.only(left:15.0,right:15,top:10,bottom:0), 11 | height: 400.0, 12 | decoration: BoxDecoration( 13 | color: Colors.grey[200], 14 | image: const DecorationImage( 15 | image: NetworkImage("https://cdn.dribbble.com/users/1021976/screenshots/4551725/dribbble.gif"), 16 | fit: BoxFit.cover, 17 | ) 18 | ), 19 | child: Stack( 20 | children: [ 21 | // Transform.rotate( 22 | // angle:-0.1, 23 | // child: Align( 24 | // alignment: Alignment.bottomRight, 25 | // child:Padding( 26 | // padding: const EdgeInsets.only(left:199.0), 27 | // child: Lottie.network("https://firebasestorage.googleapis.com/v0/b/grasp-14bf5.appspot.com/o/uttarakhand%2F3010-bb8%20(1).json?alt=media&token=7e7f28e0-5ba0-4cc1-b478-387f87a9763e",height: 390,width: 350,), 28 | // ), 29 | // ), 30 | // ), 31 | Column( 32 | crossAxisAlignment: CrossAxisAlignment.stretch, 33 | mainAxisAlignment: MainAxisAlignment.center, 34 | children: [ 35 | Text( 36 | 'Learn\nElevate\nDiscover', 37 | style: Theme.of(context) 38 | .textTheme 39 | .headline4! 40 | .copyWith( 41 | color: Colors.grey[400], 42 | fontSize: 60.0, 43 | letterSpacing: 0.2, 44 | height: 0.9, 45 | ), 46 | ), 47 | UIHelper.verticalSpaceLarge(), 48 | Text( 49 | 'Made with ❤', 50 | style: Theme.of(context) 51 | .textTheme 52 | .bodyText1! 53 | .copyWith(color: Colors.grey), 54 | ), 55 | Text( 56 | 'By Divyam Joshi', 57 | style: Theme.of(context) 58 | .textTheme 59 | .bodyText1! 60 | .copyWith(color: Colors.grey), 61 | ), 62 | UIHelper.verticalSpaceExtraLarge(), 63 | 64 | ], 65 | ), 66 | 67 | ], 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/model/nft_model.dart: -------------------------------------------------------------------------------- 1 | class NftModel{ 2 | final String userName; 3 | final String nftName; 4 | final String sellType; 5 | final String nftImage; 6 | final String buttonType; 7 | final double price; 8 | final String ? nftVideo; 9 | bool video; 10 | 11 | NftModel({required this.userName, required this.nftName, required this.sellType, required this.buttonType, 12 | required this.price,required this.nftImage,required this.video, this.nftVideo}); 13 | } 14 | List nftList=[ 15 | NftModel( 16 | userName: "Itachi", 17 | price: 1.10, 18 | nftImage: "https://cdn.dribbble.com/users/288987/screenshots/2416384/exodus.png?compress=1&resize=800x600", 19 | buttonType: "Buy now", 20 | sellType: "Fixed price", 21 | nftName: "The Way", 22 | video: true, 23 | nftVideo: "https://cdn.dribbble.com/users/288987/screenshots/14035262/media/0300d15fcd6fd16e6206b420c0f09602.mp4" 24 | ), 25 | NftModel( 26 | userName: "Elon", 27 | price: 1.2, 28 | nftImage: "https://cdn.dribbble.com/users/43342/screenshots/10506987/media/b075f17fd2b7b66993c7fc55f2a9c1e8.jpg?compress=1&resize=1600x1200", 29 | buttonType: "Buy now", 30 | sellType: "Fixed price", 31 | nftName: "space x", 32 | video: false, 33 | ), 34 | NftModel( 35 | userName: "Divyam", 36 | price: 1.1, 37 | nftImage: "https://cdn.dribbble.com/users/43342/screenshots/14595369/media/478448af7ceac18b147b5f488cf9b475.jpg?compress=1&resize=1600x1200", 38 | buttonType: "Buy now", 39 | sellType: "Fixed price", 40 | nftName: "The Way", 41 | video: true, 42 | nftVideo: "https://cdn.dribbble.com/users/288987/screenshots/13797725/media/eb2abbe0e70f592e3760e59db603e418.mp4" 43 | ), 44 | NftModel( 45 | userName: "Pawan", 46 | price: 0.800, 47 | nftImage: "https://cdn.dribbble.com/users/2035533/screenshots/6099659/14_4x.jpg?compress=1&resize=1600x1200", 48 | buttonType: "Buy now", 49 | sellType: "Fixed price", 50 | nftName: "hand with power", 51 | video: false, 52 | ), 53 | NftModel( 54 | userName: "Pusp", 55 | price: 0.840, 56 | nftImage: "https://cdn.dribbble.com/users/43342/screenshots/14587724/media/06ea6d90477e373369306d3f679d7f38.jpg?compress=1&resize=1600x1200", 57 | buttonType: "Buy now", 58 | sellType: "Fixed price", 59 | nftName: "Flying above **", 60 | video: false, 61 | ), 62 | NftModel( 63 | userName: "Anchal", 64 | price: 0.800, 65 | nftImage: "https://cdn.dribbble.com/users/43342/screenshots/14105022/media/6597df5622f1c4552180d213c3b9b183.jpg?compress=1&resize=1600x1200", 66 | buttonType: "Buy now", 67 | sellType: "Fixed price", 68 | nftName: "don't give a **", 69 | video: false, 70 | nftVideo:"https://cdn.dribbble.com/users/1378520/screenshots/15945546/media/40a6baeea767d2696eeae934801b2de3.mp4" 71 | ), 72 | ]; -------------------------------------------------------------------------------- /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/widgets/balance_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class BalanceCard extends StatelessWidget { 3 | const BalanceCard({Key? key, required this.onItemPressed}) : super(key: key); 4 | 5 | final VoidCallback onItemPressed; 6 | @override 7 | Widget build(BuildContext context) { 8 | final textStyle = Theme.of(context).textTheme.bodyText1!.copyWith( 9 | color: Colors.white70, 10 | ); 11 | 12 | return InkWell( 13 | onTap: onItemPressed, 14 | child: Container( 15 | width: MediaQuery.of(context).size.width * .70, 16 | height: 155, 17 | padding: EdgeInsets.all(12), 18 | // margin: EdgeInsets.symmetric(horizontal: 32), 19 | decoration: BoxDecoration( 20 | color: Colors.deepPurple.shade900, 21 | borderRadius:const BorderRadius.only(topRight: Radius.circular(32),bottomRight: Radius.circular(32)), 22 | boxShadow: [ 23 | BoxShadow( 24 | color: Colors.black12, 25 | blurRadius: 16, 26 | ) 27 | ] 28 | ), 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | Row( 33 | children: [ 34 | Column( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | Text('Your'.toUpperCase(), style: textStyle), 38 | SizedBox(height: 6), 39 | Text('Balance'.toUpperCase(), style: textStyle), 40 | ], 41 | ), 42 | Container( 43 | height: 50, 44 | child: Image.asset("assets/payment.png"), 45 | ) 46 | ], 47 | ), 48 | Padding( 49 | padding: const EdgeInsets.symmetric(vertical:2), 50 | child: RichText( 51 | //$ 52 | text: TextSpan( 53 | text: '\$', 54 | style: TextStyle( 55 | fontSize: 47, 56 | color: Colors.grey.withOpacity(0.5), 57 | fontWeight: FontWeight.w300, 58 | ), 59 | children: [ 60 | //20 61 | // TextSpan( 62 | // text: money, 63 | // style: TextStyle( 64 | // fontSize: 60, 65 | // color: Colors.white, 66 | // fontWeight: FontWeight.w400, 67 | // ), 68 | // ), 69 | //.0 70 | TextSpan( 71 | text: '7000.0', 72 | style: TextStyle( 73 | fontSize: 47, 74 | color: Colors.grey.withOpacity(0.5), 75 | fontWeight: FontWeight.w300, 76 | ) 77 | ), 78 | ], 79 | ) 80 | ), 81 | ), 82 | Spacer(), 83 | 84 | Text('•••• •••• •••• 5040', 85 | style: textStyle.copyWith( 86 | wordSpacing: 10, 87 | letterSpacing: 6, 88 | ), 89 | ) 90 | ], 91 | ), 92 | ), 93 | ); 94 | } 95 | } -------------------------------------------------------------------------------- /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/screens/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:nft_marketplace/model/nft_model.dart'; 5 | import 'package:nft_marketplace/screens/balance.dart'; 6 | import 'package:nft_marketplace/screens/trending_nft.dart'; 7 | import 'package:nft_marketplace/utils/hexcolor.dart'; 8 | import 'package:nft_marketplace/widgets/footer.dart'; 9 | import 'dart:ui' as ui; 10 | import 'package:nft_marketplace/widgets/header_home_page.dart'; 11 | import 'package:nft_marketplace/widgets/heading.dart'; 12 | import 'package:nft_marketplace/widgets/home_cardpage.dart'; 13 | import 'package:nft_marketplace/widgets/uihelper.dart'; 14 | 15 | import 'nft_art.dart'; 16 | 17 | class HomePage extends StatefulWidget { 18 | const HomePage({Key? key}) : super(key: key); 19 | 20 | @override 21 | _HomePageState createState() => _HomePageState(); 22 | } 23 | 24 | class _HomePageState extends State 25 | with SingleTickerProviderStateMixin { 26 | late NftModel nftModel; 27 | late AnimationController _controller; 28 | late PageController _pageController; 29 | late int _indexPage; 30 | late int _currentIndex; 31 | late bool _enableAddCreditCard; 32 | double _blueBgTranslatePercent = 1.0; 33 | double _blueBgTransitionPercent = 1.0; 34 | bool _hideByVelocity = false; 35 | 36 | // Data 37 | 38 | 39 | @override 40 | void initState() { 41 | 42 | _controller = AnimationController( 43 | vsync: this, duration: const Duration(milliseconds: 600)); 44 | _indexPage = 1; 45 | _currentIndex = 1; 46 | _enableAddCreditCard = false; 47 | // Data 48 | 49 | super.initState(); 50 | } 51 | 52 | 53 | 54 | void _onVerticalDragUpdate(DragUpdateDetails details) { 55 | if (_currentIndex > 0) { 56 | if (details.primaryDelta! > 0.0) { 57 | _controller.value += 0.020; 58 | } else { 59 | _controller.value -= 0.020; 60 | } 61 | 62 | if (details.primaryDelta! > -1.5) { 63 | _hideByVelocity = false; 64 | } else { 65 | _hideByVelocity = true; 66 | _controller.reverse(); 67 | } 68 | } 69 | setState(() {}); 70 | } 71 | 72 | void _onVerticalDragEnd(DragEndDetails details) { 73 | if (_currentIndex >= 0) { 74 | if (_controller.value < 0.2 || _hideByVelocity) { 75 | _controller.reverse(); 76 | } else { 77 | _controller.forward(); 78 | } 79 | } 80 | } 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | return Scaffold( 85 | backgroundColor: Colors.grey.shade900, 86 | body: SafeArea( 87 | child:SingleChildScrollView( 88 | physics: const ScrollPhysics(), 89 | child: Column( 90 | children: [ 91 | const GreetingWidget(), 92 | Heading(text: "Trending in Galaxy",), 93 | const TrendingNft(), 94 | Heading(text: "Collection",), 95 | const ShoppingCardPager(), 96 | Heading(text:"NFT Art"), 97 | // ListView.builder( 98 | // 99 | // itemCount:nftList.length, 100 | // itemBuilder: (_,index){ 101 | // return NftArtList(nftModel:nftList[index]); 102 | // }), 103 | ListView( 104 | shrinkWrap: true, 105 | physics: const NeverScrollableScrollPhysics(), 106 | children:nftList.map((list) => NftArtList(nftModel: list)).toList()), 107 | Footer(), 108 | 109 | ], 110 | ), 111 | ) 112 | ), 113 | ); 114 | } 115 | } -------------------------------------------------------------------------------- /lib/animations/letter_spacing.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class SpaceLetter extends StatefulWidget { 6 | final String name ; 7 | final double opacity ; 8 | final double height ; 9 | final double width ; 10 | final double fontsize; 11 | final double iconsize; 12 | const SpaceLetter( {Key? key, required this.name,required this.width, 13 | required this.height,required this.opacity, required this.fontsize, required this.iconsize}) : super(key: key); 14 | @override 15 | _SpaceLetterState createState() => _SpaceLetterState(); 16 | } 17 | 18 | class _SpaceLetterState extends State { 19 | double elevation = 10; 20 | double letterSpacingBegin = 1; 21 | double letterSpacingEnd = 1; 22 | 23 | bool isPressed = false; 24 | @override 25 | void initState() { 26 | // TODO: implement initState 27 | super.initState(); 28 | Timer.periodic(Duration(seconds: 2), (Timer timer) { 29 | isPressed=true; 30 | if(isPressed==true){ 31 | setState(() { 32 | elevation = 0; 33 | letterSpacingBegin = 1; 34 | letterSpacingEnd = 20; 35 | isPressed = true; 36 | }); 37 | } 38 | }); 39 | } 40 | @override 41 | Widget build(BuildContext context) { 42 | return GestureDetector( 43 | 44 | onTapDown: (d) { 45 | setState(() { 46 | elevation = 0; 47 | letterSpacingBegin = 1; 48 | letterSpacingEnd = 20; 49 | isPressed = true; 50 | }); 51 | }, 52 | onTapUp: (d) { 53 | setState(() { 54 | elevation = 10; 55 | letterSpacingBegin = 20; 56 | letterSpacingEnd = 1; 57 | isPressed = false; 58 | }); 59 | }, 60 | child: AnimatedContainer( 61 | duration: const Duration(milliseconds: 500), 62 | width: MediaQuery.of(context).size.width - widget.width, 63 | height: widget.height, 64 | alignment: Alignment.center, 65 | decoration: BoxDecoration( 66 | borderRadius: BorderRadius.circular(10), 67 | color: isPressed ? Colors.white.withOpacity(widget.opacity) : Color.fromRGBO(45, 45, 45, 1), 68 | boxShadow: [ 69 | BoxShadow( 70 | color: isPressed ? Colors.black12 : Colors.black26, 71 | offset: Offset(0, 10), 72 | blurRadius: 20, 73 | ), 74 | ], 75 | ), 76 | child: Row( 77 | children: [ 78 | Padding( 79 | padding: const EdgeInsets.all(2.0), 80 | child: Icon(Icons.verified_rounded,color: Colors.black12.withOpacity(0.4),size: widget.iconsize,), 81 | ), 82 | TweenAnimationBuilder( 83 | curve: Curves.fastOutSlowIn, 84 | duration: const Duration(milliseconds: 1000), 85 | tween: Tween(begin: letterSpacingBegin, end: letterSpacingEnd), 86 | builder: (context, double letterSpacing, child) { 87 | return Text( 88 | widget.name, 89 | style: TextStyle( 90 | color: isPressed ? const Color.fromRGBO(45, 45, 45, 1) : Colors.white, 91 | fontSize: widget.fontsize, 92 | letterSpacing: letterSpacing, 93 | fontWeight: FontWeight.w500, 94 | ), 95 | ); 96 | }, 97 | ), 98 | ], 99 | ), 100 | ), 101 | ); 102 | 103 | } 104 | } -------------------------------------------------------------------------------- /lib/widgets/top_right_clipper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TopRightClipper extends CustomClipper { 4 | @override 5 | Path getClip(Size size) { 6 | Path path = Path(); 7 | final double _xScaling = size.width / 375; 8 | final double _yScaling = size.height / 812; 9 | path.lineTo(304.51 * _xScaling, -174.308 * _yScaling); 10 | path.cubicTo( 11 | 329.223 * _xScaling, 12 | -181.119 * _yScaling, 13 | 351.649 * _xScaling, 14 | -199.055 * _yScaling, 15 | 377.304 * _xScaling, 16 | -196.299 * _yScaling, 17 | ); 18 | path.cubicTo( 19 | 402.975 * _xScaling, 20 | -193.542 * _yScaling, 21 | 423.049 * _xScaling, 22 | -173.058 * _yScaling, 23 | 445.164 * _xScaling, 24 | -159.199 * _yScaling, 25 | ); 26 | path.cubicTo( 27 | 466.889 * _xScaling, 28 | -145.585 * _yScaling, 29 | 492.989 * _xScaling, 30 | -136.488 * _yScaling, 31 | 507.15 * _xScaling, 32 | -114.93 * _yScaling, 33 | ); 34 | path.cubicTo( 35 | 521.261 * _xScaling, 36 | -93.4484 * _yScaling, 37 | 519.513 * _xScaling, 38 | -65.87 * _yScaling, 39 | 523.137 * _xScaling, 40 | -40.4969 * _yScaling, 41 | ); 42 | path.cubicTo( 43 | 526.568 * _xScaling, 44 | -16.469 * _yScaling, 45 | 530.669 * _xScaling, 46 | 7.25881 * _yScaling, 47 | 528.028 * _xScaling, 48 | 31.2624 * _yScaling, 49 | ); 50 | path.cubicTo( 51 | 525.261 * _xScaling, 52 | 56.4238 * _yScaling, 53 | 521.969 * _xScaling, 54 | 82.8593 * _yScaling, 55 | 507.337 * _xScaling, 56 | 103.142 * _yScaling, 57 | ); 58 | path.cubicTo( 59 | 492.715 * _xScaling, 60 | 123.411 * _yScaling, 61 | 466.947 * _xScaling, 62 | 130.798 * _yScaling, 63 | 446.254 * _xScaling, 64 | 144.616 * _yScaling, 65 | ); 66 | path.cubicTo( 67 | 424.348 * _xScaling, 68 | 159.245 * _yScaling, 69 | 407.286 * _xScaling, 70 | 185.341 * _yScaling, 71 | 380.941 * _xScaling, 72 | 187.547 * _yScaling, 73 | ); 74 | path.cubicTo( 75 | 354.563 * _xScaling, 76 | 189.755 * _yScaling, 77 | 332.294 * _xScaling, 78 | 167.393 * _yScaling, 79 | 307.963 * _xScaling, 80 | 156.192 * _yScaling, 81 | ); 82 | path.cubicTo( 83 | 285.649 * _xScaling, 84 | 145.921 * _yScaling, 85 | 262.802 * _xScaling, 86 | 137.982 * _yScaling, 87 | 242.584 * _xScaling, 88 | 123.857 * _yScaling, 89 | ); 90 | path.cubicTo( 91 | 220.69 * _xScaling, 92 | 108.562 * _yScaling, 93 | 195.077 * _xScaling, 94 | 94.4301 * _yScaling, 95 | 184.341 * _xScaling, 96 | 69.8294 * _yScaling, 97 | ); 98 | path.cubicTo( 99 | 173.603 * _xScaling, 100 | 45.2279 * _yScaling, 101 | 183.61 * _xScaling, 102 | 17.2839 * _yScaling, 103 | 184.432 * _xScaling, 104 | -9.38204 * _yScaling, 105 | ); 106 | path.cubicTo( 107 | 185.228 * _xScaling, 108 | -35.1901 * _yScaling, 109 | 181.785 * _xScaling, 110 | -61.2157 * _yScaling, 111 | 189.141 * _xScaling, 112 | -85.7998 * _yScaling, 113 | ); 114 | path.cubicTo( 115 | 196.864 * _xScaling, 116 | -111.613 * _yScaling, 117 | 206.92 * _xScaling, 118 | -138.951 * _yScaling, 119 | 228.049 * _xScaling, 120 | -155.16 * _yScaling, 121 | ); 122 | path.cubicTo( 123 | 249.109 * _xScaling, 124 | -171.317 * _yScaling, 125 | 278.908 * _xScaling, 126 | -167.251 * _yScaling, 127 | 304.51 * _xScaling, 128 | -174.308 * _yScaling, 129 | ); 130 | path.cubicTo( 131 | 304.51 * _xScaling, 132 | -174.308 * _yScaling, 133 | 304.51 * _xScaling, 134 | -174.308 * _yScaling, 135 | 304.51 * _xScaling, 136 | -174.308 * _yScaling, 137 | ); 138 | return path; 139 | } 140 | 141 | @override 142 | bool shouldReclip(CustomClipper oldClipper) => true; 143 | } 144 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nft_marketplace 2 | Nft market place concept app with cool animation. Non Fungible Tokens (NFTs) are digital assets that represent objects like art, collectible, and in-game items. They are traded online, often with cryptocurrency, and are generally encoded within smart contracts on a blockchain 3 | ## Feel free to contribute 4 | ## NFt marketplace App 5 | 6 | ## Video Demo 📺 7 |
8 | 9 | https://user-images.githubusercontent.com/24698014/138818077-08cee3c7-0f3b-4bfe-aa28-d7fe708150ac.mp4?width=200&height=200 10 | 11 | 14 | 15 |
16 | 17 | ## Assets credit to dribbble artist 18 | :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: 19 | ## Screenshots 20 | 21 | 1 | 2 | 3 | 4 22 | :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: 23 | ![](https://user-images.githubusercontent.com/24698014/129524907-e8546048-190b-489a-9fa9-bf2703fdd44b.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129524633-ecbc8d68-0063-4ad8-b58c-ce35ac9e2fb3.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129524787-134e7d45-156a-4cb8-ae6a-3a883a0e45c3.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129524970-e630b8b6-e34a-4573-a9e7-4876b0118048.png)| 24 | 5 | 6 | 7 | 8 25 | :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: 26 | ![](https://user-images.githubusercontent.com/24698014/129524980-b97c21dc-121a-402a-9642-0eeeba8eec06.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129525001-c6bacb17-a35e-4b6e-a9d5-d20117940be8.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129525197-03bf7a7b-3fa0-4b5a-a4b1-b47f13b78c8b.png?raw=true)|![](https://user-images.githubusercontent.com/24698014/129525369-808d344e-ef01-4492-a8d4-db12e7fbcd5e.png)| 27 | 28 | 29 | ## Happy learning. :+1: 30 | If you found this project useful, then please consider giving it a :star: on Github and sharing it with your friends via social media. 31 | ### Show some :heart: and star the repo to support the project 32 | if you like my work support me 33 | ## Project Created & Maintained By 34 | 35 | ### divyam joshi 36 | # Donate 37 | 38 | > If you found this project helpful or you learned something from the source code and want to appreciate 39 | > 40 | > Buy Me A Coffee 41 | > 42 | > - [PayPal](https://paypal.me/divyamjoshi) 43 |
44 | ## License 45 | 46 | ``` 47 | The MIT License 48 | 49 | Copyright (c) 2021 Divyam Joshi 50 | 51 | Permission is hereby granted, free of charge, to any person obtaining a copy 52 | of this software and associated documentation files (the "Software"), to deal 53 | in the Software without restriction, including without limitation the rights 54 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 55 | copies of the Software, and to permit persons to whom the Software is 56 | furnished to do so, subject to the following conditions: 57 | 58 | The above copyright notice and this permission notice shall be included in 59 | all copies or substantial portions of the Software. 60 | 61 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 62 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 63 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 64 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 65 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 66 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 67 | THE SOFTWARE. 68 | -------------------------------------------------------------------------------- /lib/widgets/bottom_left_clipper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// Neumorphic clipper that is placed the top most on the bottom left 4 | class BottomLeftNeuClipper extends CustomClipper { 5 | @override 6 | Path getClip(Size size) { 7 | Path path = Path(); 8 | final double _xScaling = size.width / 375; 9 | final double _yScaling = size.height / 812; 10 | path.lineTo(15.8844 * _xScaling, 194.032 * _yScaling); 11 | path.cubicTo( 12 | 41.7322 * _xScaling, 13 | 187.818 * _yScaling, 14 | 64.4102 * _xScaling, 15 | 168.631 * _yScaling, 16 | 91.895 * _xScaling, 17 | 173.507 * _yScaling, 18 | ); 19 | path.cubicTo( 20 | 119.396 * _xScaling, 21 | 178.385 * _yScaling, 22 | 142.116 * _xScaling, 23 | 203.325 * _yScaling, 24 | 166.569 * _xScaling, 25 | 220.764 * _yScaling, 26 | ); 27 | path.cubicTo( 28 | 190.591 * _xScaling, 29 | 237.895 * _yScaling, 30 | 218.969 * _xScaling, 31 | 250.109 * _yScaling, 32 | 235.467 * _xScaling, 33 | 275.895 * _yScaling, 34 | ); 35 | path.cubicTo( 36 | 251.907 * _xScaling, 37 | 301.59 * _yScaling, 38 | 251.874 * _xScaling, 39 | 333.261 * _yScaling, 40 | 257.411 * _xScaling, 41 | 362.746 * _yScaling, 42 | ); 43 | path.cubicTo( 44 | 262.655 * _xScaling, 45 | 390.668 * _yScaling, 46 | 268.591 * _xScaling, 47 | 418.289 * _yScaling, 48 | 267.371 * _xScaling, 49 | 445.781 * _yScaling, 50 | ); 51 | path.cubicTo( 52 | 266.093 * _xScaling, 53 | 474.598 * _yScaling, 54 | 264.341 * _xScaling, 55 | 504.85 * _yScaling, 56 | 250.113 * _xScaling, 57 | 527.259 * _yScaling, 58 | ); 59 | path.cubicTo( 60 | 235.895 * _xScaling, 61 | 549.652 * _yScaling, 62 | 208.962 * _xScaling, 63 | 556.46 * _yScaling, 64 | 187.856 * _xScaling, 65 | 571.016 * _yScaling, 66 | ); 67 | path.cubicTo( 68 | 165.513 * _xScaling, 69 | 586.425 * _yScaling, 70 | 149.084 * _xScaling, 71 | 615.374 * _yScaling, 72 | 121.194 * _xScaling, 73 | 616.171 * _yScaling, 74 | ); 75 | path.cubicTo( 76 | 93.2682 * _xScaling, 77 | 616.968 * _yScaling, 78 | 68.0885 * _xScaling, 79 | 589.718 * _yScaling, 80 | 41.4531 * _xScaling, 81 | 575.197 * _yScaling, 82 | ); 83 | path.cubicTo( 84 | 17.0259 * _xScaling, 85 | 561.879 * _yScaling, 86 | -7.81309 * _xScaling, 87 | 551.216 * _yScaling, 88 | -30.2651 * _xScaling, 89 | 533.596 * _yScaling, 90 | ); 91 | path.cubicTo( 92 | -54.5775 * _xScaling, 93 | 514.517 * _yScaling, 94 | -82.7712 * _xScaling, 95 | 496.531 * _yScaling, 96 | -95.8271 * _xScaling, 97 | 467.465 * _yScaling, 98 | ); 99 | path.cubicTo( 100 | -108.883 * _xScaling, 101 | 438.398 * _yScaling, 102 | -100.086 * _xScaling, 103 | 406.852 * _yScaling, 104 | -100.977 * _xScaling, 105 | 376.171 * _yScaling, 106 | ); 107 | path.cubicTo( 108 | -101.84 * _xScaling, 109 | 346.477 * _yScaling, 110 | -107.228 * _xScaling, 111 | 316.252 * _yScaling, 112 | -101.029 * _xScaling, 113 | 288.404 * _yScaling, 114 | ); 115 | path.cubicTo( 116 | -94.5197 * _xScaling, 117 | 259.162 * _yScaling, 118 | -85.6289 * _xScaling, 119 | 228.319 * _yScaling, 120 | -64.217 * _xScaling, 121 | 211.036 * _yScaling, 122 | ); 123 | path.cubicTo( 124 | -42.8756 * _xScaling, 125 | 193.809 * _yScaling, 126 | -10.8945 * _xScaling, 127 | 200.469 * _yScaling, 128 | 15.8844 * _xScaling, 129 | 194.032 * _yScaling, 130 | ); 131 | path.cubicTo( 132 | 15.8844 * _xScaling, 133 | 194.032 * _yScaling, 134 | 15.8844 * _xScaling, 135 | 194.032 * _yScaling, 136 | 15.8844 * _xScaling, 137 | 194.032 * _yScaling, 138 | ); 139 | return path; 140 | } 141 | 142 | @override 143 | bool shouldReclip(CustomClipper oldClipper) => true; 144 | } 145 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: nft_marketplace 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | confetti: ^0.6.0-nullsafety 31 | flare_flutter: ^3.0.2 32 | video_player: ^2.1.12 33 | fl_chart: ^0.36.3 34 | flutter_svg: ^0.22.0 35 | funvas: ^0.1.3+5 36 | cached_network_image: ^3.1.0 37 | transparent_image: ^2.0.0 38 | flutter: 39 | sdk: flutter 40 | 41 | 42 | # The following adds the Cupertino Icons font to your application. 43 | # Use with the CupertinoIcons class for iOS style icons. 44 | cupertino_icons: ^1.0.2 45 | 46 | dev_dependencies: 47 | flutter_test: 48 | sdk: flutter 49 | 50 | # The "flutter_lints" package below contains a set of recommended lints to 51 | # encourage good coding practices. The lint set provided by the package is 52 | # activated in the `analysis_options.yaml` file located at the root of your 53 | # package. See that file for information about deactivating specific lint 54 | # rules and activating additional ones. 55 | flutter_lints: ^1.0.0 56 | 57 | # For information on the generic Dart part of this file, see the 58 | # following page: https://dart.dev/tools/pub/pubspec 59 | 60 | # The following section is specific to Flutter. 61 | flutter: 62 | 63 | # The following line ensures that the Material Icons font is 64 | # included with your application, so that you can use the icons in 65 | # the material Icons class. 66 | uses-material-design: true 67 | 68 | # To add assets to your application, add an assets section, like this: 69 | assets: 70 | - assets/flares/ 71 | - assets/ 72 | 73 | 74 | # An image asset can refer to one or more resolution-specific "variants", see 75 | # https://flutter.dev/assets-and-images/#resolution-aware. 76 | 77 | # For details regarding adding assets from package dependencies, see 78 | # https://flutter.dev/assets-and-images/#from-packages 79 | 80 | # To add custom fonts to your application, add a fonts section here, 81 | # in this "flutter" section. Each entry in this list should have a 82 | # "family" key with the font family name, and a "fonts" key with a 83 | # list giving the asset and other descriptors for the font. For 84 | # example: 85 | # fonts: 86 | # - family: Schyler 87 | # fonts: 88 | # - asset: fonts/Schyler-Regular.ttf 89 | # - asset: fonts/Schyler-Italic.ttf 90 | # style: italic 91 | # - family: Trajan Pro 92 | # fonts: 93 | # - asset: fonts/TrajanPro.ttf 94 | # - asset: fonts/TrajanPro_Bold.ttf 95 | # weight: 700 96 | # 97 | # For details regarding fonts from package dependencies, 98 | # see https://flutter.dev/custom-fonts/#from-packages 99 | -------------------------------------------------------------------------------- /lib/widgets/top_right_cipper_bottom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// Neumorphic clipper that is placed the bottom most on the top right 4 | /// Btm just stands for the bottom most 5 | class TopRightNeuClipperBtm extends CustomClipper { 6 | @override 7 | Path getClip(Size size) { 8 | Path path = Path(); 9 | final double _xScaling = size.width / 375; 10 | final double _yScaling = size.height / 812; 11 | path.lineTo(272.31 * _xScaling, -94.0542 * _yScaling); 12 | path.cubicTo( 13 | 293.384 * _xScaling, 14 | -98.9195 * _yScaling, 15 | 311.702 * _xScaling, 16 | -114.658 * _yScaling, 17 | 334.255 * _xScaling, 18 | -110.242 * _yScaling, 19 | ); 20 | path.cubicTo( 21 | 356.821 * _xScaling, 22 | -105.825 * _yScaling, 23 | 375.725 * _xScaling, 24 | -84.715 * _yScaling, 25 | 395.955 * _xScaling, 26 | -69.847 * _yScaling, 27 | ); 28 | path.cubicTo( 29 | 415.827 * _xScaling, 30 | -55.2416 * _yScaling, 31 | 439.202 * _xScaling, 32 | -44.688 * _yScaling, 33 | 453.026 * _xScaling, 34 | -22.9491 * _yScaling, 35 | ); 36 | path.cubicTo( 37 | 466.801 * _xScaling, 38 | -1.28773 * _yScaling, 39 | 467.17 * _xScaling, 40 | 25.1582 * _yScaling, 41 | 472.07 * _xScaling, 42 | 49.8486 * _yScaling, 43 | ); 44 | path.cubicTo( 45 | 476.71 * _xScaling, 46 | 73.2298 * _yScaling, 47 | 481.913 * _xScaling, 48 | 96.368 * _yScaling, 49 | 481.259 * _xScaling, 50 | 119.309 * _yScaling, 51 | ); 52 | path.cubicTo( 53 | 480.574 * _xScaling, 54 | 143.357 * _yScaling, 55 | 479.519 * _xScaling, 56 | 168.596 * _yScaling, 57 | 468.156 * _xScaling, 58 | 187.13 * _yScaling, 59 | ); 60 | path.cubicTo( 61 | 456.801 * _xScaling, 62 | 205.651 * _yScaling, 63 | 434.845 * _xScaling, 64 | 210.999 * _yScaling, 65 | 417.756 * _xScaling, 66 | 222.889 * _yScaling, 67 | ); 68 | path.cubicTo( 69 | 399.664 * _xScaling, 70 | 235.477 * _yScaling, 71 | 386.582 * _xScaling, 72 | 259.445 * _yScaling, 73 | 363.769 * _xScaling, 74 | 259.761 * _yScaling, 75 | ); 76 | path.cubicTo( 77 | 340.926 * _xScaling, 78 | 260.078 * _yScaling, 79 | 319.98 * _xScaling, 80 | 237.008 * _yScaling, 81 | 298.001 * _xScaling, 82 | 224.549 * _yScaling, 83 | ); 84 | path.cubicTo( 85 | 277.845 * _xScaling, 86 | 213.123 * _yScaling, 87 | 257.385 * _xScaling, 88 | 203.908 * _yScaling, 89 | 238.791 * _xScaling, 90 | 188.915 * _yScaling, 91 | ); 92 | path.cubicTo( 93 | 218.657 * _xScaling, 94 | 172.679 * _yScaling, 95 | 195.36 * _xScaling, 96 | 157.307 * _yScaling, 97 | 184.312 * _xScaling, 98 | 132.873 * _yScaling, 99 | ); 100 | path.cubicTo( 101 | 173.264 * _xScaling, 102 | 108.438 * _yScaling, 103 | 180.069 * _xScaling, 104 | 82.2063 * _yScaling, 105 | 178.956 * _xScaling, 106 | 56.5758 * _yScaling, 107 | ); 108 | path.cubicTo( 109 | 177.879 * _xScaling, 110 | 31.7698 * _yScaling, 111 | 173.091 * _xScaling, 112 | 6.46339 * _yScaling, 113 | 177.816 * _xScaling, 114 | -16.7134 * _yScaling, 115 | ); 116 | path.cubicTo( 117 | 182.777 * _xScaling, 118 | -41.0492 * _yScaling, 119 | 189.666 * _xScaling, 120 | -66.6928 * _yScaling, 121 | 206.972 * _xScaling, 122 | -80.8573 * _yScaling, 123 | ); 124 | path.cubicTo( 125 | 224.221 * _xScaling, 126 | -94.9751 * _yScaling, 127 | 250.476 * _xScaling, 128 | -89.0135 * _yScaling, 129 | 272.31 * _xScaling, 130 | -94.0542 * _yScaling, 131 | ); 132 | path.cubicTo( 133 | 272.31 * _xScaling, 134 | -94.0542 * _yScaling, 135 | 272.31 * _xScaling, 136 | -94.0542 * _yScaling, 137 | 272.31 * _xScaling, 138 | -94.0542 * _yScaling, 139 | ); 140 | return path; 141 | } 142 | 143 | @override 144 | bool shouldReclip(CustomClipper oldClipper) => true; 145 | } 146 | -------------------------------------------------------------------------------- /lib/widgets/bottom_left_clipper_bottom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// Neumorphic clipper that is placed the bottom most on the bottom left 4 | /// Btm just stands for the bottom most 5 | class BottomLeftNeuClipperBtm extends CustomClipper { 6 | @override 7 | Path getClip(Size size) { 8 | Path path = Path(); 9 | final double _xScaling = size.width / 375; 10 | final double _yScaling = size.height / 812; 11 | path.lineTo(-85.8912 * _xScaling, 289.388 * _yScaling); 12 | path.cubicTo( 13 | -34.0201 * _xScaling, 14 | 277.413 * _yScaling, 15 | 11.0669 * _xScaling, 16 | 238.676 * _yScaling, 17 | 66.5766 * _xScaling, 18 | 249.544 * _yScaling, 19 | ); 20 | path.cubicTo( 21 | 122.119 * _xScaling, 22 | 260.418 * _yScaling, 23 | 168.648 * _xScaling, 24 | 312.375 * _yScaling, 25 | 218.439 * _xScaling, 26 | 348.97 * _yScaling, 27 | ); 28 | path.cubicTo( 29 | 267.351 * _xScaling, 30 | 384.919 * _yScaling, 31 | 324.885 * _xScaling, 32 | 410.894 * _yScaling, 33 | 358.91 * _xScaling, 34 | 464.401 * _yScaling, 35 | ); 36 | path.cubicTo( 37 | 392.814 * _xScaling, 38 | 517.716 * _yScaling, 39 | 393.723 * _xScaling, 40 | 582.808 * _yScaling, 41 | 405.784 * _xScaling, 42 | 643.579 * _yScaling, 43 | ); 44 | path.cubicTo( 45 | 417.205 * _xScaling, 46 | 701.128 * _yScaling, 47 | 430.011 * _xScaling, 48 | 758.078 * _yScaling, 49 | 428.401 * _xScaling, 50 | 814.544 * _yScaling, 51 | ); 52 | path.cubicTo( 53 | 426.713 * _xScaling, 54 | 873.733 * _yScaling, 55 | 424.117 * _xScaling, 56 | 935.854 * _yScaling, 57 | 396.149 * _xScaling, 58 | 981.472 * _yScaling, 59 | ); 60 | path.cubicTo( 61 | 368.2 * _xScaling, 62 | 1027.06 * _yScaling, 63 | 314.161 * _xScaling, 64 | 1040.22 * _yScaling, 65 | 272.099 * _xScaling, 66 | 1069.49 * _yScaling, 67 | ); 68 | path.cubicTo( 69 | 227.569 * _xScaling, 70 | 1100.47 * _yScaling, 71 | 195.369 * _xScaling, 72 | 1159.46 * _yScaling, 73 | 139.219 * _xScaling, 74 | 1160.24 * _yScaling, 75 | ); 76 | path.cubicTo( 77 | 82.9956 * _xScaling, 78 | 1161.02 * _yScaling, 79 | 31.44 * _xScaling, 80 | 1104.24 * _yScaling, 81 | -22.6558 * _xScaling, 82 | 1073.57 * _yScaling, 83 | ); 84 | path.cubicTo( 85 | -72.2668 * _xScaling, 86 | 1045.45 * _yScaling, 87 | -122.625 * _xScaling, 88 | 1022.77 * _yScaling, 89 | -168.39 * _xScaling, 90 | 985.865 * _yScaling, 91 | ); 92 | path.cubicTo( 93 | -217.948 * _xScaling, 94 | 945.903 * _yScaling, 95 | -275.289 * _xScaling, 96 | 908.069 * _yScaling, 97 | -302.481 * _xScaling, 98 | 847.928 * _yScaling, 99 | ); 100 | path.cubicTo( 101 | -329.673 * _xScaling, 102 | 787.785 * _yScaling, 103 | -312.924 * _xScaling, 104 | 723.222 * _yScaling, 105 | -315.664 * _xScaling, 106 | 660.137 * _yScaling, 107 | ); 108 | path.cubicTo( 109 | -318.316 * _xScaling, 110 | 599.081 * _yScaling, 111 | -330.1 * _xScaling, 112 | 536.794 * _yScaling, 113 | -318.471 * _xScaling, 114 | 479.749 * _yScaling, 115 | ); 116 | path.cubicTo( 117 | -306.26 * _xScaling, 118 | 419.851 * _yScaling, 119 | -289.302 * _xScaling, 120 | 356.733 * _yScaling, 121 | -246.707 * _xScaling, 122 | 321.87 * _yScaling, 123 | ); 124 | path.cubicTo( 125 | -204.252 * _xScaling, 126 | 287.122 * _yScaling, 127 | -139.631 * _xScaling, 128 | 301.795 * _yScaling, 129 | -85.8912 * _xScaling, 130 | 289.388 * _yScaling, 131 | ); 132 | path.cubicTo( 133 | -85.8912 * _xScaling, 134 | 289.388 * _yScaling, 135 | -85.8912 * _xScaling, 136 | 289.388 * _yScaling, 137 | -85.8912 * _xScaling, 138 | 289.388 * _yScaling, 139 | ); 140 | return path; 141 | } 142 | 143 | @override 144 | bool shouldReclip(CustomClipper oldClipper) => true; 145 | } 146 | -------------------------------------------------------------------------------- /lib/screens/start_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:nft_marketplace/animations/image_animation.dart'; 5 | import 'package:nft_marketplace/routes.dart'; 6 | import 'package:nft_marketplace/widgets/bottom_left_clipper_bottom.dart'; 7 | import 'package:nft_marketplace/widgets/clip_shadow_path.dart'; 8 | import 'package:nft_marketplace/widgets/top_right_cipper_bottom.dart'; 9 | import 'package:nft_marketplace/widgets/top_right_clipper.dart'; 10 | 11 | import 'package:transparent_image/transparent_image.dart'; 12 | 13 | const kNeumorphicColor = Color.fromRGBO(235, 228, 229, 1); // rgb(235, 228, 229) 14 | 15 | class StartPage extends StatefulWidget { 16 | const StartPage({Key? key}) : super(key: key); 17 | 18 | @override 19 | State createState() => _StartPageState(); 20 | } 21 | 22 | class _StartPageState extends State { 23 | void startTimer() { 24 | Timer(Duration(seconds: 3), () async { 25 | Navigator.of(context).pushReplacementNamed(RouteGenerator.homePage); 26 | }); 27 | } 28 | @override 29 | void initState() { 30 | // TODO: implement initState 31 | super.initState(); 32 | startTimer(); 33 | } 34 | @override 35 | Widget build(BuildContext context) { 36 | final Shader linearGradient = const LinearGradient( 37 | colors: [Color(0xffDA44bb), Color(0xff8921aa)], 38 | ).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0)); 39 | final width = MediaQuery.of(context).size.width; 40 | final height = MediaQuery.of(context).size.height; 41 | const boxShadow = BoxShadow( 42 | color: Colors.grey, 43 | offset: Offset(-5, 3), 44 | blurRadius: 5, 45 | spreadRadius: 10, 46 | ); 47 | final widthNeuContainer = Container( 48 | width: width * 0.99, 49 | color: Colors.grey.shade900, 50 | ); 51 | 52 | 53 | final heightNeuContainer = Container( 54 | height: height * 0.99, 55 | color: Colors.grey.shade900, 56 | ); 57 | 58 | return Material( 59 | color: Colors.grey.shade900, 60 | child: Stack( 61 | 62 | children: [ 63 | Align( 64 | child: ClipShadowPath( 65 | shadow: boxShadow, 66 | clipper: TopRightNeuClipperBtm(), 67 | child: widthNeuContainer, 68 | ), 69 | ), 70 | Align( 71 | alignment: Alignment(30, -1), 72 | child: ClipShadowPath( 73 | shadow: boxShadow, 74 | clipper: TopRightClipper(), 75 | child: widthNeuContainer, 76 | ), 77 | ), 78 | Align( 79 | alignment: Alignment(0, 30.5), 80 | child: ClipShadowPath( 81 | shadow: boxShadow, 82 | clipper: BottomLeftNeuClipperBtm(), 83 | child: heightNeuContainer, 84 | ), 85 | ), 86 | const Align( 87 | alignment: Alignment(0, 9), 88 | child: ImageAnimation(), 89 | ), 90 | // Align( 91 | // alignment: Alignment(0, 120.5), 92 | // child: ClipShadowPath( 93 | // shadow: boxShadow, 94 | // clipper: BottomLeftNeuClipper(), 95 | // child: heightNeuContainer, 96 | // ), 97 | // ), 98 | const Align( 99 | alignment: Alignment.topCenter, 100 | child: Padding( 101 | padding: EdgeInsets.only(top: 50,left: 10), 102 | child: Text( 103 | 'Toward Decentralized World', 104 | style: TextStyle( 105 | fontSize: 30.0, 106 | fontWeight: FontWeight.bold, 107 | color: Colors.white), 108 | ), 109 | ), 110 | ), 111 | Align( 112 | alignment: Alignment.bottomCenter, 113 | child: Padding( 114 | padding: const EdgeInsets.only(bottom: 58.0), 115 | child: SizedBox( 116 | width: width * 0.8, 117 | child: MaterialButton( 118 | onPressed: () { 119 | Navigator.of(context).pushNamed(RouteGenerator.homePage); 120 | }, 121 | padding: const EdgeInsets.symmetric(vertical: 10), 122 | color: Theme.of(context).textTheme.headline1!.color, 123 | child: const Text( 124 | 'Let\'s Get Started ', 125 | style: TextStyle(fontSize: 24, color: Colors.white), 126 | ), 127 | ), 128 | ), 129 | ), 130 | ) 131 | ], 132 | ), 133 | ); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/widgets/header_home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nft_marketplace/animations/letter_spacing.dart'; 3 | import 'package:nft_marketplace/screens/balance.dart'; 4 | import 'dart:ui' as ui; 5 | 6 | import 'package:nft_marketplace/screens/profile_page.dart'; 7 | 8 | class GreetingWidget extends StatelessWidget { 9 | const GreetingWidget({ 10 | Key? key, 11 | }) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final Shader linearGradient = const LinearGradient( 16 | colors: [Color(0xffDA44bb), Color(0xff8921aa)], 17 | ).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0)); 18 | return 19 | Container( 20 | decoration: const BoxDecoration( 21 | // color: const Color.fromRGBO(45, 45, 45, 1).withOpacity(.99), 22 | image: DecorationImage( 23 | image: AssetImage("assets/batman.png"), 24 | fit: BoxFit.contain, 25 | ), 26 | ), 27 | child: BackdropFilter( 28 | filter: ui.ImageFilter.blur(sigmaX: 0.0, sigmaY: 0.0), 29 | child: Padding( 30 | padding: const EdgeInsets.all(12.0), 31 | child: Column( 32 | mainAxisSize: MainAxisSize.min, 33 | mainAxisAlignment:MainAxisAlignment.start, 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Row( 37 | mainAxisSize: MainAxisSize.min, 38 | // mainAxisAlignment:MainAxisAlignment.start, 39 | // crossAxisAlignment: CrossAxisAlignment.start, 40 | children: [ 41 | 42 | Text( 43 | 'NFT Marketplace', 44 | style: TextStyle( 45 | fontSize: 25.0, 46 | fontWeight: FontWeight.bold, 47 | foreground: Paint()..shader = linearGradient), 48 | ), 49 | SizedBox(width: 10,), 50 | // Text.rich( 51 | // TextSpan( 52 | // text: 'Hello', 53 | // children: [ 54 | // TextSpan( 55 | // text: ' ${"divyam".split(' ').first}', 56 | // style: TextStyle(fontWeight: FontWeight.bold)), 57 | // ], 58 | // ), 59 | // style: TextStyle( 60 | // fontSize: 30, 61 | // ), 62 | // ), 63 | const Spacer(), 64 | InkWell( 65 | onTap: (){ 66 | Navigator.of(context).push(PageRouteBuilder( 67 | pageBuilder: (context, animation, _) { 68 | return SecondScreen(); 69 | }, 70 | opaque: false)); 71 | }, 72 | 73 | 74 | child: const CircleAvatar( 75 | radius: 20, 76 | backgroundImage: NetworkImage( 77 | "https://cdn.dribbble.com/users/2311205/screenshots/4841572/060_s.jpg?compress=1&resize=800x600"), 78 | ), 79 | ) 80 | 81 | // Container( 82 | // width: 60, 83 | // height: 60, 84 | // decoration: const BoxDecoration( 85 | // shape: BoxShape.circle, 86 | // color: Colors.white, 87 | // ), 88 | // child: const Icon( 89 | // Icons.credit_card, 90 | // // color: BankColors.kLessDarkBlue, 91 | // ), 92 | // ) 93 | ], 94 | ), 95 | const Center( 96 | child: Padding( 97 | padding: EdgeInsets.all(2.0), 98 | child: SpaceLetter(name: 'DIVYAM',fontsize: 14,width: 200,height: 30, 99 | opacity: 0.4,iconsize: 20,), 100 | ), 101 | ), 102 | const SizedBox(height: 15,), 103 | Center( 104 | child: Padding( 105 | padding: const EdgeInsets.all(2.0), 106 | child: Container( 107 | height:6, 108 | width: 35, 109 | decoration: BoxDecoration( 110 | color: Colors.black26, 111 | borderRadius: BorderRadius.circular(12.0)), 112 | ), 113 | ), 114 | ), 115 | 116 | ], 117 | ), 118 | ), 119 | ), 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/screens/trending_nft.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:nft_marketplace/model/data.dart'; 5 | import 'package:nft_marketplace/utils/colors.dart'; 6 | var cardAspectRatio = 12.0 / 20.0; 7 | var widgetAspectRatio = cardAspectRatio * 2.5; 8 | class TrendingNft extends StatefulWidget { 9 | const TrendingNft({Key? key}) : super(key: key); 10 | 11 | @override 12 | _TrendingNftState createState() => _TrendingNftState(); 13 | } 14 | 15 | class _TrendingNftState extends State { 16 | var currentPage = images.length - 1.0; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | PageController controller = PageController(initialPage: images.length - 1); 21 | controller.addListener(() { 22 | setState(() { 23 | currentPage = controller.page!; 24 | }); 25 | }); 26 | 27 | return Stack( 28 | children: [ 29 | CardScrollWidget(currentPage), 30 | Positioned.fill( 31 | child: PageView.builder( 32 | itemCount: images.length, 33 | controller: controller, 34 | reverse: true, 35 | itemBuilder: (context, index) { 36 | return Container(); 37 | }, 38 | ), 39 | ) 40 | ], 41 | ); 42 | 43 | } 44 | } 45 | 46 | class CardScrollWidget extends StatelessWidget { 47 | var currentPage; 48 | var padding = 20.0; 49 | var verticalInset = 20.0; 50 | 51 | CardScrollWidget(this.currentPage); 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return AspectRatio( 56 | aspectRatio: widgetAspectRatio, 57 | child: LayoutBuilder(builder: (context, contraints) { 58 | var width = contraints.maxWidth; 59 | var height = contraints.maxHeight; 60 | 61 | var safeWidth = width - 2 * padding; 62 | var safeHeight = height - 2 * padding; 63 | 64 | var heightOfPrimaryCard = safeHeight; 65 | var widthOfPrimaryCard = heightOfPrimaryCard * cardAspectRatio; 66 | 67 | var primaryCardLeft = safeWidth - widthOfPrimaryCard; 68 | var horizontalInset = primaryCardLeft /1.7; 69 | 70 | List cardList = []; 71 | 72 | for (var i = 0; i < images.length; i++) { 73 | var delta = i - currentPage; 74 | bool isOnRight = delta > 0; 75 | 76 | var start = padding + 77 | max( 78 | primaryCardLeft - 79 | horizontalInset * -delta * (isOnRight ? 15 : 1), 80 | -10.0); 81 | 82 | var cardItem = Positioned.directional( 83 | top: padding + verticalInset * max(-delta, 0.0), 84 | bottom: padding + verticalInset * max(-delta, 0.0), 85 | start: start, 86 | textDirection: TextDirection.rtl, 87 | child: Container( 88 | decoration: BoxDecoration( 89 | borderRadius: BorderRadius.circular(10), 90 | boxShadow: const [ 91 | BoxShadow( 92 | color: Colors.black26, 93 | offset: Offset(3, 5), 94 | blurRadius: 2, 95 | ), 96 | ], 97 | ), 98 | child: AspectRatio( 99 | aspectRatio: cardAspectRatio, 100 | child: Stack( 101 | fit: StackFit.expand, 102 | children: [ 103 | Container( 104 | decoration: ShapeDecoration( 105 | // color: categoryBig!.bgColor, 106 | image: DecorationImage( 107 | image: NetworkImage(images[i]), 108 | fit: BoxFit.cover 109 | ), 110 | shape: const RoundedRectangleBorder( 111 | borderRadius: BorderRadius.all(Radius.circular(10)), 112 | side: BorderSide(color: wood_smoke, width: 2)),), 113 | ), 114 | // Align( 115 | // alignment: Alignment.bottomLeft, 116 | // child: Column( 117 | // mainAxisSize: MainAxisSize.min, 118 | // crossAxisAlignment: CrossAxisAlignment.start, 119 | // children: [ 120 | // Padding( 121 | // padding: EdgeInsets.symmetric( 122 | // horizontal: 16.0, vertical: 8.0), 123 | // child: Text(title[i], 124 | // style: TextStyle( 125 | // color: Colors.white, 126 | // fontSize: 25.0, 127 | // fontFamily: "SF-Pro-Text-Regular")), 128 | // ), 129 | // SizedBox( 130 | // height: 10.0, 131 | // ), 132 | // // Padding( 133 | // // padding: const EdgeInsets.only( 134 | // // left: 12.0, bottom: 12.0), 135 | // // child: Container( 136 | // // padding: EdgeInsets.symmetric( 137 | // // horizontal: 22.0, vertical: 6.0), 138 | // // decoration: BoxDecoration( 139 | // // color: Colors.blueAccent, 140 | // // borderRadius: BorderRadius.circular(20.0)), 141 | // // child: Text("Read Later", 142 | // // style: TextStyle(color: Colors.white)), 143 | // // ), 144 | // // ) 145 | // ], 146 | // ), 147 | // ) 148 | ], 149 | ), 150 | ), 151 | ), 152 | ); 153 | cardList.add(cardItem); 154 | } 155 | return Stack( 156 | children: cardList, 157 | ); 158 | }), 159 | ); 160 | } 161 | } -------------------------------------------------------------------------------- /lib/screens/collection_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_svg/flutter_svg.dart'; 5 | import 'package:nft_marketplace/model/nft_model.dart'; 6 | import 'package:nft_marketplace/utils/colors.dart'; 7 | import 'package:nft_marketplace/utils/hexcolor.dart'; 8 | import 'package:nft_marketplace/widgets/button_around.dart'; 9 | 10 | class CollectionPage extends StatefulWidget { 11 | const CollectionPage({Key? key}) : super(key: key); 12 | 13 | @override 14 | _CollectionPageState createState() => _CollectionPageState(); 15 | } 16 | 17 | class _CollectionPageState extends State { 18 | 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | var size = MediaQuery.of(context).size; 29 | double statusBarHeight = MediaQuery.of(context).padding.top; 30 | /*24 is for notification bar on Android*/ 31 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2; 32 | final double itemWidth = size.width / 2; 33 | 34 | return Scaffold( 35 | backgroundColor: Colors.grey.shade900, 36 | body: Stack( 37 | children: [ 38 | SingleChildScrollView( 39 | child: Column( 40 | children: [ 41 | Stack( 42 | alignment: Alignment.bottomCenter, 43 | children: [ 44 | Column( 45 | children: [ 46 | 47 | Container( 48 | height: 500, 49 | width: MediaQuery.of(context).size.width, 50 | color: flamingo, 51 | child: Image.network( 52 | "https://cdn.dribbble.com/users/43342/screenshots/10243567/media/ff3a06275f8af0e42fd629973dbda8e1.jpg?compress=1&resize=1600x1200", 53 | height: MediaQuery.of(context).size.height, 54 | width: MediaQuery.of(context).size.width, 55 | fit: BoxFit.cover, 56 | ), 57 | ), 58 | ], 59 | ), 60 | Container( 61 | height: 110, 62 | color: HexColor("#3A244E"), 63 | alignment: Alignment.center, 64 | width: MediaQuery.of(context).size.width, 65 | child: Text( 66 | " Universe \n Collection", 67 | textAlign: TextAlign.start, 68 | maxLines: 2, 69 | overflow: TextOverflow.ellipsis, 70 | style: TextStyle( 71 | color: white, 72 | fontSize: 36, 73 | fontWeight: FontWeight.bold), 74 | ), 75 | ), 76 | ], 77 | ), 78 | GridView.builder( 79 | padding: EdgeInsets.all(24), 80 | gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount( 81 | crossAxisCount: 2, 82 | crossAxisSpacing: 16, 83 | childAspectRatio: (1 / 1.7), 84 | ), 85 | controller: new ScrollController(keepScrollOffset: false), 86 | shrinkWrap: true, 87 | scrollDirection: Axis.vertical, 88 | itemCount: nftList.length, 89 | itemBuilder: (BuildContext context, int index) { 90 | return ShopGridItemWidget( 91 | nftModel: nftList[index], 92 | onTap: () { 93 | Navigator.pushNamed( 94 | context, "/shopping_detail_page_one"); 95 | }, 96 | ); 97 | }), 98 | ], 99 | ), 100 | ), 101 | Positioned( 102 | left: 24, 103 | top: kToolbarHeight + statusBarHeight-40, 104 | child: ButtonRoundWithShadow( 105 | size: 48, 106 | borderColor: wood_smoke, 107 | color: white.withOpacity(0.8), 108 | callback: () { 109 | Navigator.pop(context); 110 | }, 111 | shadowColor: wood_smoke, 112 | ), 113 | ) 114 | 115 | ], 116 | ), 117 | ); 118 | } 119 | } 120 | class ShopGridItemWidget extends StatelessWidget { 121 | final NftModel nftModel; 122 | final VoidCallback onTap; 123 | 124 | const ShopGridItemWidget({required this.nftModel, required this.onTap}); 125 | 126 | @override 127 | Widget build(BuildContext context) { 128 | return GestureDetector( 129 | onTap: onTap, 130 | child: Column( 131 | mainAxisSize: MainAxisSize.min, 132 | children: [ 133 | Container( 134 | width: MediaQuery.of(context).size.width, 135 | height: 170, 136 | decoration: ShapeDecoration( 137 | image: DecorationImage( 138 | image: NetworkImage(nftModel.nftImage), 139 | fit: BoxFit.cover, 140 | ), 141 | shape: RoundedRectangleBorder( 142 | borderRadius: BorderRadius.all(Radius.circular(16)), 143 | side: BorderSide(color: Colors.white, width: 2))), 144 | 145 | ), 146 | SizedBox( 147 | height: 2, 148 | ), 149 | Container( 150 | alignment: Alignment.centerLeft, 151 | child: Text( 152 | nftModel.nftName, 153 | maxLines: 2, 154 | textAlign: TextAlign.start, 155 | overflow: TextOverflow.ellipsis, 156 | style: TextStyle( 157 | color:Colors.white, fontSize: 17, fontWeight: FontWeight.bold), 158 | ), 159 | ), 160 | SizedBox( 161 | height: 2, 162 | ), 163 | Container( 164 | alignment: Alignment.centerLeft, 165 | child: Text( 166 | "Eth ${nftModel.price}", 167 | textAlign: TextAlign.start, 168 | overflow: TextOverflow.ellipsis, 169 | maxLines: 1, 170 | style: TextStyle( 171 | color: Colors.white, fontSize: 18, fontWeight: FontWeight.w800), 172 | ), 173 | ), 174 | ], 175 | ), 176 | ); 177 | } 178 | } -------------------------------------------------------------------------------- /lib/animations/siwpe_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/physics.dart'; 3 | // TODO: Swipe to start animation 4 | enum SwipePosition { 5 | SwipeLeft, 6 | SwipeRight, 7 | } 8 | 9 | class SwipeButton extends StatefulWidget { 10 | SwipeButton({ 11 | Key ? key, 12 | this.thumb, 13 | this.content, 14 | BorderRadius ? borderRadius, 15 | this.initialPosition , 16 | required this.onChanged, 17 | this.height = 60.0, 18 | this.thumbColor, 19 | this.rectColor, 20 | }) : 21 | this.borderRadius = borderRadius ?? BorderRadius.zero, 22 | super(key: key); 23 | 24 | final Widget ?thumb; 25 | final Widget ? content; 26 | final BorderRadius ? borderRadius; 27 | final double ? height; 28 | final SwipePosition ? initialPosition; 29 | final Color ? thumbColor; 30 | final Color ? rectColor; 31 | late ValueChanged onChanged; 32 | 33 | @override 34 | SwipeButtonState createState() => SwipeButtonState(); 35 | } 36 | 37 | class SwipeButtonState extends State 38 | with SingleTickerProviderStateMixin { 39 | final GlobalKey _containerKey = GlobalKey(); 40 | final GlobalKey _positionedKey = GlobalKey(); 41 | 42 | late AnimationController _controller; 43 | late Animation _contentAnimation; 44 | Offset _start = Offset.zero; 45 | 46 | get _positioned => _positionedKey.currentContext!.findRenderObject(); 47 | 48 | get _container => _containerKey.currentContext!.findRenderObject(); 49 | 50 | @override 51 | void initState() { 52 | super.initState(); 53 | 54 | _controller = AnimationController.unbounded(vsync: this); 55 | _contentAnimation = Tween(begin: 1.0, end: 0.0).animate( 56 | CurvedAnimation(parent: _controller, curve: Curves.easeOut), 57 | ); 58 | 59 | if (widget.initialPosition == SwipePosition.SwipeRight) { 60 | // widget.initialPosition=SwipePosition.SwipeRight; 61 | _controller.value = 1.0; 62 | } 63 | 64 | } 65 | 66 | @override 67 | void dispose() { 68 | 69 | _controller.dispose(); 70 | super.dispose(); 71 | } 72 | 73 | @override 74 | Widget build(BuildContext context) { 75 | final theme = Theme.of(context); 76 | return SizedBox( 77 | width: 240, 78 | height: widget.height, 79 | child: Stack( 80 | key: _containerKey, 81 | children: [ 82 | DecoratedBox( 83 | decoration: BoxDecoration( 84 | color:Colors.black.withOpacity(0.6), 85 | borderRadius: BorderRadius.circular(50), 86 | boxShadow: const [ 87 | BoxShadow( 88 | color: Colors.black12, 89 | offset: Offset(3, 5), 90 | blurRadius: 2, 91 | ), 92 | ], 93 | ), 94 | child: ClipRRect( 95 | clipper: _SwipeButtonClipper( 96 | animation: _controller, 97 | borderRadius: widget.borderRadius!, 98 | position: widget.initialPosition, 99 | ), 100 | borderRadius: widget.borderRadius, 101 | child: SizedBox.expand( 102 | child: Padding( 103 | padding: EdgeInsets.only(left: widget.height!), 104 | child: FadeTransition( 105 | opacity: _contentAnimation, 106 | child: widget.content, 107 | ), 108 | ), 109 | ), 110 | ), 111 | ), 112 | AnimatedBuilder( 113 | animation: _controller, 114 | builder: (BuildContext context, child) { 115 | return Align( 116 | alignment: Alignment((_controller.value * 2.0) - 1.0, 0.0), 117 | child: child, 118 | ); 119 | }, 120 | child: GestureDetector( 121 | onHorizontalDragStart: _onDragStart, 122 | onHorizontalDragUpdate: _onDragUpdate, 123 | onHorizontalDragEnd: _onDragEnd, 124 | child: Container( 125 | key: _positionedKey, 126 | width: widget.height, 127 | height: widget.height, 128 | decoration: BoxDecoration( 129 | color:Colors.black.withOpacity(0.2), 130 | borderRadius: BorderRadius.circular(50), 131 | ), 132 | child: widget.thumb, 133 | ), 134 | ), 135 | ), 136 | ], 137 | ), 138 | ); 139 | } 140 | 141 | void _onDragStart(DragStartDetails details) { 142 | final pos = _positioned.globalToLocal(details.globalPosition); 143 | _start = Offset(pos.dx, 0.0); 144 | _controller.stop(canceled: true); 145 | } 146 | 147 | void _onDragUpdate(DragUpdateDetails details) { 148 | final pos = _container.globalToLocal(details.globalPosition) - _start; 149 | final extent = _container.size.width - _positioned.size.width; 150 | _controller.value = (pos.dx.clamp(0.0, extent) / extent); 151 | } 152 | 153 | void _onDragEnd(DragEndDetails details) { 154 | final extent = _container.size.width - _positioned.size.width; 155 | var fractionalVelocity = (details.primaryVelocity !/ extent).abs(); 156 | if (fractionalVelocity < 0.5) { 157 | fractionalVelocity = 0.5; 158 | } 159 | SwipePosition ?result; 160 | double ? acceleration, velocity; 161 | if (_controller.value > 0.5) { 162 | acceleration = 0.5; 163 | velocity = fractionalVelocity; 164 | result = SwipePosition.SwipeRight; 165 | } 166 | // else { 167 | // acceleration = -0.5; 168 | // velocity = -fractionalVelocity; 169 | // // result = SwipePosition.SwipeLeft; 170 | // } 171 | final simulation = _SwipeSimulation( 172 | acceleration!, 173 | _controller.value, 174 | 1.0, 175 | velocity!, 176 | ); 177 | _controller.animateWith(simulation).then((_) { 178 | if (widget.onChanged != null) { 179 | widget.onChanged(result!); 180 | 181 | } 182 | }); 183 | } 184 | } 185 | 186 | class _SwipeSimulation extends GravitySimulation { 187 | _SwipeSimulation( 188 | double acceleration, double distance, double endDistance, double velocity) 189 | : super(acceleration, distance, endDistance, velocity); 190 | 191 | @override 192 | double x(double time) => super.x(time).clamp(0.0, 1.0); 193 | 194 | @override 195 | bool isDone(double time) { 196 | final _x = x(time).abs(); 197 | return _x <= 0.0 || _x >= 1.0; 198 | } 199 | } 200 | 201 | class _SwipeButtonClipper extends CustomClipper { 202 | const _SwipeButtonClipper({ 203 | required this.animation, 204 | required this.borderRadius, 205 | this.position, 206 | }) : assert(animation != null && borderRadius != null), 207 | super(reclip: animation); 208 | 209 | final Animation animation; 210 | final BorderRadius borderRadius; 211 | final SwipePosition ? position; 212 | 213 | @override 214 | RRect getClip(Size size) { 215 | return borderRadius.toRRect( 216 | Rect.fromLTRB( 217 | size.width * animation.value, 218 | 0.0, 219 | size.width, 220 | size.height, 221 | ), 222 | ); 223 | } 224 | 225 | @override 226 | bool shouldReclip(_SwipeButtonClipper oldClipper) => true; 227 | } -------------------------------------------------------------------------------- /lib/widgets/home_cardpage.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:nft_marketplace/utils/colors.dart'; 6 | import 'package:nft_marketplace/widgets/button_plain.dart'; 7 | 8 | class ShoppingCardPager extends StatefulWidget { 9 | const ShoppingCardPager({Key? key}) : super(key: key); 10 | 11 | @override 12 | _ShoppingCardPagerState createState() => _ShoppingCardPagerState(); 13 | } 14 | 15 | class _ShoppingCardPagerState extends State with SingleTickerProviderStateMixin{ 16 | late PageController _pageController=PageController(initialPage: currentPageValue); 17 | late AnimationController animationController; 18 | late Animation animation; 19 | int photoindex=0; 20 | 21 | int currentPageValue = 0; 22 | int previousPageValue = 0; 23 | double _moveBar = 0.0; 24 | final List _cards = [ 25 | const ShoppingCardPagerItem( 26 | categoryBig: CategoryBig( 27 | bgColor: lightening_yellow, 28 | startColor: lightening_yellow, 29 | name: "Tree \nof knowing", 30 | image: "https://cdn.dribbble.com/users/518045/screenshots/11110738/media/0621dc7bcd342843ae4bb0e3edb8f40a.png?compress=1&resize=800x600"), 31 | ), 32 | const ShoppingCardPagerItem( 33 | categoryBig: CategoryBig( 34 | bgColor: lightening_yellow, 35 | startColor: lightening_yellow, 36 | name: "Summer \nCollection", 37 | image: "https://cdn.dribbble.com/users/15687/screenshots/15964521/media/48a340f7e09af0a5e69dec80c540cdd6.png?compress=1&resize=1600x1200"), 38 | ), 39 | const ShoppingCardPagerItem( 40 | categoryBig: CategoryBig( 41 | bgColor: lightening_yellow, 42 | startColor: lightening_yellow, 43 | name: "Bitcoin \nCollection", 44 | image: "https://cdn.dribbble.com/users/720738/screenshots/6678628/spot_zidler_dribbble_lance_pierre.gif"), 45 | ), 46 | const ShoppingCardPagerItem( 47 | categoryBig: CategoryBig( 48 | bgColor: lightening_yellow, 49 | startColor: lightening_yellow, 50 | name: "Tee \ntrump", 51 | image: "https://cdn.dribbble.com/users/31664/screenshots/9524209/media/5a169ecbbfc9a1b0c06d8c395552dc8f.gif"), 52 | ), 53 | const ShoppingCardPagerItem( 54 | categoryBig: CategoryBig( 55 | bgColor: lightening_yellow, 56 | startColor: lightening_yellow, 57 | name: "Huhu \nMask", 58 | image: "https://cdn.dribbble.com/users/15687/screenshots/10953972/media/eace818c852528e3745c16fa6b7e1c7d.png?compress=1&resize=1600x1200"), 59 | ) 60 | ]; 61 | 62 | @override 63 | void initState() { 64 | super.initState(); 65 | 66 | Timer.periodic(Duration(seconds: 5), (Timer timer) { 67 | if (currentPageValue < _cards.length) { 68 | currentPageValue++; 69 | } else { 70 | currentPageValue = 0; 71 | } 72 | 73 | _pageController.animateToPage( 74 | currentPageValue, 75 | duration: Duration(milliseconds: 350), 76 | curve: Curves.easeInSine, 77 | ); 78 | }); 79 | } 80 | @override 81 | void dispose() { 82 | _pageController.dispose(); 83 | super.dispose(); 84 | } 85 | 86 | @override 87 | Widget build(BuildContext context) { 88 | return Column( 89 | children: [ 90 | Container( 91 | height: 180, 92 | padding: EdgeInsets.symmetric(horizontal: 16), 93 | child: PageView.builder( 94 | physics: ClampingScrollPhysics(), 95 | itemBuilder: (context, index) { 96 | return _cards[index]; 97 | }, 98 | onPageChanged: (int page) { 99 | animatePage(page); 100 | }, 101 | itemCount: _cards.length, 102 | controller: _pageController, 103 | ), 104 | ), 105 | Padding( 106 | padding: const EdgeInsets.only(left: 24.0,right: 24,top: 24,bottom: 2), 107 | child: Row( 108 | mainAxisAlignment: MainAxisAlignment.center, 109 | children: [ 110 | for (int i = 0; i < _cards.length; i++) 111 | if (i == currentPageValue) ...[ 112 | const CircleDotWidget( 113 | isActive: true, 114 | color: flamingo, 115 | borderColor: flamingo, 116 | ) 117 | ] else 118 | const CircleDotWidget( 119 | isActive: false, 120 | color: white, 121 | borderColor: wood_smoke, 122 | ), 123 | ], 124 | ), 125 | ), 126 | ], 127 | ); 128 | } 129 | 130 | void animatePage(int page) { 131 | print('page is $page'); 132 | 133 | currentPageValue = page; 134 | 135 | if (previousPageValue == 0) { 136 | previousPageValue = currentPageValue; 137 | _moveBar = _moveBar + 0.14; 138 | } else { 139 | if (previousPageValue < currentPageValue) { 140 | previousPageValue = currentPageValue; 141 | _moveBar = _moveBar + 0.14; 142 | } else { 143 | previousPageValue = currentPageValue; 144 | _moveBar = _moveBar - 0.14; 145 | } 146 | } 147 | 148 | setState(() { 149 | 150 | }); 151 | } 152 | } 153 | class ShoppingCardPagerItem extends StatelessWidget { 154 | final CategoryBig? categoryBig; 155 | 156 | const ShoppingCardPagerItem({this.categoryBig}); 157 | 158 | @override 159 | Widget build(BuildContext context) { 160 | return Container( 161 | margin: EdgeInsets.symmetric(horizontal: 8), 162 | decoration: ShapeDecoration( 163 | // color: categoryBig!.bgColor, 164 | image: DecorationImage( 165 | image: NetworkImage(categoryBig!.image), 166 | fit: BoxFit.cover 167 | ), 168 | shape: RoundedRectangleBorder( 169 | borderRadius: BorderRadius.all(Radius.circular(16)), 170 | side: BorderSide(color: wood_smoke, width: 2))), 171 | child: Row( 172 | children: [ 173 | Expanded( 174 | flex: 4, 175 | child: Column( 176 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 177 | crossAxisAlignment: CrossAxisAlignment.start, 178 | children: [ 179 | Padding( 180 | padding: const EdgeInsets.only(left: 15.0, top: 24), 181 | child: Text( 182 | categoryBig!.name, 183 | maxLines: 2, 184 | overflow: TextOverflow.ellipsis, 185 | style: const TextStyle( 186 | color: wood_smoke, 187 | fontSize: 22, 188 | fontWeight: FontWeight.w800), 189 | ), 190 | ), 191 | Padding( 192 | padding: const EdgeInsets.only(left: 15.0, bottom: 24), 193 | child: ButtonPlain( 194 | color: wood_smoke, 195 | borderColor: wood_smoke, 196 | textColor: white, 197 | text: "Buy now", 198 | size: 96, 199 | onTap: () { 200 | Navigator.pushNamed(context, "/collection"); 201 | }, 202 | ), 203 | ) 204 | ], 205 | ), 206 | ), 207 | // Expanded( 208 | // flex: 4, 209 | // child: SvgPicture.asset( 210 | // categoryBig.image, 211 | // width: 210, 212 | // height: 230, 213 | // ), 214 | // ), 215 | ], 216 | ), 217 | ); 218 | } 219 | } 220 | 221 | class Category { 222 | final String name; 223 | final Color? bgColor; 224 | final Color startColor; 225 | 226 | const Category({required this.name, required this.startColor, this.bgColor}); 227 | } 228 | 229 | class CategoryBig { 230 | final String name; 231 | final String image; 232 | final Color bgColor; 233 | final Color startColor; 234 | 235 | const CategoryBig({required this.name, required this.image, required this.startColor, required this.bgColor}); 236 | } 237 | 238 | 239 | class CircleDotWidget extends StatelessWidget { 240 | final bool isActive; 241 | final Color color; 242 | final Color borderColor; 243 | 244 | const CircleDotWidget({required this.isActive, required this.color, required this.borderColor}); 245 | 246 | @override 247 | Widget build(BuildContext context) { 248 | return AnimatedContainer( 249 | duration: Duration(milliseconds: 150), 250 | margin: EdgeInsets.symmetric(horizontal: 8), 251 | height: isActive ? 14 : 10, 252 | width: isActive ? 14 : 10, 253 | decoration: BoxDecoration( 254 | border: Border.all(width: 2.0, color: borderColor), 255 | color: color, 256 | shape: BoxShape.circle), 257 | ); 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /lib/widgets/bottom_sheet_buy.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:math'; 3 | import 'dart:ui'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:nft_marketplace/animations/siwpe_button.dart'; 6 | import 'package:nft_marketplace/screens/balance.dart'; 7 | import 'package:nft_marketplace/utils/colors.dart'; 8 | import 'package:nft_marketplace/widgets/balance_card.dart'; 9 | import 'package:nft_marketplace/widgets/button_plain.dart'; 10 | import 'package:confetti/confetti.dart'; 11 | class NftBuyButton extends StatefulWidget { 12 | String text; 13 | double price; 14 | NftBuyButton({Key? key,required this.text, required this.price}) : super(key: key); 15 | 16 | @override 17 | State createState() => _NftBuyButtonState(); 18 | } 19 | 20 | class _NftBuyButtonState extends State { 21 | late ConfettiController _controllerCenter; 22 | @override 23 | void initState() { 24 | _controllerCenter = 25 | ConfettiController(duration: const Duration(seconds: 4)); 26 | super.initState(); 27 | } 28 | /// A custom Path to paint stars. 29 | Path drawStar(Size size) { 30 | // Method to convert degree to radians 31 | double degToRad(double deg) => deg * (pi / 180.0); 32 | 33 | const numberOfPoints = 5; 34 | final halfWidth = size.width / 2; 35 | final externalRadius = halfWidth; 36 | final internalRadius = halfWidth / 2.5; 37 | final degreesPerStep = degToRad(360 / numberOfPoints); 38 | final halfDegreesPerStep = degreesPerStep / 2; 39 | final path = Path(); 40 | final fullAngle = degToRad(360); 41 | path.moveTo(size.width, halfWidth); 42 | 43 | for (double step = 0; step < fullAngle; step += degreesPerStep) { 44 | path.lineTo(halfWidth + externalRadius * cos(step), 45 | halfWidth + externalRadius * sin(step)); 46 | path.lineTo(halfWidth + internalRadius * cos(step + halfDegreesPerStep), 47 | halfWidth + internalRadius * sin(step + halfDegreesPerStep)); 48 | } 49 | path.close(); 50 | return path; 51 | } 52 | 53 | @override 54 | void dispose() { 55 | _controllerCenter.dispose(); 56 | super.dispose(); 57 | 58 | } 59 | @override 60 | Widget build(BuildContext context) { 61 | final textStyle = Theme.of(context).textTheme.bodyText1!.copyWith( 62 | color: Colors.white70, 63 | ); 64 | return Container( 65 | child: Padding( 66 | padding: const EdgeInsets.only(left: 0, bottom: 0,top: 8), 67 | child: ButtonPlain( 68 | color: wood_smoke, 69 | borderColor: wood_smoke, 70 | textColor: white, 71 | text: widget.text, 72 | size: 96, 73 | onTap: () { 74 | showModalBottomSheet( 75 | context: context, 76 | backgroundColor: Colors.transparent, 77 | shape: const RoundedRectangleBorder( 78 | borderRadius: BorderRadius.only(topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)), 79 | ), 80 | builder: (context) { 81 | return Padding( 82 | padding: const EdgeInsets.all(8.0), 83 | child: ClipRRect( 84 | borderRadius: const BorderRadius.only( 85 | bottomLeft: Radius.circular(15), 86 | bottomRight: Radius.circular(15), 87 | ), 88 | child: Container( 89 | height: 400, 90 | 91 | decoration: BoxDecoration( 92 | color: Colors.grey.shade900, 93 | // image: const DecorationImage( 94 | // image: NetworkImage("https://cdn.dribbble.com/users/2443968/screenshots/7027843/media/5f573e7904313c85d575f014d74bb99a.jpg?compress=1&resize=800x600"), 95 | // fit: BoxFit.cover, 96 | // ), 97 | borderRadius: BorderRadius.circular(15), 98 | ), 99 | child: BackdropFilter( 100 | filter: ImageFilter.blur( 101 | sigmaX: .0, 102 | sigmaY: .0, 103 | ), 104 | child: Column( 105 | // crossAxisAlignment: CrossAxisAlignment.start, 106 | //mainAxisAlignment: MainAxisAlignment.start, 107 | // mainAxisSize: MainAxisSize.min, 108 | children: [ 109 | SizedBox(height: 10,), 110 | Row( 111 | // crossAxisAlignment: CrossAxisAlignment.start, 112 | // mainAxisAlignment: MainAxisAlignment.start, 113 | children: [ 114 | Padding( 115 | padding: const EdgeInsets.only(top:8.0), 116 | child: BalanceCard(onItemPressed: (){},), 117 | ), 118 | 119 | ], 120 | ), 121 | Align( 122 | alignment: Alignment.center, 123 | child: ConfettiWidget( 124 | confettiController: _controllerCenter, 125 | blastDirectionality: BlastDirectionality 126 | .explosive, // don't specify a direction, blast randomly 127 | shouldLoop: 128 | true, // start again as soon as the animation is finished 129 | colors: const [ 130 | Colors.green, 131 | Colors.blue, 132 | Colors.pink, 133 | Colors.orange, 134 | Colors.purple 135 | ], // manually specify the colors to be used 136 | createParticlePath: drawStar, // define a custom shape/path. 137 | ), 138 | ), 139 | SizedBox(height: 10,), 140 | Text('Buy Nft At'.toUpperCase(), style: textStyle), 141 | Row( 142 | crossAxisAlignment: CrossAxisAlignment.center, 143 | mainAxisAlignment: MainAxisAlignment.center, 144 | children: [ 145 | Container( 146 | height:30, 147 | width: 40, 148 | child: Image.network("https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Ethereum_logo_2014.svg/1257px-Ethereum_logo_2014.svg.png")), 149 | Text( 150 | "${widget.price}", 151 | style: TextStyle( 152 | fontSize: 47, 153 | color: Colors.grey.withOpacity(0.5), 154 | fontWeight: FontWeight.w300, 155 | ) 156 | ), 157 | ], 158 | ), 159 | Center( 160 | child: Padding( 161 | padding: const EdgeInsets.all(20.0), 162 | child: SwipeButton( 163 | initialPosition: SwipePosition.SwipeLeft, 164 | thumb: Padding( 165 | padding: const EdgeInsets.all(5.0), 166 | child:Image.asset("assets/coin.png"), 167 | 168 | ), 169 | content: Center( 170 | child: Row( 171 | children: [ 172 | SizedBox(width: 10,), 173 | const Text( 174 | "Swipe to Buy", 175 | style: TextStyle( 176 | color: Colors.white, 177 | fontSize: 18 178 | ), 179 | ), 180 | SizedBox(width: 10,), 181 | Padding( 182 | padding: const EdgeInsets.all(5.0), 183 | child: Image.asset("assets/pay.png"), 184 | ) 185 | ], 186 | ), 187 | ), 188 | onChanged: (result){ 189 | _controllerCenter.play(); 190 | Timer(Duration(seconds:3), (){ 191 | Navigator.of(context).pop(); 192 | }); 193 | 194 | }, 195 | 196 | ), 197 | ), 198 | ), 199 | ], 200 | ), 201 | ), 202 | ), 203 | ), 204 | ); 205 | }); 206 | }, 207 | ), 208 | ) , 209 | ); 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /lib/screens/nft_art.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:nft_marketplace/animations/letter_spacing.dart'; 5 | import 'package:nft_marketplace/model/nft_model.dart'; 6 | import 'package:nft_marketplace/screens/detail_page.dart'; 7 | import 'package:nft_marketplace/utils/colors.dart'; 8 | import 'package:nft_marketplace/widgets/bottom_sheet_buy.dart'; 9 | import 'package:nft_marketplace/widgets/button_plain.dart'; 10 | import 'package:nft_marketplace/widgets/video_player.dart'; 11 | class NftArtList extends StatelessWidget { 12 | final NftModel nftModel; 13 | 14 | const NftArtList({Key? key, required this.nftModel}) : super(key: key); 15 | @override 16 | Widget build(BuildContext context) { 17 | var textTheme = Theme.of(context).textTheme; 18 | return Padding( 19 | padding: const EdgeInsets.all(18.0), 20 | child: GestureDetector( 21 | onTap: () { 22 | // Navigator.push( 23 | // context, 24 | // MaterialPageRoute( 25 | // builder: (context) => HeroDetail()), 26 | // ); 27 | }, 28 | child: Center( 29 | child: Stack( 30 | children: [ 31 | InkWell( 32 | onDoubleTap: (){ 33 | Navigator.of(context).push( 34 | PageRouteBuilder( 35 | transitionDuration: Duration(milliseconds: 1000), 36 | pageBuilder: ( 37 | BuildContext context, 38 | Animation animation, 39 | Animation secondaryAnimation) { 40 | return DetailPage(image: nftModel.nftImage,video1: nftModel.video,videourl: nftModel.nftVideo, 41 | price: nftModel.price,username: nftModel.userName,name:nftModel.nftName ,); 42 | }, 43 | transitionsBuilder: ( 44 | BuildContext context, 45 | Animation animation, 46 | Animation secondaryAnimation, 47 | Widget child) { 48 | return Align( 49 | child: FadeTransition( 50 | opacity: animation, 51 | child: child, 52 | ), 53 | ); 54 | }, 55 | ), 56 | ); 57 | }, 58 | onTap: (){ 59 | Navigator.of(context).push( 60 | PageRouteBuilder( 61 | transitionDuration: Duration(milliseconds: 1000), 62 | pageBuilder: ( 63 | BuildContext context, 64 | Animation animation, 65 | Animation secondaryAnimation) { 66 | return DetailPage(image: nftModel.nftImage,video1: nftModel.video,videourl: nftModel.nftVideo, 67 | price: nftModel.price,username: nftModel.userName,name:nftModel.nftName ,); 68 | }, 69 | transitionsBuilder: ( 70 | BuildContext context, 71 | Animation animation, 72 | Animation secondaryAnimation, 73 | Widget child) { 74 | return Align( 75 | child: FadeTransition( 76 | opacity: animation, 77 | child: child, 78 | ), 79 | ); 80 | }, 81 | ), 82 | ); 83 | // Navigator.push(context, MaterialPageRoute(builder: (_)=>DetailPage(image: nftModel.nftImage,))); 84 | }, 85 | child: Hero( 86 | tag: "haaa", 87 | child: Container( 88 | 89 | height: 350, 90 | width: 350, 91 | decoration: BoxDecoration( 92 | image: DecorationImage( 93 | image: NetworkImage(nftModel.nftImage), 94 | fit: BoxFit.cover, 95 | ), 96 | borderRadius: BorderRadius.circular(11), 97 | ), 98 | child: Padding( 99 | padding: EdgeInsets.all(8.0), 100 | child: Align( 101 | alignment: Alignment.topLeft, 102 | child: SpaceLetter(name: nftModel.userName,opacity: 0.6,height: 20, 103 | width: 220,fontsize: 12,iconsize: 15,), 104 | ), 105 | ), 106 | ) 107 | ), 108 | ), 109 | Positioned( 110 | height: 100, 111 | width: 350, 112 | bottom: 0, 113 | child: ClipRRect( 114 | borderRadius: const BorderRadius.only( 115 | bottomLeft: Radius.circular(11), 116 | bottomRight: Radius.circular(11), 117 | ), 118 | child: BackdropFilter( 119 | filter: ImageFilter.blur( 120 | sigmaX: 16, 121 | sigmaY: 16, 122 | ), 123 | child: Container( 124 | color: Colors.grey[600]!.withOpacity(0.5), 125 | ), 126 | ), 127 | ), 128 | ), 129 | Positioned( 130 | bottom: 10, 131 | child: Padding( 132 | padding: const EdgeInsets.all(0.0), 133 | child: Column( 134 | crossAxisAlignment: CrossAxisAlignment.start, 135 | children: [ 136 | Padding( 137 | padding: const EdgeInsets.only(left: 8.0,right:0,bottom: 0,top: 8), 138 | child: Text( 139 | nftModel.nftName, 140 | style: textTheme.subtitle1!.copyWith( 141 | color: Colors.white, 142 | fontFamily: 'WorkSans', 143 | fontWeight: FontWeight.w600, 144 | ), 145 | ), 146 | ), 147 | //Ymargin(4), 148 | Container( 149 | 150 | height: 60, 151 | width: MediaQuery.of(context).size.width, 152 | child: Row( 153 | // crossAxisAlignment: CrossAxisAlignment.end, 154 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 155 | children: [ 156 | Padding( 157 | padding: const EdgeInsets.only(left: 0.0,right:0,bottom: 0,top: 8), 158 | child: Container( 159 | decoration: BoxDecoration( 160 | borderRadius: const BorderRadius.only( 161 | bottomRight:Radius.circular(12),topRight: Radius.circular(12)), 162 | color: Colors.black.withOpacity(0.2), 163 | ), 164 | child: Padding( 165 | padding: const EdgeInsets.only(left: 8.0,right:8,bottom: 2,top: 4), 166 | child: Column( 167 | children: [ 168 | Center( 169 | child: Text( 170 | 171 | nftModel.sellType, 172 | style: textTheme.caption!.copyWith( 173 | color: Colors.white, 174 | fontFamily: 'WorkSans', 175 | ), 176 | ), 177 | ), 178 | Row( 179 | children: [ 180 | Container( 181 | height:30, 182 | width: 40, 183 | child: Image.network("https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Ethereum_logo_2014.svg/1257px-Ethereum_logo_2014.svg.png")), 184 | Text( 185 | 186 | "${nftModel.price}", 187 | style: textTheme.caption!.copyWith( 188 | color: Colors.white, 189 | fontFamily: 'WorkSans', 190 | fontSize: 23 191 | ), 192 | 193 | ), 194 | ], 195 | ) 196 | ], 197 | ), 198 | ), 199 | ), 200 | ), 201 | SizedBox(width: 100,), 202 | NftBuyButton(text: nftModel.buttonType,price:nftModel.price), 203 | 204 | 205 | ], 206 | ), 207 | ), 208 | ], 209 | ), 210 | ), 211 | ), 212 | ], 213 | ), 214 | ), 215 | ), 216 | ); 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /lib/screens/profile_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nft_marketplace/screens/balance.dart'; 3 | 4 | 5 | class SecondScreen extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | backgroundColor: Colors.transparent, 10 | body: LayoutBuilder( 11 | builder: (context, constraints) { 12 | return Container( 13 | child: TweenAnimationBuilder( 14 | tween: Tween(begin: 0.0, end: 1.0), 15 | duration: Duration(milliseconds: 1500), 16 | builder: (context,value, child) { 17 | var v; 18 | if(value!=null){ 19 | v=value; 20 | 21 | } 22 | return ShaderMask( 23 | shaderCallback: (rect) { 24 | return RadialGradient( 25 | radius:v*5 , colors: [Colors.white, Colors.white, Colors.transparent, Colors.transparent], stops: [0.0, 0.55, 0.6, 1.0], 26 | center: FractionalOffset(0.95, 0.0)) 27 | .createShader(rect); 28 | }, 29 | child: PageContent()); 30 | }), 31 | ); 32 | }, 33 | )); 34 | } 35 | } 36 | 37 | final data = [ 38 | {"banner": "apex_banner", "title": "Youtube", "message": "Welcome to Youtube"}, 39 | {"banner": "destiny_banner", "title": "Stadia", "message": "Stadia Community Forums"}, 40 | {"banner": "pubg_banner", "title": "Youtube", "message": "PUBG Events"} 41 | ]; 42 | 43 | 44 | class PageContent extends StatefulWidget { 45 | const PageContent({Key? key}) : super(key: key); 46 | 47 | @override 48 | _PageContentState createState() => _PageContentState(); 49 | } 50 | 51 | class _PageContentState extends State { 52 | List numberAsList = []; 53 | 54 | String money = '20'; 55 | 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return Scaffold( 60 | backgroundColor: Colors.grey.shade900, 61 | appBar: AppBar( 62 | leading: IconButton( 63 | onPressed: (){ 64 | Navigator.of(context).pop(); 65 | }, 66 | icon: Icon(Icons.arrow_back) 67 | ), 68 | elevation: 0, 69 | title: Text("Profile"), 70 | backgroundColor: Colors.grey.shade900, 71 | ), 72 | body: body(), 73 | ); 74 | } 75 | 76 | 77 | 78 | 79 | Widget body(){ 80 | return Column( 81 | children: [ 82 | BankApp(), 83 | moneyWidget(), 84 | keypadWidget(), 85 | // button(), 86 | ], 87 | ); 88 | } 89 | 90 | Widget userTile(){ 91 | return ListTile( 92 | leading: CircleAvatar( 93 | backgroundImage: NetworkImage("sadb"), 94 | ), 95 | title: Txt( 96 | text: "Jane Foster", 97 | color: Colors.white, 98 | fontWeight: FontWeight.bold, 99 | ), 100 | subtitle: cardWithNumber(), 101 | trailing: IconButton( 102 | icon: Icon(Icons.arrow_forward_ios,color: Colors.white, size: 18), 103 | onPressed: (){ 104 | 105 | } 106 | ), 107 | ); 108 | } 109 | 110 | 111 | Widget cardWithNumber(){ 112 | return Row( 113 | children: [ 114 | Icon(Icons.credit_card, color: Colors.grey,size:18), 115 | Txt( 116 | text: " **** 5064", 117 | // text: "98765432105064".replaceRange(0,10," **** "), 118 | color: Colors.grey 119 | ), 120 | ], 121 | ); 122 | // return RichText( this alignment is not satisfying 123 | // text: TextSpan( 124 | // children: [ 125 | // WidgetSpan( 126 | // child: Icon(Icons.credit_card, color: Colors.grey), 127 | // ), 128 | // TextSpan( 129 | // text: "98765432105064".replaceRange(0,10,"****"), 130 | // ), 131 | // ] 132 | // ), 133 | // ); 134 | } 135 | 136 | 137 | Widget moneyWidget(){ 138 | return 139 | Padding( 140 | padding: const EdgeInsets.symmetric(vertical:2), 141 | child: RichText( 142 | //$ 143 | text: TextSpan( 144 | text: '\$', 145 | style: TextStyle( 146 | fontSize: 60, 147 | color: Colors.grey.withOpacity(0.5), 148 | fontWeight: FontWeight.w300, 149 | ), 150 | children: [ 151 | //20 152 | TextSpan( 153 | text: money, 154 | style: TextStyle( 155 | fontSize: 60, 156 | color: Colors.white, 157 | fontWeight: FontWeight.w400, 158 | ), 159 | ), 160 | //.0 161 | if(money!='') TextSpan( 162 | text: '.0', 163 | style: TextStyle( 164 | fontSize: 60, 165 | color: Colors.grey.withOpacity(0.5), 166 | fontWeight: FontWeight.w300, 167 | ) 168 | ), 169 | ], 170 | ) 171 | ), 172 | ); 173 | } 174 | 175 | 176 | 177 | Widget keypadWidget(){ 178 | return Flexible( 179 | child: GridView.builder( 180 | padding: EdgeInsets.symmetric( 181 | horizontal: 40, 182 | ), 183 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 184 | crossAxisCount: 3, 185 | childAspectRatio: 1.5, 186 | crossAxisSpacing: 8, 187 | mainAxisSpacing: 8, 188 | ), 189 | itemCount: numbers.length, 190 | itemBuilder: (BuildContext context, int index) { 191 | int number = numbers[index]; 192 | if(index==9) return Container(height:0,width:0); 193 | return InkWell( 194 | borderRadius: BorderRadius.circular(360), 195 | onTap: (){ 196 | if(index==11){ 197 | try { 198 | 199 | setState(()=>money = money.replaceRange(money.length-1, money.length,'')); 200 | } catch (e) { 201 | print("Error removing $e"); 202 | } 203 | }else{ 204 | setState(()=>money = '$money$number'); 205 | } 206 | }, 207 | child: Container( 208 | child: index==11? Icon(Icons.backspace,color: Colors.grey): 209 | Txt( 210 | text: number, 211 | color: Colors.white, 212 | ), 213 | alignment: Alignment.center, 214 | decoration: BoxDecoration( 215 | color: Colors.black38, 216 | shape: BoxShape.circle, 217 | ), 218 | ), 219 | ); 220 | }, 221 | ), 222 | ); 223 | } 224 | 225 | Widget button(){ 226 | return Padding( 227 | padding: const EdgeInsets.symmetric(horizontal:60,vertical:100), 228 | child: Container( 229 | height: 55, 230 | width: double.maxFinite, 231 | alignment: Alignment.center, 232 | child: const Txt( 233 | text: "Transfer to Jane", 234 | fontWeight: FontWeight.w600, 235 | color: Colors.white, 236 | ), 237 | decoration: BoxDecoration( 238 | color: Colorz.sendMoneyBlue, 239 | borderRadius: BorderRadius.circular(8), 240 | ), 241 | ), 242 | ); 243 | } 244 | 245 | 246 | static List numbers = [1,2,3,4,5,6,7,8,9,-1,0,-1]; 247 | } 248 | 249 | class Txt extends StatefulWidget { 250 | final FontStyle ? fontStyle; 251 | final FontWeight? fontWeight; 252 | final int ?maxlines; 253 | final double? fontSize; 254 | final Color ?color; 255 | final TextAlign? textAlign; 256 | final bool ?useoverflow; 257 | final bool ?upperCaseFirst; 258 | final bool? useQuotes; 259 | final bool ?useFiler; 260 | final bool ?underlined; 261 | final bool ?fullUpperCase; 262 | final bool ?fullLowerCase; 263 | final dynamic text; 264 | final String ?fontFamily; 265 | 266 | const Txt({ 267 | Key? key, 268 | this.fontStyle, 269 | this.fontWeight, 270 | this.maxlines, 271 | this.fontSize, 272 | this.color, 273 | this.textAlign, 274 | this.useoverflow = false, 275 | this.upperCaseFirst = false, 276 | this.useQuotes = false, 277 | this.useFiler = false, 278 | this.underlined = false, 279 | this.fullUpperCase = false, 280 | this.fullLowerCase = false, 281 | @required this.text, 282 | this.fontFamily, 283 | }) : super(key: key); 284 | 285 | @override 286 | _TxtState createState() => _TxtState(); 287 | } 288 | 289 | class _TxtState extends State { 290 | String finalText = "Null"; 291 | 292 | @override 293 | Widget build(BuildContext context) { 294 | bool isString = widget.text is String; 295 | bool isNumber = widget.text is double || widget.text is int; 296 | bool isOthers = isString==false && isNumber==false; 297 | 298 | if (isString) finalText = widget.text ?? "Error";//when you forgot to set a value, "Error" will be shown 299 | if (isNumber) finalText = '${widget.text}'; 300 | if (isOthers) finalText = "Invalid input ${widget.text}"; 301 | 302 | 303 | 304 | 305 | //John → john 306 | if(widget.fullLowerCase!) finalText = finalText.toLowerCase(); 307 | 308 | //John → JOHN 309 | if (widget.fullUpperCase!) finalText = finalText.toUpperCase(); 310 | 311 | 312 | //JOHN or john → John 313 | if (widget.upperCaseFirst! && finalText.length > 1) finalText = "${finalText[0].toUpperCase()}${finalText.substring(1, finalText.length).toLowerCase()}"; 314 | 315 | //John → "John" 316 | if (widget.useQuotes!) finalText = "❝$finalText❞"; 317 | 318 | //John*_-#![] → John 319 | if (widget.useFiler!) finalText = finalText.replaceAll("*", "").replaceAll("_", "").replaceAll("-", "").replaceAll("#", "").replaceAll("\n", "").replaceAll("!", "").replaceAll('[', '').replaceAll(']', ''); 320 | 321 | 322 | return Text((finalText).toString(), 323 | overflow: widget.useoverflow! ? TextOverflow.ellipsis : null, 324 | textAlign: widget.textAlign, 325 | maxLines: widget.maxlines, 326 | textScaleFactor: 1,// This will keep your text size constant, when the user changes his device text size, 327 | style: TextStyle( 328 | decoration: widget.underlined! ? TextDecoration.underline : null,//to underlined a text 329 | color: widget.color, 330 | fontSize: widget.fontSize, 331 | fontWeight: widget.fontWeight, 332 | fontStyle: widget.fontStyle, 333 | fontFamily: widget.fontFamily, 334 | )); 335 | } 336 | } 337 | class Colorz { 338 | 339 | static const Color timerBlue = Color(0xff1c77dd); 340 | 341 | static const Color backgroundBlue = Color(0xff1b81f1); 342 | 343 | static const Color accountPurple = Color(0xff5b60ec); 344 | 345 | static const Color currenciesPageBackground = Color(0xff0f1e4e); 346 | static const Color currenciesNameColor = Color(0xff7080b3); 347 | static const Color currencyPositiveGreen = Color(0xff0eff7e); 348 | static const Color currencyIndicatorColor = Color(0xff6170f3); 349 | 350 | static const Color sendMoneyBlue = Color(0xff4285f4); 351 | 352 | static const Color googlResultsGrey = Color(0xffeff4f2); 353 | 354 | 355 | // static const Color compexDrawerScaffoldColor = Color(0xfe3e9f7); 356 | static const Color compexDrawerCanvasColor = Color(0xffe3e9f7); 357 | static const Color complexDrawerBlack = Color(0xff11111d); 358 | static const Color complexDrawerBlueGrey = Color(0xff1d1b31); 359 | 360 | 361 | 362 | //interlaced dashboard 363 | static const Color interlacedBackground = Color(0xfff7f8fa); 364 | static const Color interlacedAvatarBorderBlue = Color(0xff2554fc); 365 | static const Color interlacedChatPurple = Color(0xff8532fb); 366 | 367 | 368 | //richCalculator 369 | static const Color richCalculatorCanvas = Color(0xff222433); 370 | static const Color richCalculatorOutterButtonColor = Color(0xff333549); 371 | static const Color richCalculatorInnerButtonColor = Color(0xff2c2e41); 372 | static const Color richCalculatorYellowButtonColor = Color(0xffffba001); 373 | 374 | 375 | //buttonExample 376 | static const Color buttonExampleCanvas = Color(0xfff3f6ff); 377 | static const Color buttonSampleColor = Color(0xff7c2ae8); 378 | 379 | } -------------------------------------------------------------------------------- /lib/screens/detail_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flare_flutter/flare_actor.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_svg/flutter_svg.dart'; 6 | import 'package:nft_marketplace/utils/colors.dart'; 7 | import 'package:nft_marketplace/utils/hexcolor.dart'; 8 | import 'package:nft_marketplace/widgets/bottom_sheet_buy.dart'; 9 | import 'package:nft_marketplace/widgets/button_around.dart'; 10 | import 'package:nft_marketplace/widgets/button_plain.dart'; 11 | import 'package:nft_marketplace/widgets/contra_text.dart'; 12 | import 'package:nft_marketplace/widgets/video_player.dart'; 13 | 14 | class DetailPage extends StatefulWidget { 15 | final String? image; 16 | final String ? videourl; 17 | final String ? name; 18 | final double ? price; 19 | final String ? username ; 20 | bool ? video1; 21 | DetailPage({Key? key,this.image,this.video1,this.videourl,this.price,this.name,this.username}) : super(key: key); 22 | 23 | @override 24 | _DetailPageState createState() => _DetailPageState(); 25 | } 26 | 27 | class _DetailPageState extends State { 28 | 29 | String feel = "0"; 30 | double _value = 0.0; 31 | double lastsection = 0.0; 32 | String feedbacktxt = "Very Poor"; 33 | Color backgroundclr = Colors.red; 34 | @override 35 | void initState() { 36 | 37 | super.initState(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | double statusBarHeight = MediaQuery.of(context).padding.top; 43 | return Scaffold( 44 | body: Stack( 45 | children: [ 46 | SingleChildScrollView( 47 | child: Column( 48 | children: [ 49 | // Container( 50 | // height: kToolbarHeight + statusBarHeight, 51 | // // color: lightening_yellow, 52 | // ), 53 | Container( 54 | child: (widget.video1)==false? Container( 55 | height: 400, 56 | width: MediaQuery.of(context).size.width, 57 | // color: lightening_yellow, 58 | child:Hero( 59 | tag:"haaa", 60 | child: Image.network(widget.image!, 61 | fit: BoxFit.cover,), 62 | ), 63 | ):Container( 64 | height: 400, 65 | width: MediaQuery.of(context).size.width, 66 | // color: lightening_yellow, 67 | child:Hero( 68 | tag:"haaa", 69 | child:NftVideoPlayer(url: widget.videourl,), 70 | ), 71 | ), 72 | ), 73 | Container( 74 | // color: HexColor("#63B9AF").withOpacity(0.6), 75 | padding: EdgeInsets.all(24), 76 | child: Column( 77 | children: [ 78 | ContraText( 79 | alignment: Alignment.centerLeft, 80 | size: 27, 81 | text: widget.name, 82 | ), 83 | const SizedBox( 84 | height: 2, 85 | ), 86 | 87 | Align( 88 | alignment: Alignment.centerLeft, 89 | child: Text( 90 | "by ${widget.username}", 91 | textAlign: TextAlign.start, 92 | style: const TextStyle( 93 | color: trout, 94 | fontSize: 17, 95 | fontWeight: FontWeight.w800), 96 | ), 97 | ), 98 | const SizedBox( 99 | height: 12, 100 | ), 101 | const Text( 102 | "In this world, wherever there is light - there are also shadows. As long as the concept of winners exists, there must also be losers. " 103 | "The selfish desire of wanting to maintain peace causes wars, and hatred is born to protect love", 104 | style: TextStyle( 105 | color: trout, 106 | fontSize: 17, 107 | fontWeight: FontWeight.w500), 108 | ), 109 | const SizedBox( 110 | height: 21, 111 | ), 112 | const ContraText( 113 | alignment: Alignment.centerLeft, 114 | text: "Price", 115 | size: 15, 116 | ), 117 | const SizedBox( 118 | height: 2, 119 | ), 120 | Align( 121 | alignment: Alignment.centerLeft, 122 | child: Row( 123 | children: [ 124 | Container( 125 | height:30, 126 | width: 40, 127 | child: Image.network("https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Ethereum_logo_2014.svg/1257px-Ethereum_logo_2014.svg.png")), 128 | Text( 129 | "${widget.price}", 130 | textAlign: TextAlign.start, 131 | style: const TextStyle( 132 | color: Colors.black, 133 | fontSize: 36, 134 | fontWeight: FontWeight.w800), 135 | ), 136 | ], 137 | ), 138 | ), 139 | const SizedBox( 140 | height: 16, 141 | ), 142 | Container( 143 | alignment: Alignment.bottomCenter, 144 | child: const Divider( 145 | color: wood_smoke, 146 | thickness: 3, 147 | height: 0, 148 | ), 149 | ), 150 | const SizedBox( 151 | height: 16, 152 | ), 153 | NftBuyButton(text: "Buy Now",price: widget.price!,), 154 | 155 | const SizedBox( 156 | height: 16, 157 | ), 158 | 159 | const ContraText( 160 | alignment: Alignment.centerLeft, 161 | text: "Rate It", 162 | size: 15, 163 | ), 164 | Column( 165 | 166 | children: [ 167 | Padding( 168 | padding: const EdgeInsets.all( 10), 169 | child: Text( 170 | feedbacktxt, 171 | style: const TextStyle( 172 | fontSize: 20, 173 | color: Colors.black, 174 | fontWeight: FontWeight.bold, 175 | ), 176 | textAlign: TextAlign.center, 177 | ), 178 | ), 179 | Container( 180 | height: 250, 181 | child: Align( 182 | alignment: Alignment.topCenter, 183 | child: FlareActor( 184 | 'assets/flares/feelings.flr', 185 | fit: BoxFit.contain, 186 | //alignment: Alignment.Center, 187 | animation: feel, 188 | ), 189 | ), 190 | ), 191 | 192 | Slider( 193 | min: 0.0, 194 | max: 100.0, 195 | value: _value, 196 | divisions: 100, 197 | activeColor: Colors.blue, 198 | inactiveColor: Colors.black.withOpacity(0.6), 199 | label: feedbacktxt, 200 | onChanged: (val) { 201 | setState(() { 202 | _value = val; 203 | }); 204 | if (_value == 0.0) { 205 | if (lastsection > 0.0) { 206 | setState(() { 207 | feel = "0-"; 208 | }); 209 | } 210 | setState(() { 211 | lastsection = 0.0; 212 | backgroundclr = Colors.red; 213 | feedbacktxt = "Very Good"; 214 | }); 215 | } else if (_value > 0.0 && _value < 25.0) { 216 | if (lastsection == 0.0) { 217 | setState(() { 218 | feel = "0+"; 219 | }); 220 | } else if (lastsection == 50.0) { 221 | setState(() { 222 | feel = "25-"; 223 | }); 224 | } 225 | setState(() { 226 | lastsection = 25.0; 227 | backgroundclr = Colors.orange; 228 | feedbacktxt = "Good"; 229 | }); 230 | } else if (_value >= 25.0 && _value < 50.0) { 231 | if (lastsection == 25.0) { 232 | setState(() { 233 | feel = "25+"; 234 | }); 235 | } else if (lastsection == 75.0) { 236 | setState(() { 237 | feel = "50-"; 238 | }); 239 | } 240 | setState(() { 241 | lastsection = 50.0; 242 | backgroundclr = Colors.orangeAccent; 243 | feedbacktxt = "Cool"; 244 | }); 245 | } else if (_value >= 50.0 && _value < 75.0) { 246 | if (lastsection == 50.0) { 247 | setState(() { 248 | feel = "50+"; 249 | }); 250 | } else if (lastsection == 100.0) { 251 | setState(() { 252 | feel = "75-"; 253 | }); 254 | } 255 | setState(() { 256 | lastsection = 75.0; 257 | backgroundclr = Colors.yellow; 258 | feedbacktxt = "Wow"; 259 | }); 260 | } else if (_value >= 75.0 && _value <= 100.0) { 261 | if (lastsection == 75.0) { 262 | setState(() { 263 | feel = "75+"; 264 | }); 265 | } 266 | setState(() { 267 | lastsection = 100.0; 268 | backgroundclr = Colors.green; 269 | feedbacktxt = "MasterPiece"; 270 | }); 271 | } 272 | }, 273 | ), 274 | ], 275 | ), 276 | ], 277 | ), 278 | ) 279 | ], 280 | ), 281 | ), 282 | Positioned( 283 | left: 24, 284 | top: kToolbarHeight + statusBarHeight-40, 285 | child: ButtonRoundWithShadow( 286 | size: 48, 287 | borderColor: wood_smoke, 288 | color: white, 289 | callback: () { 290 | Navigator.pop(context); 291 | }, 292 | shadowColor: wood_smoke, 293 | ), 294 | ) 295 | 296 | ], 297 | ), 298 | ); 299 | } 300 | } 301 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.7.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | cached_network_image: 19 | dependency: "direct main" 20 | description: 21 | name: cached_network_image 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "3.1.0" 25 | cached_network_image_platform_interface: 26 | dependency: transitive 27 | description: 28 | name: cached_network_image_platform_interface 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.0" 32 | cached_network_image_web: 33 | dependency: transitive 34 | description: 35 | name: cached_network_image_web 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.0" 39 | characters: 40 | dependency: transitive 41 | description: 42 | name: characters 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.3.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.0" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.15.0" 67 | confetti: 68 | dependency: "direct main" 69 | description: 70 | name: confetti 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.6.0-nullsafety" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "3.0.1" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.0.3" 88 | equatable: 89 | dependency: transitive 90 | description: 91 | name: equatable 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "2.0.3" 95 | fake_async: 96 | dependency: transitive 97 | description: 98 | name: fake_async 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.2.0" 102 | ffi: 103 | dependency: transitive 104 | description: 105 | name: ffi 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.1.2" 109 | file: 110 | dependency: transitive 111 | description: 112 | name: file 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "6.1.2" 116 | fl_chart: 117 | dependency: "direct main" 118 | description: 119 | name: fl_chart 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "0.36.3" 123 | flare_flutter: 124 | dependency: "direct main" 125 | description: 126 | name: flare_flutter 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "3.0.2" 130 | flutter: 131 | dependency: "direct main" 132 | description: flutter 133 | source: sdk 134 | version: "0.0.0" 135 | flutter_blurhash: 136 | dependency: transitive 137 | description: 138 | name: flutter_blurhash 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "0.6.0" 142 | flutter_cache_manager: 143 | dependency: transitive 144 | description: 145 | name: flutter_cache_manager 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "3.1.2" 149 | flutter_lints: 150 | dependency: "direct dev" 151 | description: 152 | name: flutter_lints 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "1.0.4" 156 | flutter_svg: 157 | dependency: "direct main" 158 | description: 159 | name: flutter_svg 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "0.22.0" 163 | flutter_test: 164 | dependency: "direct dev" 165 | description: flutter 166 | source: sdk 167 | version: "0.0.0" 168 | flutter_web_plugins: 169 | dependency: transitive 170 | description: flutter 171 | source: sdk 172 | version: "0.0.0" 173 | funvas: 174 | dependency: "direct main" 175 | description: 176 | name: funvas 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.1.3+5" 180 | http: 181 | dependency: transitive 182 | description: 183 | name: http 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.13.3" 187 | http_parser: 188 | dependency: transitive 189 | description: 190 | name: http_parser 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "4.0.0" 194 | js: 195 | dependency: transitive 196 | description: 197 | name: js 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.6.3" 201 | lints: 202 | dependency: transitive 203 | description: 204 | name: lints 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.0.1" 208 | matcher: 209 | dependency: transitive 210 | description: 211 | name: matcher 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.12.10" 215 | meta: 216 | dependency: transitive 217 | description: 218 | name: meta 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.4.0" 222 | octo_image: 223 | dependency: transitive 224 | description: 225 | name: octo_image 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.0.0+1" 229 | path: 230 | dependency: transitive 231 | description: 232 | name: path 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "1.8.0" 236 | path_drawing: 237 | dependency: transitive 238 | description: 239 | name: path_drawing 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "0.5.1" 243 | path_parsing: 244 | dependency: transitive 245 | description: 246 | name: path_parsing 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "0.2.1" 250 | path_provider: 251 | dependency: transitive 252 | description: 253 | name: path_provider 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.2" 257 | path_provider_linux: 258 | dependency: transitive 259 | description: 260 | name: path_provider_linux 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.0.0" 264 | path_provider_macos: 265 | dependency: transitive 266 | description: 267 | name: path_provider_macos 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.0.0" 271 | path_provider_platform_interface: 272 | dependency: transitive 273 | description: 274 | name: path_provider_platform_interface 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "2.0.1" 278 | path_provider_windows: 279 | dependency: transitive 280 | description: 281 | name: path_provider_windows 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "2.0.1" 285 | pedantic: 286 | dependency: transitive 287 | description: 288 | name: pedantic 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.11.1" 292 | petitparser: 293 | dependency: transitive 294 | description: 295 | name: petitparser 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "4.2.0" 299 | platform: 300 | dependency: transitive 301 | description: 302 | name: platform 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "3.0.0" 306 | plugin_platform_interface: 307 | dependency: transitive 308 | description: 309 | name: plugin_platform_interface 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "2.0.1" 313 | process: 314 | dependency: transitive 315 | description: 316 | name: process 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "4.2.1" 320 | random_color: 321 | dependency: transitive 322 | description: 323 | name: random_color 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.0.6-nullsafety" 327 | rxdart: 328 | dependency: transitive 329 | description: 330 | name: rxdart 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "0.27.1" 334 | sky_engine: 335 | dependency: transitive 336 | description: flutter 337 | source: sdk 338 | version: "0.0.99" 339 | source_span: 340 | dependency: transitive 341 | description: 342 | name: source_span 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "1.8.1" 346 | sqflite: 347 | dependency: transitive 348 | description: 349 | name: sqflite 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "2.0.0+3" 353 | sqflite_common: 354 | dependency: transitive 355 | description: 356 | name: sqflite_common 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "2.0.0+2" 360 | stack_trace: 361 | dependency: transitive 362 | description: 363 | name: stack_trace 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "1.10.0" 367 | stream_channel: 368 | dependency: transitive 369 | description: 370 | name: stream_channel 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "2.1.0" 374 | string_scanner: 375 | dependency: transitive 376 | description: 377 | name: string_scanner 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "1.1.0" 381 | synchronized: 382 | dependency: transitive 383 | description: 384 | name: synchronized 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "3.0.0" 388 | term_glyph: 389 | dependency: transitive 390 | description: 391 | name: term_glyph 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "1.2.0" 395 | test_api: 396 | dependency: transitive 397 | description: 398 | name: test_api 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "0.4.1" 402 | transparent_image: 403 | dependency: "direct main" 404 | description: 405 | name: transparent_image 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "2.0.0" 409 | typed_data: 410 | dependency: transitive 411 | description: 412 | name: typed_data 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "1.3.0" 416 | uuid: 417 | dependency: transitive 418 | description: 419 | name: uuid 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "3.0.4" 423 | vector_math: 424 | dependency: transitive 425 | description: 426 | name: vector_math 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "2.1.0" 430 | video_player: 431 | dependency: "direct main" 432 | description: 433 | name: video_player 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "2.1.12" 437 | video_player_platform_interface: 438 | dependency: transitive 439 | description: 440 | name: video_player_platform_interface 441 | url: "https://pub.dartlang.org" 442 | source: hosted 443 | version: "4.1.0" 444 | video_player_web: 445 | dependency: transitive 446 | description: 447 | name: video_player_web 448 | url: "https://pub.dartlang.org" 449 | source: hosted 450 | version: "2.0.2" 451 | win32: 452 | dependency: transitive 453 | description: 454 | name: win32 455 | url: "https://pub.dartlang.org" 456 | source: hosted 457 | version: "2.2.5" 458 | xdg_directories: 459 | dependency: transitive 460 | description: 461 | name: xdg_directories 462 | url: "https://pub.dartlang.org" 463 | source: hosted 464 | version: "0.2.0" 465 | xml: 466 | dependency: transitive 467 | description: 468 | name: xml 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "5.1.2" 472 | sdks: 473 | dart: ">=2.13.0 <3.0.0" 474 | flutter: ">=2.0.0" 475 | -------------------------------------------------------------------------------- /lib/screens/balance.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math' as math; 2 | 3 | import 'package:fl_chart/fl_chart.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | 7 | 8 | 9 | class BankApp extends StatefulWidget { 10 | @override 11 | _BankAppState createState() => _BankAppState(); 12 | } 13 | 14 | class _BankAppState extends State 15 | with SingleTickerProviderStateMixin { 16 | 17 | late AnimationController _controller; 18 | late final PageController _pageController = PageController(); 19 | late Animation _rotation; 20 | final cards = 4; 21 | 22 | bool _isCardDetailsOpened() => _controller.isCompleted; 23 | 24 | void _openCloseCard() { 25 | if(_controller.isCompleted) { 26 | _controller.reverse(); 27 | } else if (_controller.isDismissed){ 28 | _controller.forward(); 29 | } 30 | } 31 | 32 | int _getCardIndex() { 33 | return _pageController.hasClients ? _pageController.page!.round() : 0; 34 | } 35 | 36 | @override 37 | void initState() { 38 | super.initState(); 39 | SystemChrome.setEnabledSystemUIOverlays([]); 40 | 41 | _controller = AnimationController( 42 | vsync: this, 43 | duration: Duration(milliseconds: 320) 44 | ); 45 | _rotation = Tween( 46 | begin: 0.0, end: 90.0 47 | ).animate(CurvedAnimation(parent: _controller, 48 | curve: Curves.linear 49 | )); 50 | } 51 | 52 | @override 53 | void dispose() { 54 | _controller.dispose(); 55 | _pageController.dispose(); 56 | super.dispose(); 57 | } 58 | 59 | @override 60 | Widget build(BuildContext context) { 61 | final screenSize = MediaQuery.of(context).size; 62 | final double contentPadding = 32; 63 | 64 | return Container( 65 | color: Colors.grey.shade900, 66 | height: 400, 67 | child: Stack( 68 | children: [ 69 | Positioned( 70 | top: screenSize.height * .115, 71 | left: screenSize.width * .415, 72 | right: 0, 73 | height: 200, 74 | child: AnimatedBuilder( 75 | animation: _pageController, 76 | builder: (context, child) { 77 | return AnimatedBuilder( 78 | animation: _controller, 79 | builder: (context, child) { 80 | return Opacity( 81 | opacity: _controller.value > 0.5 ? 0 : 1, 82 | child: SizedBox( 83 | width: 100, 84 | child: Row( 85 | children: List.generate(cards, (i) { 86 | final selected = _getCardIndex() == i; 87 | return Container( 88 | width: 6, height: 6, 89 | margin: EdgeInsets.only(right: 8), 90 | decoration: BoxDecoration( 91 | color: selected ? Colors.white : Colors.white30, 92 | shape: BoxShape.circle, 93 | ), 94 | ); 95 | }), 96 | ), 97 | ), 98 | ); 99 | }, 100 | ); 101 | }, 102 | ), 103 | ), 104 | Positioned( 105 | top: 16, 106 | left: 0, 107 | right: 0, 108 | height: 200, 109 | child: AnimatedBuilder( 110 | animation: _controller, 111 | builder: (context, _) { 112 | return PageView.builder( 113 | itemCount: cards, 114 | controller: _pageController, 115 | clipBehavior: Clip.none, 116 | physics: _isCardDetailsOpened() 117 | ? NeverScrollableScrollPhysics() 118 | : BouncingScrollPhysics(), 119 | itemBuilder: (context, i) { 120 | if (_getCardIndex() != i) return _Card(onItemPressed: _openCloseCard,); 121 | return Transform.rotate( 122 | angle: _rotation.value * math.pi / 180, 123 | alignment: Alignment.lerp( 124 | Alignment.center, 125 | Alignment(-.7, -.6), 126 | _controller.value, 127 | ), 128 | child: _Card(onItemPressed: _openCloseCard,), 129 | ); 130 | }, 131 | ); 132 | }, 133 | ), 134 | ), 135 | AnimatedBuilder( 136 | animation: _controller, 137 | child: _CardStats( 138 | onItemPressed: _openCloseCard, 139 | ), 140 | builder: (context, child) { 141 | return Positioned( 142 | top: 60, 143 | right: -180 + (280 * _controller.value), 144 | child: Opacity( 145 | opacity: _controller.value, 146 | child: child, 147 | ), 148 | ); 149 | }, 150 | ), 151 | 152 | ], 153 | ), 154 | ); 155 | // floatingActionButton: FloatingActionButton( 156 | // backgroundColor: Colors.deepPurple.shade900, 157 | // child: Icon(Icons.add), 158 | // onPressed: _openCloseCard, 159 | // ), 160 | 161 | } 162 | 163 | // LineChartData sampleData1() { 164 | // return LineChartData( 165 | // lineTouchData: LineTouchData( 166 | // handleBuiltInTouches: true, 167 | // ), 168 | // titlesData: FlTitlesData( 169 | // bottomTitles: SideTitles( 170 | // showTitles: true, 171 | // reservedSize: 22, 172 | // getTextStyles: (value) => const TextStyle( 173 | // color: Color(0xff72719b), 174 | // fontWeight: FontWeight.bold, 175 | // fontSize: 16, 176 | // ), 177 | // margin: 10, 178 | // getTitles: (value) { 179 | // switch (value.toInt()) { 180 | // case 2: 181 | // return 'Jan'; 182 | // case 7: 183 | // return 'Feb'; 184 | // case 12: 185 | // return 'Mar'; 186 | // } 187 | // return ''; 188 | // }, 189 | // ), 190 | // leftTitles: SideTitles( 191 | // showTitles: true, 192 | // getTextStyles: (value) => const TextStyle( 193 | // color: Color(0xff75729e), 194 | // fontWeight: FontWeight.bold, 195 | // fontSize: 14, 196 | // ), 197 | // getTitles: (value) { 198 | // switch (value.toInt()) { 199 | // case 1: 200 | // return ''; 201 | // case 2: 202 | // return ''; 203 | // case 3: 204 | // return ''; 205 | // case 4: 206 | // return ''; 207 | // } 208 | // return ''; 209 | // }, 210 | // margin: 8, 211 | // reservedSize: 30, 212 | // ), 213 | // ), 214 | // borderData: FlBorderData( 215 | // show: true, 216 | // border: const Border( 217 | // bottom: BorderSide( 218 | // color: Color(0xff4e4965), 219 | // width: 4, 220 | // ), 221 | // left: BorderSide( 222 | // color: Colors.transparent, 223 | // ), 224 | // right: BorderSide( 225 | // color: Colors.transparent, 226 | // ), 227 | // top: BorderSide( 228 | // color: Colors.transparent, 229 | // ), 230 | // ), 231 | // ), 232 | // minY: 0, 233 | // lineBarsData: linesBarData1(), 234 | // ); 235 | // } 236 | // 237 | // List linesBarData1() { 238 | // final lineChartBarData1 = LineChartBarData( 239 | // spots: [ 240 | // FlSpot(1, 1), 241 | // FlSpot(3, 1.5), 242 | // FlSpot(5, 1.4), 243 | // FlSpot(7, 3.3), 244 | // FlSpot(10, 2), 245 | // FlSpot(12, 2.2), 246 | // FlSpot(13, 1.8), 247 | // ], 248 | // isCurved: true, 249 | // colors: [ 250 | // const Color(0xff4af699), 251 | // ], 252 | // barWidth: 8, 253 | // isStrokeCapRound: true, 254 | // dotData: FlDotData( 255 | // show: false, 256 | // ), 257 | // belowBarData: BarAreaData( 258 | // show: false, 259 | // ), 260 | // ); 261 | // final lineChartBarData2 = LineChartBarData( 262 | // spots: [ 263 | // FlSpot(1, 1), 264 | // FlSpot(3, 2.8), 265 | // FlSpot(7, 1.2), 266 | // FlSpot(10, 2.8), 267 | // FlSpot(12, 2.6), 268 | // FlSpot(13, 3.3), 269 | // ], 270 | // isCurved: true, 271 | // colors: [const Color(0xFFae06cf)], 272 | // barWidth: 8, 273 | // isStrokeCapRound: true, 274 | // dotData: FlDotData( 275 | // show: false, 276 | // ), 277 | // belowBarData: BarAreaData(show: false, colors: [ 278 | // const Color(0x00aa4cfc), 279 | // ]), 280 | // ); 281 | // final lineChartBarData3 = LineChartBarData( 282 | // spots: [ 283 | // FlSpot(1, 2.8), 284 | // FlSpot(3, 1.9), 285 | // FlSpot(6, 3), 286 | // FlSpot(10, 1.3), 287 | // FlSpot(13, 2.5), 288 | // ], 289 | // isCurved: true, 290 | // colors: const [ 291 | // Color(0xff27b6fc), 292 | // ], 293 | // barWidth: 8, 294 | // isStrokeCapRound: true, 295 | // dotData: FlDotData( 296 | // show: false, 297 | // ), 298 | // belowBarData: BarAreaData( 299 | // show: false, 300 | // ), 301 | // ); 302 | // return [ 303 | // lineChartBarData1, 304 | // lineChartBarData2, 305 | // lineChartBarData3, 306 | // ]; 307 | // } 308 | } 309 | 310 | class _CardStats extends StatelessWidget { 311 | const _CardStats({Key? key, required this.onItemPressed}) : super(key: key); 312 | 313 | final VoidCallback onItemPressed; 314 | 315 | @override 316 | Widget build(BuildContext context) { 317 | final bodyText = Theme.of(context).textTheme.bodyText1!.copyWith( 318 | color: Colors.white60, 319 | ); 320 | return Container( 321 | width: 180, 322 | height: 290, 323 | child: Column( 324 | crossAxisAlignment: CrossAxisAlignment.start, 325 | children: [ 326 | Container( 327 | height: 80, 328 | child: Image.asset("assets/payment.png"), 329 | ), 330 | Text.rich(TextSpan( 331 | text: '\$\t', 332 | style: bodyText.copyWith(fontSize: 24, color: Colors.white30), 333 | children: [TextSpan(text: '5,680', 334 | style: bodyText.copyWith(fontSize: 32, color: Colors.white70) 335 | )] 336 | )), 337 | ListTile( 338 | onTap: onItemPressed, 339 | horizontalTitleGap: 0, 340 | contentPadding: EdgeInsets.zero, 341 | leading: Icon(Icons.payment, color: Colors.white30), 342 | title: Text('Bank Card', style: bodyText), 343 | ), 344 | ListTile( 345 | onTap: onItemPressed, 346 | horizontalTitleGap: 0, 347 | contentPadding: EdgeInsets.zero, 348 | leading: Icon(Icons.money, color: Colors.white30), 349 | title: Text('Bank Account', style: bodyText), 350 | ), 351 | ListTile( 352 | onTap: onItemPressed, 353 | horizontalTitleGap: 0, 354 | contentPadding: EdgeInsets.zero, 355 | leading: Icon(Icons.rss_feed, color: Colors.white30), 356 | title: Text('Pay', style: bodyText), 357 | ), 358 | ], 359 | ), 360 | ); 361 | } 362 | } 363 | 364 | 365 | class _Card extends StatelessWidget { 366 | const _Card({Key? key, required this.onItemPressed}) : super(key: key); 367 | 368 | final VoidCallback onItemPressed; 369 | @override 370 | Widget build(BuildContext context) { 371 | final textStyle = Theme.of(context).textTheme.bodyText1!.copyWith( 372 | color: Colors.white70, 373 | ); 374 | 375 | return InkWell( 376 | onTap: onItemPressed, 377 | child: Container( 378 | width: MediaQuery.of(context).size.width * .85, 379 | height: 190, 380 | padding: EdgeInsets.all(32), 381 | margin: EdgeInsets.symmetric(horizontal: 32), 382 | decoration: BoxDecoration( 383 | color: Colors.deepPurple.shade900, 384 | borderRadius: BorderRadius.circular(32), 385 | boxShadow: [ 386 | BoxShadow( 387 | color: Colors.black12, 388 | blurRadius: 16, 389 | ) 390 | ] 391 | ), 392 | child: Column( 393 | crossAxisAlignment: CrossAxisAlignment.start, 394 | children: [ 395 | Row( 396 | children: [ 397 | Column( 398 | crossAxisAlignment: CrossAxisAlignment.start, 399 | children: [ 400 | Text('Nft'.toUpperCase(), style: textStyle), 401 | SizedBox(height: 6), 402 | Text('Platinum'.toUpperCase(), style: textStyle), 403 | ], 404 | ), 405 | 406 | Container( 407 | height: 80, 408 | child: Image.asset("assets/wallet.png"), 409 | ) 410 | ], 411 | ), 412 | Spacer(), 413 | Text('•••• •••• •••• 5040', 414 | style: textStyle.copyWith( 415 | wordSpacing: 10, 416 | letterSpacing: 6, 417 | ), 418 | ) 419 | ], 420 | ), 421 | ), 422 | ); 423 | } 424 | } 425 | --------------------------------------------------------------------------------