├── .metadata ├── README.md ├── Screenshots ├── Property_1.jpg ├── Property_2.jpg ├── Property_3.jpg ├── Property_4.jpg ├── buymecoffee.png ├── facebook.png ├── instagram.png ├── linkedin.png ├── stackoverflow.png └── twitter.png ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── toastguyz │ │ │ │ └── flutter_property_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── images │ ├── bg_placeholder.jpg │ ├── cancel.png │ └── transparent_placeholder.png ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── main.dart ├── models │ └── model_propertysell.dart ├── property │ ├── property_details.dart │ ├── property_listing.dart │ └── property_sell.dart └── utils │ ├── color_utils.dart │ ├── method_utils.dart │ └── network_utils.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.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: 27321ebbad34b0a3fafe99fac037102196d655ff 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Property 2 | 3 | > A flutter application for property selling and listing app. 4 | 5 | Main Features Used : 6 | - Beautiful UI Design 7 | - Firebase Database 8 | - Data Fetching From Network 9 | - Multi ImagePicker With Image from URL or Local Uri 10 | - Gallery Swiper 11 | - Local Notification 12 | - Fetch Current Location 13 | 14 | ## Screenshots 15 | 16 | | 1 | 2| 17 | |------|-------| 18 | ||| 19 | 20 | | 3 | 4| 21 | |------|-------| 22 | ||| 23 | 24 | Don't forget to star :star2: the repo if you like our work.:heart::blue_heart::yellow_heart::purple_heart::green_heart: 25 | 26 | ## Website :link: 27 | 28 | > [Toastguyz](www.toastguyz.com) - A programming tutorials website 29 | 30 | ## Support on social media :thumbsup: 31 | 32 | >Follow us on our social media profiles to support us. 33 | 34 | - [Youtube Channel](https://www.youtube.com/toastguyz) 35 | - [Facebook Page](https://www.facebook.com/toastguyz) 36 | - [Twitter Account](https://www.twitter.com/toastguyz) 37 | - [Instagram Account](https://www.instagram.com/toastguyz) 38 | 39 | ## Code Developer 40 | 41 | >### Jay Patel :fire: 42 | >Enthusiastic Android & Flutter App Developer. 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ## ☕ Donate 51 | 52 | > [Paypal](https://www.paypal.me/toastguyz) 53 | 54 | 55 | ./Screenshots/buymecoffee.png 56 | 57 | 58 | Thanks for reaching out to us. :100: 59 | 60 | # Getting Started 61 | 62 | > 1. Create your flutter application project. 63 | > 2. [Set up with firebase](https://firebase.google.com/docs) 64 | > 3. Create Realtime Database with Test Rules. 65 | > 4. Also, setup firebase storage in your firebase console. 66 | 67 | RealTime Database Rules : 68 | { 69 | "rules": { 70 | ".read": true, 71 | ".write": true 72 | } 73 | } 74 | 75 | Storage Rules : 76 | 77 | service firebase.storage { 78 | match /b/{bucket}/o { 79 | match /{allPaths=**} { 80 | allow read, write; 81 | } 82 | } 83 | } 84 | 85 | Now, you're ready to rock the floor:guitar: -------------------------------------------------------------------------------- /Screenshots/Property_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/Property_1.jpg -------------------------------------------------------------------------------- /Screenshots/Property_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/Property_2.jpg -------------------------------------------------------------------------------- /Screenshots/Property_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/Property_3.jpg -------------------------------------------------------------------------------- /Screenshots/Property_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/Property_4.jpg -------------------------------------------------------------------------------- /Screenshots/buymecoffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/buymecoffee.png -------------------------------------------------------------------------------- /Screenshots/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/facebook.png -------------------------------------------------------------------------------- /Screenshots/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/instagram.png -------------------------------------------------------------------------------- /Screenshots/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/linkedin.png -------------------------------------------------------------------------------- /Screenshots/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/stackoverflow.png -------------------------------------------------------------------------------- /Screenshots/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/Screenshots/twitter.png -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.toastguyz.flutter_property_app" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/toastguyz/flutter_property_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.toastguyz.flutter_property_app 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity 5 | import io.flutter.embedding.engine.FlutterEngine 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 10 | GeneratedPluginRegistrant.registerWith(flutterEngine); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.0' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/images/bg_placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/assets/images/bg_placeholder.jpg -------------------------------------------------------------------------------- /assets/images/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/assets/images/cancel.png -------------------------------------------------------------------------------- /assets/images/transparent_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/assets/images/transparent_placeholder.png -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = "The Chromium Authors"; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 1100; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterPropertyApp; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 5.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterPropertyApp; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 5.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterPropertyApp; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 5.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | }; 517 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 518 | } 519 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/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/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-property-app/4745ffca9d58a972eecc4db0d28c2db28648e51e/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | flutter_property_app 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 4 | import 'package:flutter_property_app/property/property_listing.dart'; 5 | import 'package:flutter_property_app/property/property_sell.dart'; 6 | 7 | FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; 8 | 9 | void main() { 10 | flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); 11 | runApp(MyApp()); 12 | } 13 | 14 | class MyApp extends StatefulWidget { 15 | @override 16 | MyAppState createState() => MyAppState(); 17 | } 18 | 19 | class MyAppState extends State { 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); 25 | 26 | // initialise the plugin. app_icon needs to be a added as a drawable resource to the Android head project 27 | var initializationSettingsAndroid = AndroidInitializationSettings('mipmap/ic_launcher'); 28 | var initializationSettingsIOS = IOSInitializationSettings( 29 | onDidReceiveLocalNotification: onDidReceiveLocalNotification); 30 | var initializationSettings = InitializationSettings( 31 | initializationSettingsAndroid, initializationSettingsIOS); 32 | flutterLocalNotificationsPlugin.initialize(initializationSettings, 33 | onSelectNotification: onSelectNotification); 34 | } 35 | 36 | Future onSelectNotification(String payload) async { 37 | if (payload != null) { 38 | debugPrint('notification payload: ' + payload); 39 | } 40 | 41 | await Navigator.push( 42 | context, 43 | MaterialPageRoute(builder: (context) => PropertySell()), 44 | ); 45 | } 46 | 47 | Future onDidReceiveLocalNotification( 48 | int id, String title, String body, String payload) async { 49 | // display a dialog with the notification details, tap ok to go to another page 50 | await showDialog( 51 | context: context, 52 | builder: (BuildContext context) => CupertinoAlertDialog( 53 | title: title != null ? Text(title) : null, 54 | content: body != null ? Text(body) : null, 55 | actions: [ 56 | CupertinoDialogAction( 57 | isDefaultAction: true, 58 | child: Text('Ok'), 59 | onPressed: () async { 60 | Navigator.of(context, rootNavigator: true).pop(); 61 | await Navigator.push( 62 | context, 63 | MaterialPageRoute( 64 | builder: (context) => PropertySell(), 65 | ), 66 | ); 67 | }, 68 | ) 69 | ], 70 | ), 71 | ); 72 | } 73 | 74 | @override 75 | Widget build(BuildContext context) { 76 | return MaterialApp( 77 | debugShowCheckedModeBanner: false, 78 | title: 'Property App', 79 | theme: ThemeData( 80 | primarySwatch: Colors.deepOrange, 81 | ), 82 | home: PropertyListing(), 83 | routes: { 84 | PropertySell.routeName: (context) => PropertySell(), 85 | }, 86 | ); 87 | } 88 | } 89 | 90 | Future repeatNotification(String propertyName,String contact) async { 91 | var androidPlatformChannelSpecifics = AndroidNotificationDetails( 92 | 'm_channel_id', 93 | 'm_channel_name', 94 | 'm_channel_description'); 95 | var iOSPlatformChannelSpecifics = IOSNotificationDetails(); 96 | var platformChannelSpecifics = NotificationDetails( 97 | androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); 98 | await flutterLocalNotificationsPlugin.periodicallyShow(0, propertyName, 99 | contact, RepeatInterval.Daily, platformChannelSpecifics); 100 | } 101 | -------------------------------------------------------------------------------- /lib/models/model_propertysell.dart: -------------------------------------------------------------------------------- 1 | class PropertySellModel { 2 | String id; 3 | int sellType; 4 | List sellImages; 5 | String sellAddress; 6 | String sellCity; 7 | String sellRegion; 8 | String sellCountry; 9 | String sellPrice; 10 | String sellBathrooms; 11 | String sellBedrooms; 12 | String sellBalconies; 13 | String sellDescription; 14 | String sellContact; 15 | String updatedAt; 16 | 17 | PropertySellModel( 18 | {this.id, 19 | this.sellType, 20 | this.sellImages, 21 | this.sellAddress, 22 | this.sellCity, 23 | this.sellRegion, 24 | this.sellCountry, 25 | this.sellPrice, 26 | this.sellBathrooms, 27 | this.sellBedrooms, 28 | this.sellBalconies, 29 | this.sellDescription, 30 | this.updatedAt}); 31 | 32 | PropertySellModel.fromJson(var value) { 33 | this.id = value["id"]; 34 | this.sellType = value["sellType"]; 35 | this.sellAddress = value["sellAddress"]; 36 | this.sellCity = value["sellCity"]; 37 | this.sellRegion = value["sellRegion"]; 38 | this.sellCountry = value["sellCountry"]; 39 | this.sellPrice = value["sellPrice"]; 40 | this.sellBathrooms = value["sellBathrooms"]; 41 | this.sellBedrooms = value["sellBedrooms"]; 42 | this.sellBalconies = value["sellBalconies"]; 43 | this.sellDescription = value["sellDescription"]; 44 | this.sellContact = value["sellContact"]; 45 | this.updatedAt = value["updatedAt"]; 46 | 47 | this.sellImages = []; 48 | try { 49 | List data = value["sellImages"].cast(); 50 | for (int i = 0; i < data.length; i++) { 51 | this.sellImages.add(data[i]); 52 | } 53 | } catch (error) { 54 | this.sellImages = []; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/property/property_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_property_app/models/model_propertysell.dart'; 4 | import 'package:flutter_property_app/property/property_sell.dart'; 5 | import 'package:flutter_property_app/utils/color_utils.dart'; 6 | import 'package:flutter_property_app/utils/method_utils.dart'; 7 | import 'package:intl/intl.dart'; 8 | 9 | class PropertyDetails extends StatefulWidget { 10 | static const routeName = "/property-details"; 11 | final PropertySellModel sellModel; 12 | 13 | PropertyDetails(this.sellModel); 14 | 15 | @override 16 | State createState() { 17 | return PropertyDetailsState(); 18 | } 19 | } 20 | 21 | class PropertyDetailsState extends State { 22 | int currentView = 1; 23 | var dateFormat = DateFormat("dd MMM, yyyy"); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | final propertySellDate = getDateFromDateTimeInSpecificFormat(dateFormat, widget.sellModel.updatedAt); 28 | 29 | return Scaffold( 30 | body: CustomScrollView( 31 | slivers: [ 32 | _buildSliverAppBarWidget(), 33 | _buildSliverListBodyWidget(propertySellDate), 34 | ], 35 | ), 36 | ); 37 | } 38 | 39 | Widget _buildSliverAppBarWidget() { 40 | return SliverAppBar( 41 | backgroundColor: themeColor, 42 | pinned: true, 43 | titleSpacing: 0.0, 44 | expandedHeight: MediaQuery.of(context).size.height * 0.3, 45 | flexibleSpace: FlexibleSpaceBar( 46 | title: Text("Rs. ${widget.sellModel.sellPrice}"), 47 | background: Hero( 48 | tag: widget.sellModel.id, 49 | child: widget.sellModel.sellImages != null && 50 | widget.sellModel.sellImages.length > 0 51 | ? Stack( 52 | children: [ 53 | PageView.builder( 54 | onPageChanged: (view) { 55 | setState(() { 56 | this.currentView = view + 1; 57 | }); 58 | }, 59 | itemCount: widget.sellModel.sellImages.length, 60 | itemBuilder: (BuildContext context, int index) { 61 | return _buildImagewidget( 62 | widget.sellModel.sellImages[index]); 63 | }, 64 | ), 65 | Positioned( 66 | bottom: 0.0, 67 | right: 0.0, 68 | child: Container( 69 | color: Colors.black, 70 | child: Row( 71 | children: [ 72 | Padding( 73 | padding: const EdgeInsets.only( 74 | top: 3.0, left: 5.0, bottom: 3.0, right: 3.0), 75 | child: Text( 76 | "${this.currentView}/${widget.sellModel.sellImages.length}", 77 | style: TextStyle( 78 | color: Colors.white, fontSize: 17.0), 79 | ), 80 | ), 81 | Padding( 82 | padding: const EdgeInsets.only( 83 | top: 3.0, right: 5.0, bottom: 3.0), 84 | child: Icon( 85 | Icons.wallpaper, 86 | color: Colors.white, 87 | size: 18.0, 88 | ), 89 | ) 90 | ], 91 | ), 92 | ), 93 | ), 94 | ], 95 | ) 96 | : placeHolderAssetWidget(), 97 | ), 98 | ), 99 | actions: [ 100 | IconButton( 101 | icon: Icon( 102 | Icons.edit, 103 | color: Colors.white, 104 | ), 105 | onPressed: () { 106 | Navigator.push( 107 | context, 108 | MaterialPageRoute( 109 | builder: (context) => PropertySell( 110 | sellModel: widget.sellModel, 111 | ), 112 | ), 113 | ); 114 | }, 115 | ), 116 | IconButton( 117 | icon: Icon( 118 | Icons.favorite_border, 119 | color: Colors.white, 120 | ), 121 | onPressed: () {}, 122 | ), 123 | ], 124 | ); 125 | } 126 | 127 | Widget _buildSliverListBodyWidget(String postedDate) { 128 | return SliverList( 129 | delegate: SliverChildListDelegate([ 130 | Container( 131 | padding: EdgeInsets.only(top: 20.0), 132 | width: double.infinity, 133 | child: Text( 134 | getPropertyTypeById(widget.sellModel.sellType), 135 | textAlign: TextAlign.center, 136 | softWrap: true, 137 | style: TextStyle( 138 | fontSize: 20.0, fontWeight: FontWeight.bold, color: themeColor), 139 | ), 140 | ), 141 | Container( 142 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), 143 | width: double.infinity, 144 | child: Text( 145 | "Posted on ${postedDate}", 146 | textAlign: TextAlign.center, 147 | softWrap: true, 148 | style: TextStyle(fontSize: 16.0, color: themeColor), 149 | ), 150 | ), 151 | _buildPropertyDetailsWidget(), 152 | PropertyAddressView("Address", widget.sellModel.sellAddress), 153 | Divider( 154 | height: 1, 155 | color: Colors.transparent, 156 | ), 157 | PropertyAddressView("City", widget.sellModel.sellCity), 158 | Divider( 159 | height: 1, 160 | color: Colors.transparent, 161 | ), 162 | PropertyAddressView("Country", widget.sellModel.sellCountry), 163 | Divider( 164 | height: 1, 165 | color: Colors.transparent, 166 | ), 167 | PropertyAddressView("Contact", widget.sellModel.sellContact), 168 | Container( 169 | padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), 170 | width: double.infinity, 171 | child: Text( 172 | "Description", 173 | textAlign: TextAlign.center, 174 | softWrap: true, 175 | style: TextStyle( 176 | fontSize: 16.0, fontWeight: FontWeight.bold, color: themeColor), 177 | ), 178 | ), 179 | Container( 180 | padding: EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0), 181 | width: double.infinity, 182 | child: Text( 183 | widget.sellModel.sellDescription.isEmpty 184 | ? "-" 185 | : widget.sellModel.sellDescription, 186 | textAlign: TextAlign.center, 187 | softWrap: true, 188 | style: TextStyle(fontSize: 16.0, color: themeColor), 189 | ), 190 | ), 191 | ]), 192 | ); 193 | } 194 | 195 | Widget _buildPropertyDetailsWidget() { 196 | return Padding( 197 | padding: const EdgeInsets.symmetric(vertical: 10.0), 198 | child: Row( 199 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 200 | children: [ 201 | Column( 202 | children: [ 203 | Icon( 204 | Icons.hotel, 205 | size: 20.0, 206 | ), 207 | Text("${widget.sellModel.sellBedrooms} BHK Bedroom"), 208 | ], 209 | ), 210 | Column( 211 | children: [ 212 | Icon( 213 | Icons.event_seat, 214 | size: 20.0, 215 | ), 216 | Text("${widget.sellModel.sellBathrooms} Bathroom"), 217 | ], 218 | ), 219 | Column( 220 | children: [ 221 | Icon( 222 | Icons.burst_mode, 223 | size: 20.0, 224 | ), 225 | Text("${widget.sellModel.sellBalconies} Balcony"), 226 | ], 227 | ), 228 | ], 229 | ), 230 | ); 231 | } 232 | 233 | Widget _buildImagewidget(String imageUrl) { 234 | return Container( 235 | child: imageUrl.length == 0 || imageUrl.isEmpty 236 | ? placeHolderAssetWidget() 237 | : fetchImageFromNetworkFileWithPlaceHolder(imageUrl), 238 | /*CachedNetworkImage( 239 | imageUrl: imageUrl, 240 | placeholder: (context, url) => placeHolderAssetWidget(), 241 | errorWidget: (context, url, error) => placeHolderAssetWidget(), 242 | imageBuilder: (context, imageProvider) => Container( 243 | decoration: BoxDecoration( 244 | image: DecorationImage( 245 | image: imageProvider, 246 | fit: BoxFit.cover, 247 | colorFilter: ColorFilter.mode(Colors.transparent, BlendMode.overlay)), 248 | ), 249 | ), 250 | ),*/ 251 | ); 252 | } 253 | 254 | Widget PropertyAddressView(String label, String Value) { 255 | return Container( 256 | color: Colors.grey[200], 257 | padding: EdgeInsets.symmetric(vertical: 10.0), 258 | child: Column( 259 | crossAxisAlignment: CrossAxisAlignment.start, 260 | children: [ 261 | Padding( 262 | padding: 263 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 2.5), 264 | child: Text( 265 | label, 266 | style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w500), 267 | ), 268 | ), 269 | Padding( 270 | padding: 271 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 2.5), 272 | child: Text( 273 | Value, 274 | style: TextStyle(fontSize: 12.0), 275 | ), 276 | ), 277 | ], 278 | ), 279 | ); 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /lib/property/property_listing.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:firebase_database/firebase_database.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_property_app/models/model_propertysell.dart'; 5 | import 'package:flutter_property_app/property/property_details.dart'; 6 | import 'package:flutter_property_app/property/property_sell.dart'; 7 | import 'package:flutter_property_app/utils/method_utils.dart'; 8 | import 'package:flutter_property_app/utils/network_utils.dart'; 9 | 10 | class PropertyListing extends StatefulWidget { 11 | @override 12 | _PropertyListingState createState() => _PropertyListingState(); 13 | } 14 | 15 | class _PropertyListingState extends State { 16 | bool isFetching = false; 17 | GlobalKey _scaffoldKey = GlobalKey(); 18 | List propertySellList = []; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | 24 | fetchSellPropertyData(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | key: _scaffoldKey, 31 | appBar: AppBar( 32 | title: Text("Property Listing"), 33 | ), 34 | body: isFetching 35 | ? Center(child: CircularProgressIndicator()) 36 | : _buildPropertyListWidget(), 37 | floatingActionButton: FloatingActionButton( 38 | onPressed: () { 39 | Navigator.pushNamed(context, PropertySell.routeName); 40 | }, 41 | heroTag: null, 42 | child: Icon( 43 | Icons.add, 44 | color: Colors.white, 45 | ), 46 | ), 47 | ); 48 | } 49 | 50 | Widget _buildPropertyListWidget() { 51 | if (propertySellList == null || propertySellList.length == 0) { 52 | return Center( 53 | child: Text( 54 | "No data found!!", 55 | style: TextStyle(fontSize: 20), 56 | ), 57 | ); 58 | } 59 | 60 | return ListView.builder( 61 | padding: EdgeInsets.only(bottom: 5.0), 62 | itemCount: propertySellList.length, 63 | itemBuilder: (BuildContext context, int index) { 64 | var sellModel = propertySellList[index]; 65 | return GestureDetector( 66 | onTap: () { 67 | Navigator.push( 68 | context, 69 | MaterialPageRoute( 70 | builder: (context) => PropertyDetails(sellModel))); 71 | }, 72 | child: Card( 73 | margin: EdgeInsets.only(top: 5.0, left: 5.0, right: 5.0), 74 | elevation: 5, 75 | shape: RoundedRectangleBorder( 76 | borderRadius: BorderRadius.all(Radius.circular(5.0)), 77 | ), 78 | child: Container( 79 | height: 120, 80 | child: Row( 81 | children: [ 82 | ClipRRect( 83 | borderRadius: BorderRadius.only( 84 | topLeft: Radius.circular(5.0), 85 | bottomLeft: Radius.circular(5.0)), 86 | child: _buildImagewidget(sellModel)), 87 | Expanded( 88 | child: _buildPropertyInfoWidget(sellModel), 89 | ), 90 | ], 91 | ), 92 | ), 93 | ), 94 | ); 95 | }, 96 | ); 97 | } 98 | 99 | Widget _buildImagewidget(PropertySellModel sellModel) { 100 | return Hero( 101 | tag: sellModel.id, 102 | child: Container( 103 | height: 120.0, 104 | width: 120.0, 105 | child: sellModel.sellImages == null || 106 | sellModel.sellImages.length == 0 || 107 | sellModel.sellImages[0].isEmpty 108 | ? placeHolderAssetWidget() 109 | : fetchImageFromNetworkFileWithPlaceHolder(sellModel.sellImages[0]), 110 | /*CachedNetworkImage( 111 | imageUrl: sellModel.sellImages[0], 112 | placeholder: (context, url) => placeHolderAssetWidget(), 113 | errorWidget: (context, url, error) => placeHolderAssetWidget(), 114 | imageBuilder: (context, imageProvider) => Container( 115 | decoration: BoxDecoration( 116 | image: DecorationImage( 117 | image: imageProvider, 118 | fit: BoxFit.cover, 119 | colorFilter: ColorFilter.mode( 120 | Colors.transparent, BlendMode.colorBurn)), 121 | ), 122 | ), 123 | ),*/ 124 | ), 125 | ); 126 | } 127 | 128 | Widget _buildPropertyInfoWidget(PropertySellModel sellModel) { 129 | return Stack( 130 | children: [ 131 | Column( 132 | crossAxisAlignment: CrossAxisAlignment.start, 133 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 134 | children: [ 135 | Padding( 136 | padding: const EdgeInsets.only(top: 5.0, right: 5.0, left: 5.0), 137 | child: Text( 138 | "Rs. ${sellModel.sellPrice}", 139 | style: TextStyle( 140 | color: Theme.of(context).primaryColor, 141 | fontSize: 18.0, 142 | fontWeight: FontWeight.bold), 143 | ), 144 | ), 145 | Padding( 146 | padding: const EdgeInsets.only(top: 5.0, right: 5.0, left: 5.0), 147 | child: Text( 148 | "${sellModel.sellBedrooms} BHK ${getPropertyTypeById(sellModel.sellType)}")), 149 | Padding( 150 | padding: const EdgeInsets.only(top: 5.0, right: 5.0, left: 5.0), 151 | child: Text(sellModel.sellCity), 152 | ), 153 | Padding( 154 | padding: const EdgeInsets.only(top: 5.0, right: 5.0, left: 5.0), 155 | child: Row( 156 | children: [ 157 | Icon( 158 | Icons.phone, 159 | color: Theme.of(context).primaryColor, 160 | ), 161 | Padding( 162 | padding: const EdgeInsets.only(left: 5.0), 163 | child: Text(sellModel.sellContact), 164 | ), 165 | ], 166 | ), 167 | ), 168 | ], 169 | ), 170 | Positioned( 171 | right: 0.0, 172 | top: 0.0, 173 | child: IconButton( 174 | onPressed: () {}, 175 | icon: Icon( 176 | Icons.favorite_border, 177 | color: Colors.red, 178 | ), 179 | ), 180 | ), 181 | ], 182 | ); 183 | } 184 | 185 | fetchSellPropertyData() async { 186 | NetworkCheck networkCheck = NetworkCheck(); 187 | networkCheck.checkInternet((isNetworkPresent) async { 188 | if (!isNetworkPresent) { 189 | final snackBar = SnackBar(content: Text("Please check your internet connection !!")); 190 | 191 | _scaffoldKey.currentState.showSnackBar(snackBar); 192 | return; 193 | } else { 194 | setState(() { 195 | isFetching = true; 196 | }); 197 | } 198 | }); 199 | 200 | try { 201 | final propertySellReference = FirebaseDatabase.instance.reference().child("Property").child("Sell"); 202 | 203 | propertySellReference.onValue.listen((Event event) { 204 | propertySellList = []; 205 | if (event.snapshot.value != null) { 206 | print("value: ${event.snapshot}"); 207 | print("value: ${event.snapshot.key}"); 208 | print("value: ${event.snapshot.value}"); 209 | for (var value in event.snapshot.value.values) { 210 | print("valueData : ${value}"); 211 | propertySellList.add(PropertySellModel.fromJson(value)); 212 | } 213 | } 214 | 215 | print("propertySellList : ${propertySellList}"); 216 | print("propertySellList : ${propertySellList.length}"); 217 | setState(() { 218 | isFetching = false; 219 | }); 220 | }); 221 | } catch (error) { 222 | print("catch block : " + error.toString()); 223 | 224 | setState(() { 225 | isFetching = false; 226 | }); 227 | } 228 | } 229 | } 230 | -------------------------------------------------------------------------------- /lib/property/property_sell.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:firebase_database/firebase_database.dart'; 3 | import 'package:firebase_storage/firebase_storage.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_property_app/models/model_propertysell.dart'; 6 | import 'package:flutter_property_app/utils/color_utils.dart'; 7 | import 'package:flutter_property_app/utils/method_utils.dart'; 8 | import 'package:flutter_property_app/utils/network_utils.dart'; 9 | import 'package:geolocator/geolocator.dart'; 10 | import 'package:image_picker/image_picker.dart'; 11 | import 'package:flutter/services.dart'; 12 | import 'package:flutter_property_app/main.dart'; 13 | 14 | class PropertySell extends StatefulWidget { 15 | final PropertySellModel sellModel; 16 | static const routeName = "/property-sell"; 17 | 18 | PropertySell({this.sellModel}); 19 | 20 | @override 21 | _PropertySellState createState() => _PropertySellState(); 22 | } 23 | 24 | class _PropertySellState extends State { 25 | static int currentPage = 0; 26 | PageController pageController = 27 | PageController(viewportFraction: 1, initialPage: currentPage); 28 | 29 | GlobalKey _scaffoldKey = GlobalKey(); 30 | GlobalKey _formKey = GlobalKey(); 31 | 32 | TextEditingController addressController = TextEditingController(); 33 | TextEditingController cityController = TextEditingController(); 34 | TextEditingController regionController = TextEditingController(); 35 | TextEditingController countryController = TextEditingController(); 36 | TextEditingController priceController = TextEditingController(); 37 | TextEditingController bedroomController = TextEditingController(); 38 | TextEditingController bathroomController = TextEditingController(); 39 | TextEditingController balconyController = TextEditingController(); 40 | TextEditingController descriptionController = TextEditingController(); 41 | TextEditingController contactController = TextEditingController(); 42 | 43 | int selected = 0; 44 | List _imageFilesList = []; 45 | var isUploadingPost = false; 46 | var isEditInitialised = true; 47 | 48 | @override 49 | void didChangeDependencies() { 50 | if (widget.sellModel != null) { 51 | if (isEditInitialised) { 52 | addressController.text = widget.sellModel.sellAddress; 53 | cityController.text = widget.sellModel.sellCity; 54 | regionController.text = widget.sellModel.sellRegion; 55 | countryController.text = widget.sellModel.sellCountry; 56 | priceController.text = widget.sellModel.sellPrice; 57 | bedroomController.text = widget.sellModel.sellBedrooms; 58 | bathroomController.text = widget.sellModel.sellBathrooms; 59 | balconyController.text = widget.sellModel.sellBalconies; 60 | descriptionController.text = widget.sellModel.sellDescription; 61 | contactController.text = widget.sellModel.sellContact; 62 | selected = widget.sellModel.sellType; 63 | 64 | if (widget.sellModel.sellImages != null && 65 | widget.sellModel.sellImages.length > 0) { 66 | _imageFilesList = widget.sellModel.sellImages; 67 | 68 | print("_imageFilesList : ${_imageFilesList.length}"); 69 | print("_imageFilesList : ${_imageFilesList}"); 70 | } 71 | 72 | isEditInitialised = false; 73 | } 74 | } 75 | 76 | super.didChangeDependencies(); 77 | } 78 | 79 | _getLocation() async { 80 | try { 81 | Geolocator geolocator = Geolocator(); 82 | Position currentLocation = await geolocator.getCurrentPosition( 83 | desiredAccuracy: LocationAccuracy.best); 84 | List placemark = await Geolocator().placemarkFromCoordinates( 85 | currentLocation.latitude, currentLocation.longitude); 86 | 87 | if (currentLocation != null) { 88 | print("country : ${placemark[0].country}"); 89 | print("position : ${placemark[0].position}"); 90 | print("locality : ${placemark[0].locality}"); 91 | print("administrativeArea : ${placemark[0].administrativeArea}"); 92 | print("postalCode : ${placemark[0].postalCode}"); 93 | print("name : ${placemark[0].name}"); 94 | print("subAdministrativeArea : ${placemark[0].subAdministrativeArea}"); 95 | print("isoCountryCode : ${placemark[0].isoCountryCode}"); 96 | print("subLocality : ${placemark[0].subLocality}"); 97 | print("subThoroughfare : ${placemark[0].subThoroughfare}"); 98 | print("thoroughfare : ${placemark[0].thoroughfare}"); 99 | 100 | if (placemark[0] != null) { 101 | if (placemark[0].country.isNotEmpty) { 102 | countryController.text = placemark[0].country; 103 | } 104 | 105 | if (placemark[0].administrativeArea.isNotEmpty) { 106 | regionController.text = placemark[0].administrativeArea; 107 | } 108 | 109 | if (placemark[0].subAdministrativeArea.isNotEmpty) { 110 | cityController.text = placemark[0].subAdministrativeArea; 111 | } 112 | 113 | if (placemark[0].name.isNotEmpty) { 114 | addressController.text = placemark[0].name; 115 | } 116 | 117 | setState(() {}); 118 | } 119 | } 120 | } on PlatformException catch (error) { 121 | print(error.message); 122 | } catch (error) { 123 | print("Error: $error"); 124 | } 125 | } 126 | 127 | @override 128 | Widget build(BuildContext context) { 129 | return Scaffold( 130 | key: _scaffoldKey, 131 | backgroundColor: Colors.grey[100], 132 | appBar: AppBar( 133 | titleSpacing: 0, 134 | title: Text("Sell/Rent Property"), 135 | ), 136 | body: Column( 137 | children: [ 138 | Expanded( 139 | child: SingleChildScrollView( 140 | scrollDirection: Axis.vertical, 141 | child: Form( 142 | key: _formKey, 143 | child: Column( 144 | mainAxisSize: MainAxisSize.min, 145 | mainAxisAlignment: MainAxisAlignment.start, 146 | crossAxisAlignment: CrossAxisAlignment.start, 147 | children: [ 148 | _buildLabel("PROPERTY TYPE"), 149 | _buildPropertyTypesWidget(), 150 | _buildLabel("PROPERTY PHOTOS"), 151 | _buildPropertyPhotosWidget(), 152 | _buildLabel("PROPERTY ADDRESS"), 153 | _buildPropertyLocationWidget(), 154 | _buildLabel("PRICE"), 155 | _buildPriceWidget(), 156 | _buildLabel("PROPERTY DETAILS"), 157 | _buildPropertyDetailsWidget(), 158 | _buildLabel("CONTACT DETAILS"), 159 | _buildContactDetailsWidget(), 160 | _buildLabel("OTHER DETAILS"), 161 | _buildOtherDetailsWidget(), 162 | ], 163 | ), 164 | ), 165 | ), 166 | ), 167 | _buildSubmitPostWidget(), 168 | ], 169 | ), 170 | ); 171 | } 172 | 173 | Widget _buildLabel(String label) { 174 | return Padding( 175 | padding: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), 176 | child: Text( 177 | label, 178 | style: TextStyle(color: TextLabelColor, fontSize: 11.0), 179 | textAlign: TextAlign.start, 180 | ), 181 | ); 182 | } 183 | 184 | Widget _buildPropertyTypesWidget() { 185 | return Container( 186 | color: Colors.white, 187 | padding: const EdgeInsets.symmetric(vertical: 10.0), 188 | margin: EdgeInsets.only(top: 10.0), 189 | child: Row( 190 | mainAxisAlignment: MainAxisAlignment.spaceAround, 191 | children: [ 192 | InkWell( 193 | onTap: () { 194 | setState(() { 195 | selected = selected == 1 ? 0 : 1; 196 | }); 197 | }, 198 | child: Column( 199 | children: [ 200 | Icon( 201 | Icons.business, 202 | size: 70, 203 | color: selected == 1 ? Colors.red : UnselectedIconColor, 204 | ), 205 | Text( 206 | "Apartment", 207 | style: TextStyle(fontSize: 13.0), 208 | ), 209 | ], 210 | ), 211 | ), 212 | InkWell( 213 | onTap: () { 214 | setState(() { 215 | selected = selected == 2 ? 0 : 2; 216 | }); 217 | }, 218 | child: Column( 219 | children: [ 220 | Icon( 221 | Icons.home, 222 | size: 70, 223 | color: selected == 2 ? Colors.green : UnselectedIconColor, 224 | ), 225 | Text( 226 | "Flat", 227 | style: TextStyle(fontSize: 13.0), 228 | ), 229 | ], 230 | ), 231 | ), 232 | InkWell( 233 | onTap: () { 234 | setState(() { 235 | selected = selected == 3 ? 0 : 3; 236 | }); 237 | }, 238 | child: Column( 239 | children: [ 240 | Icon( 241 | Icons.landscape, 242 | size: 70, 243 | color: selected == 3 ? Colors.blue : UnselectedIconColor, 244 | ), 245 | Text( 246 | "Plot/Land", 247 | style: TextStyle(fontSize: 13.0), 248 | ), 249 | ], 250 | ), 251 | ), 252 | ], 253 | ), 254 | ); 255 | } 256 | 257 | Widget _buildPropertyPhotosWidget() { 258 | return Container( 259 | color: Colors.white, 260 | height: 120.0, 261 | padding: const EdgeInsets.symmetric(vertical: 10.0), 262 | margin: EdgeInsets.only(top: 10.0), 263 | child: Row( 264 | mainAxisAlignment: MainAxisAlignment.center, 265 | crossAxisAlignment: CrossAxisAlignment.start, 266 | children: [ 267 | Padding( 268 | padding: const EdgeInsets.only(left: 15.0, right: 10.0), 269 | child: Column( 270 | children: [ 271 | IconButton( 272 | onPressed: () { 273 | _openImagePicker(context); 274 | }, 275 | icon: Icon(Icons.camera_enhance), 276 | color: Colors.grey, 277 | iconSize: 65.0, 278 | ), 279 | Text( 280 | "Add Photos", 281 | style: TextStyle(fontSize: 13.0), 282 | ), 283 | ], 284 | ), 285 | ), 286 | Expanded( 287 | child: Container( 288 | child: ListView.builder( 289 | itemCount: _imageFilesList.length, 290 | padding: EdgeInsets.only(left: 10.0, right: 10.0), 291 | shrinkWrap: true, 292 | scrollDirection: Axis.horizontal, 293 | itemBuilder: (BuildContext context, int index) { 294 | return Center( 295 | child: Container( 296 | margin: EdgeInsets.only(right: 10.0), 297 | height: 80.0, 298 | width: 80.0, 299 | child: Stack( 300 | children: [ 301 | ClipOval( 302 | child: _imageFilesList[index] != null && 303 | _imageFilesList[index].isNotEmpty 304 | ? checkForFileOrNetworkPath( 305 | _imageFilesList[index]) 306 | ? fetchImageFromNetworkFileWithPlaceHolderWidthHeight( 307 | 80.0, 80.0, _imageFilesList[index]) 308 | /*Image.network( 309 | _imageFilesList[index], 310 | fit: BoxFit.cover, 311 | height: 80.0, 312 | width: 80.0, 313 | )*/ 314 | : Image.file( 315 | File(_imageFilesList[index]), 316 | fit: BoxFit.cover, 317 | height: 80.0, 318 | width: 80.0, 319 | ) 320 | : Image.asset( 321 | "assets/images/transparent_placeholder.png", 322 | fit: BoxFit.cover, 323 | height: 80.0, 324 | width: 80.0, 325 | ), 326 | ), 327 | GestureDetector( 328 | onTap: () { 329 | setState(() { 330 | _imageFilesList.removeAt(index); 331 | }); 332 | }, 333 | child: Container( 334 | alignment: Alignment.topRight, 335 | child: Image.asset( 336 | "assets/images/cancel.png", 337 | fit: BoxFit.fitHeight, 338 | height: 20.0, 339 | width: 20.0, 340 | color: Colors.grey, 341 | ), 342 | ), 343 | ), 344 | ], 345 | ), 346 | ), 347 | ); 348 | }, 349 | ), 350 | ), 351 | ), 352 | ], 353 | ), 354 | ); 355 | } 356 | 357 | void _openImagePicker(BuildContext context) { 358 | showModalBottomSheet( 359 | context: context, 360 | builder: (BuildContext context) { 361 | return Container( 362 | height: 150.0, 363 | padding: EdgeInsets.all(20.0), 364 | child: Column( 365 | children: [ 366 | Center( 367 | child: Text( 368 | "Select Image", 369 | style: TextStyle( 370 | fontSize: 25.0, 371 | fontWeight: FontWeight.bold, 372 | color: themeColor, 373 | ), 374 | ), 375 | ), 376 | SizedBox( 377 | height: 10.0, 378 | ), 379 | GestureDetector( 380 | onTap: () { 381 | _getImage(context, ImageSource.camera); 382 | Navigator.of(context).pop(); 383 | }, 384 | child: Row( 385 | children: [ 386 | Icon( 387 | Icons.photo_camera, 388 | size: 30.0, 389 | color: themeColor, 390 | ), 391 | Padding( 392 | padding: EdgeInsets.symmetric( 393 | horizontal: 10.0, 394 | ), 395 | ), 396 | Text( 397 | "Use Camera", 398 | style: TextStyle( 399 | fontSize: 15.0, 400 | color: themeColor, 401 | ), 402 | ), 403 | ], 404 | ), 405 | ), 406 | SizedBox( 407 | height: 10.0, 408 | ), 409 | GestureDetector( 410 | onTap: () { 411 | _getImage(context, ImageSource.gallery); 412 | Navigator.of(context).pop(); 413 | }, 414 | child: Row( 415 | children: [ 416 | Icon( 417 | Icons.camera, 418 | size: 30.0, 419 | color: themeColor, 420 | ), 421 | Padding( 422 | padding: EdgeInsets.symmetric( 423 | horizontal: 10.0, 424 | ), 425 | ), 426 | Text( 427 | "Use Gallery", 428 | style: TextStyle( 429 | fontSize: 15.0, 430 | color: themeColor, 431 | ), 432 | ) 433 | ], 434 | ), 435 | ), 436 | ], 437 | ), 438 | ); 439 | }); 440 | } 441 | 442 | _getImage(BuildContext context, ImageSource source) async { 443 | ImagePicker.pickImage( 444 | source: source, 445 | maxWidth: 400.0, 446 | maxHeight: 400.0, 447 | ).then((File image) async { 448 | if (image != null) { 449 | setState(() { 450 | _imageFilesList.add(image.path); 451 | print("_imageFile : ${image}"); 452 | print("filePath : ${image.path}"); 453 | print("fileURI : ${image.uri}"); 454 | /*String filePath = image.path; 455 | Uri fileURI = image.uri;*/ 456 | }); 457 | } 458 | }); 459 | } 460 | 461 | Widget _buildPropertyLocationWidget() { 462 | return Container( 463 | color: Colors.white, 464 | padding: const EdgeInsets.symmetric(vertical: 10.0), 465 | margin: EdgeInsets.only(top: 10.0), 466 | child: Column( 467 | children: [ 468 | GestureDetector( 469 | onTap: () { 470 | _getLocation(); 471 | }, 472 | child: Row( 473 | children: [ 474 | Padding( 475 | padding: EdgeInsets.only(left: 20.0, right: 10.0), 476 | child: Icon( 477 | Icons.my_location, 478 | color: Theme.of(context).primaryColor, 479 | ), 480 | ), 481 | Padding( 482 | padding: EdgeInsets.only(left: 10.0, right: 20.0), 483 | child: Text("Detect Property Location"), 484 | ), 485 | ], 486 | ), 487 | ), 488 | Padding( 489 | padding: 490 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 491 | child: TextFormField( 492 | controller: addressController, 493 | style: TextStyle(color: Colors.black), 494 | decoration: InputDecoration( 495 | labelText: "Address", 496 | labelStyle: TextStyle(color: Colors.grey), 497 | ), 498 | validator: (String address) { 499 | if (address.isEmpty) { 500 | return "Address field is required!!"; 501 | } 502 | }, 503 | ), 504 | ), 505 | Padding( 506 | padding: 507 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 508 | child: TextFormField( 509 | controller: cityController, 510 | style: TextStyle(color: Colors.black), 511 | decoration: InputDecoration( 512 | labelText: "City", 513 | labelStyle: TextStyle(color: Colors.grey), 514 | ), 515 | validator: (String city) { 516 | if (city.isEmpty) { 517 | return "City field is required!!"; 518 | } 519 | }, 520 | ), 521 | ), 522 | Padding( 523 | padding: 524 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 525 | child: TextFormField( 526 | controller: regionController, 527 | style: TextStyle(color: Colors.black), 528 | decoration: InputDecoration( 529 | labelText: "Region (Optional)", 530 | labelStyle: TextStyle(color: Colors.grey), 531 | ), 532 | ), 533 | ), 534 | Padding( 535 | padding: 536 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 537 | child: TextFormField( 538 | validator: (String country) { 539 | if (country.isEmpty) { 540 | return "Country field is required!!"; 541 | } 542 | }, 543 | controller: countryController, 544 | style: TextStyle(color: Colors.black), 545 | decoration: InputDecoration( 546 | labelText: "Country", 547 | labelStyle: TextStyle(color: Colors.grey), 548 | ), 549 | ), 550 | ), 551 | ], 552 | ), 553 | ); 554 | } 555 | 556 | Widget _buildPriceWidget() { 557 | return Container( 558 | color: Colors.white, 559 | padding: const EdgeInsets.symmetric(vertical: 10.0), 560 | margin: EdgeInsets.only(top: 10.0), 561 | child: Padding( 562 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 563 | child: TextFormField( 564 | validator: (String price) { 565 | if (price.isEmpty) { 566 | return "Price field is required!!"; 567 | } 568 | }, 569 | keyboardType: TextInputType.number, 570 | controller: priceController, 571 | style: TextStyle(color: Colors.black), 572 | decoration: InputDecoration( 573 | labelText: "Price", 574 | labelStyle: TextStyle(color: Colors.grey), 575 | ), 576 | ), 577 | ), 578 | ); 579 | } 580 | 581 | Widget _buildPropertyDetailsWidget() { 582 | return Container( 583 | color: Colors.white, 584 | padding: const EdgeInsets.symmetric(vertical: 10.0), 585 | margin: EdgeInsets.only(top: 10.0), 586 | child: Column( 587 | children: [ 588 | Padding( 589 | padding: 590 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 591 | child: TextFormField( 592 | validator: (String bedrooms) { 593 | if (bedrooms.isEmpty) { 594 | return "Bedroom field is required!!"; 595 | } 596 | }, 597 | controller: bedroomController, 598 | keyboardType: TextInputType.number, 599 | style: TextStyle(color: Colors.black), 600 | decoration: InputDecoration( 601 | labelText: "BedRoom(s)", 602 | labelStyle: TextStyle(color: Colors.grey), 603 | ), 604 | ), 605 | ), 606 | Padding( 607 | padding: 608 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 609 | child: TextFormField( 610 | controller: bathroomController, 611 | keyboardType: TextInputType.number, 612 | style: TextStyle(color: Colors.black), 613 | decoration: InputDecoration( 614 | labelText: "BathRoom(s)", 615 | labelStyle: TextStyle(color: Colors.grey), 616 | ), 617 | ), 618 | ), 619 | Padding( 620 | padding: 621 | const EdgeInsets.symmetric(horizontal: 20.0, vertical: 5.0), 622 | child: TextFormField( 623 | controller: balconyController, 624 | keyboardType: TextInputType.number, 625 | style: TextStyle(color: Colors.black), 626 | decoration: InputDecoration( 627 | labelText: "No. of Balconies", 628 | labelStyle: TextStyle(color: Colors.grey), 629 | ), 630 | ), 631 | ), 632 | ], 633 | ), 634 | ); 635 | } 636 | 637 | Widget _buildContactDetailsWidget() { 638 | return Container( 639 | color: Colors.white, 640 | padding: const EdgeInsets.symmetric(vertical: 10.0), 641 | margin: EdgeInsets.only(top: 10.0), 642 | child: Padding( 643 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 644 | child: TextFormField( 645 | validator: (String contact) { 646 | if (contact.isEmpty) { 647 | return "Contact field is required!!"; 648 | } 649 | }, 650 | keyboardType: TextInputType.number, 651 | maxLength: 10, 652 | controller: contactController, 653 | style: TextStyle(color: Colors.black), 654 | decoration: InputDecoration( 655 | counterText: "", 656 | labelText: "Contact", 657 | labelStyle: TextStyle(color: Colors.grey), 658 | ), 659 | ), 660 | ), 661 | ); 662 | } 663 | 664 | Widget _buildOtherDetailsWidget() { 665 | return Container( 666 | color: Colors.white, 667 | padding: const EdgeInsets.symmetric(vertical: 10.0), 668 | margin: EdgeInsets.only(top: 10.0), 669 | child: Padding( 670 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 671 | child: TextFormField( 672 | controller: descriptionController, 673 | style: TextStyle(color: Colors.black), 674 | decoration: InputDecoration( 675 | labelText: "Additional Property Description", 676 | labelStyle: TextStyle(color: Colors.grey), 677 | ), 678 | ), 679 | ), 680 | ); 681 | } 682 | 683 | Widget _buildSubmitPostWidget() { 684 | return GestureDetector( 685 | onTap: () { 686 | _submitPropertySellPost(); 687 | }, 688 | child: Container( 689 | color: Theme.of(context).primaryColor, 690 | padding: const EdgeInsets.only(top: 10.0), 691 | margin: EdgeInsets.only(top: 10.0), 692 | width: double.infinity, 693 | height: 50.0, 694 | child: Center( 695 | child: Text( 696 | isUploadingPost ? "Uploading..." : "Submit Post", 697 | style: TextStyle( 698 | color: Colors.white, 699 | fontWeight: FontWeight.bold, 700 | fontSize: 18.0, 701 | letterSpacing: 2.0), 702 | ), 703 | ), 704 | ), 705 | ); 706 | } 707 | 708 | _submitPropertySellPost() async { 709 | if (selected == 0) { 710 | final snackBar = SnackBar(content: Text("Select property type!!")); 711 | 712 | _scaffoldKey.currentState.showSnackBar(snackBar); 713 | return; 714 | } 715 | 716 | if (!_formKey.currentState.validate()) { 717 | return; 718 | } 719 | 720 | NetworkCheck networkCheck = NetworkCheck(); 721 | networkCheck.checkInternet((isNetworkPresent) async { 722 | if (!isNetworkPresent) { 723 | final snackBar = 724 | SnackBar(content: Text("Please check your internet connection !!")); 725 | 726 | _scaffoldKey.currentState.showSnackBar(snackBar); 727 | return; 728 | } else { 729 | setState(() { 730 | isUploadingPost = true; 731 | }); 732 | } 733 | }); 734 | 735 | try { 736 | List imagePaths = []; 737 | try { 738 | if (_imageFilesList != null && _imageFilesList.length > 0) { 739 | imagePaths = await uploadImage(_imageFilesList); 740 | print("imagePaths : ${imagePaths}"); 741 | print("imagePaths : ${imagePaths.length}"); 742 | } 743 | } catch (error) { 744 | print("uploadError : ${error.toString()}"); 745 | } 746 | 747 | final propertySellReference = 748 | FirebaseDatabase.instance.reference().child("Property").child("Sell"); 749 | print("_imageFilesList : ${_imageFilesList.length}"); 750 | print("imagePaths : ${imagePaths.length}"); 751 | 752 | String resourceID = propertySellReference.push().key; 753 | 754 | if (widget.sellModel == null || widget.sellModel.id == null) { 755 | await propertySellReference.child(resourceID).set({ 756 | "id": resourceID, 757 | "sellType": selected, 758 | "sellImages": 759 | imagePaths != null && imagePaths.length > 0 ? imagePaths : "", 760 | "sellAddress": addressController.text, 761 | "sellCity": cityController.text, 762 | "sellRegion": regionController.text, 763 | "sellCountry": countryController.text, 764 | "sellPrice": priceController.text, 765 | "sellBathrooms": bathroomController.text, 766 | "sellBedrooms": bedroomController.text, 767 | "sellBalconies": balconyController.text, 768 | "sellContact": contactController.text, 769 | "sellDescription": descriptionController.text, 770 | "updatedAt": DateTime.now().toIso8601String(), 771 | }); 772 | } else { 773 | await propertySellReference.child(widget.sellModel.id).update({ 774 | "id": widget.sellModel.id, 775 | "sellType": selected, 776 | "sellImages": 777 | imagePaths != null && imagePaths.length > 0 ? imagePaths : "", 778 | "sellAddress": addressController.text, 779 | "sellCity": cityController.text, 780 | "sellRegion": regionController.text, 781 | "sellCountry": countryController.text, 782 | "sellPrice": priceController.text, 783 | "sellBathrooms": bathroomController.text, 784 | "sellBedrooms": bedroomController.text, 785 | "sellBalconies": balconyController.text, 786 | "sellContact": contactController.text, 787 | "sellDescription": descriptionController.text, 788 | "updatedAt": DateTime.now().toIso8601String(), 789 | }); 790 | } 791 | 792 | setState(() { 793 | isUploadingPost = false; 794 | }); 795 | 796 | var propertyName=bedroomController.text+ " BHK "+ getPropertyTypeById(selected) + " is for sale !!"; 797 | var contact="Contact : ${contactController.text}"; 798 | repeatNotification(propertyName,contact); 799 | 800 | Navigator.of(context).pop(); 801 | } catch (error) { 802 | print("catch block : " + error.toString()); 803 | 804 | setState(() { 805 | isUploadingPost = false; 806 | }); 807 | final snackBar = 808 | SnackBar(content: Text("Something went wrong. please try again !!")); 809 | _scaffoldKey.currentState.showSnackBar(snackBar); 810 | } 811 | } 812 | 813 | Future> uploadImage(List imageFiles) async { 814 | List filePaths = []; 815 | 816 | print("filePaths : ${filePaths}"); 817 | for (int i = 0; i < imageFiles.length; i++) { 818 | if (checkForFileOrNetworkPath(imageFiles[i])) { 819 | filePaths.add(imageFiles[i]); 820 | continue; 821 | } 822 | StorageReference firebaseStorageRef = FirebaseStorage.instance 823 | .ref() 824 | .child("images/sell/${DateTime.now().toIso8601String()}"); 825 | 826 | StorageUploadTask uploadTask = firebaseStorageRef.putFile(File(imageFiles[i])); 827 | StorageTaskSnapshot taskSnapshot = await uploadTask.onComplete; 828 | String storagePath = await taskSnapshot.ref.getDownloadURL(); 829 | filePaths.add(storagePath); 830 | } 831 | 832 | print("filePaths : ${filePaths}"); 833 | return filePaths; 834 | } 835 | } 836 | 837 | /*CachedNetworkImage( 838 | imageUrl: _imageFilesList.length == 0 839 | ? "file:///storage/emulated/0/Android/data/com.jaym.flutter_property_app/files/Pictures/scaled_Screenshot_20190927-114712.png" 840 | : "http://via.placeholder.com/200x150", 841 | placeholder: (context, url) => CircularProgressIndicator(), 842 | errorWidget: (context, url, error) => Icon(Icons.error), 843 | imageBuilder: (context, imageProvider) => Container( 844 | decoration: BoxDecoration( 845 | image: DecorationImage( 846 | image: imageProvider, 847 | fit: BoxFit.cover, 848 | colorFilter: 849 | ColorFilter.mode(Colors.red, BlendMode.colorBurn)), 850 | ), 851 | ), 852 | ),*/ 853 | -------------------------------------------------------------------------------- /lib/utils/color_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Color themeColor = Color(0xF5404B60); 4 | 5 | Color TextLabelColor = Colors.grey; 6 | Color UnselectedIconColor = Colors.grey[500]; 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/utils/method_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:intl/intl.dart'; 4 | 5 | String getPropertyTypeById(int index) { 6 | switch (index) { 7 | case 1: 8 | return "Apartment"; 9 | break; 10 | case 2: 11 | return "Flat"; 12 | break; 13 | case 3: 14 | return "Plot/Land"; 15 | break; 16 | } 17 | } 18 | 19 | // check for web url expression 20 | String urlExpression = r'(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?'; 21 | RegExp regExp = RegExp(urlExpression); 22 | 23 | bool checkForFileOrNetworkPath(String path) { 24 | print("path ${path}"); 25 | bool value = regExp.hasMatch(path); 26 | print("value : ${value}"); 27 | return value; 28 | } 29 | 30 | String getDateFromDateTimeInSpecificFormat(DateFormat dateFormat, String date){ 31 | DateTime mDateTime = DateTime.parse(date); 32 | return dateFormat.format(mDateTime); 33 | } 34 | 35 | Widget fetchImageFromNetworkFileWithPlaceHolder(String imageUrl){ 36 | return CachedNetworkImage( 37 | imageUrl: imageUrl, 38 | placeholder: (context, url) => placeHolderAssetWidget(), 39 | errorWidget: (context, url, error) => placeHolderAssetWidget(), 40 | imageBuilder: (context, imageProvider) => Container( 41 | decoration: BoxDecoration( 42 | image: DecorationImage( 43 | image: imageProvider, 44 | fit: BoxFit.cover, 45 | colorFilter: ColorFilter.mode( 46 | Colors.transparent, BlendMode.colorBurn)), 47 | ), 48 | ), 49 | ); 50 | } 51 | 52 | Widget placeHolderAssetWidget() { 53 | return Image.asset( 54 | 'assets/images/bg_placeholder.jpg', 55 | fit: BoxFit.cover, 56 | ); 57 | } 58 | 59 | Widget fetchImageFromNetworkFileWithPlaceHolderWidthHeight(double Width,double Height,String imageUrl){ 60 | return CachedNetworkImage( 61 | imageUrl: imageUrl, 62 | height: Height, 63 | width: Width, 64 | placeholder: (context, url) => placeHolderAssetWithWidthHeightWidget(Width,Height), 65 | errorWidget: (context, url, error) => placeHolderAssetWithWidthHeightWidget(Width,Height), 66 | imageBuilder: (context, imageProvider) => Container( 67 | decoration: BoxDecoration( 68 | image: DecorationImage( 69 | image: imageProvider, 70 | fit: BoxFit.cover, 71 | colorFilter: ColorFilter.mode( 72 | Colors.transparent, BlendMode.colorBurn)), 73 | ), 74 | ), 75 | ); 76 | } 77 | 78 | Widget placeHolderAssetWithWidthHeightWidget(double Width,double Height) { 79 | return Image.asset( 80 | 'assets/images/bg_placeholder.jpg', 81 | fit: BoxFit.cover, 82 | height: Height, 83 | width: Width, 84 | ); 85 | } 86 | -------------------------------------------------------------------------------- /lib/utils/network_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectivity/connectivity.dart'; 2 | 3 | class NetworkCheck { 4 | Future check() async { 5 | var connectivityResult = await (Connectivity().checkConnectivity()); 6 | if (connectivityResult == ConnectivityResult.mobile) { 7 | return true; 8 | } else if (connectivityResult == ConnectivityResult.wifi) { 9 | return true; 10 | } 11 | return false; 12 | } 13 | 14 | dynamic checkInternet(Function func) { 15 | check().then((intenet) { 16 | if (intenet != null && intenet) { 17 | func(true); 18 | } 19 | else{ 20 | func(false); 21 | } 22 | }); 23 | } 24 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | cached_network_image: 33 | dependency: "direct main" 34 | description: 35 | name: cached_network_image 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.0.0" 39 | charcode: 40 | dependency: transitive 41 | description: 42 | name: charcode 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.2" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.14.11" 53 | connectivity: 54 | dependency: "direct main" 55 | description: 56 | name: connectivity 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.4.6+1" 60 | convert: 61 | dependency: transitive 62 | description: 63 | name: convert 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.1" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.3" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.1.3" 81 | firebase: 82 | dependency: transitive 83 | description: 84 | name: firebase 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "7.1.0" 88 | firebase_core: 89 | dependency: transitive 90 | description: 91 | name: firebase_core 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.4.3+1" 95 | firebase_core_platform_interface: 96 | dependency: transitive 97 | description: 98 | name: firebase_core_platform_interface 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.0.2" 102 | firebase_core_web: 103 | dependency: transitive 104 | description: 105 | name: firebase_core_web 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "0.1.1+1" 109 | firebase_database: 110 | dependency: "direct main" 111 | description: 112 | name: firebase_database 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "3.1.1" 116 | firebase_storage: 117 | dependency: "direct main" 118 | description: 119 | name: firebase_storage 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "3.1.1" 123 | flutter: 124 | dependency: "direct main" 125 | description: flutter 126 | source: sdk 127 | version: "0.0.0" 128 | flutter_cache_manager: 129 | dependency: transitive 130 | description: 131 | name: flutter_cache_manager 132 | url: "https://pub.dartlang.org" 133 | source: hosted 134 | version: "1.1.3" 135 | flutter_local_notifications: 136 | dependency: "direct main" 137 | description: 138 | name: flutter_local_notifications 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "0.8.4+3" 142 | flutter_test: 143 | dependency: "direct dev" 144 | description: flutter 145 | source: sdk 146 | version: "0.0.0" 147 | flutter_web_plugins: 148 | dependency: transitive 149 | description: flutter 150 | source: sdk 151 | version: "0.0.0" 152 | geolocator: 153 | dependency: "direct main" 154 | description: 155 | name: geolocator 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "5.1.5" 159 | google_api_availability: 160 | dependency: transitive 161 | description: 162 | name: google_api_availability 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.1" 166 | http: 167 | dependency: transitive 168 | description: 169 | name: http 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.12.0+3" 173 | http_parser: 174 | dependency: transitive 175 | description: 176 | name: http_parser 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "3.1.3" 180 | image: 181 | dependency: transitive 182 | description: 183 | name: image 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.1.4" 187 | image_picker: 188 | dependency: "direct main" 189 | description: 190 | name: image_picker 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.6.2+3" 194 | intl: 195 | dependency: "direct main" 196 | description: 197 | name: intl 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.16.0" 201 | js: 202 | dependency: transitive 203 | description: 204 | name: js 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.6.1+1" 208 | location_permissions: 209 | dependency: transitive 210 | description: 211 | name: location_permissions 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "2.0.3" 215 | matcher: 216 | dependency: transitive 217 | description: 218 | name: matcher 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.12.6" 222 | meta: 223 | dependency: transitive 224 | description: 225 | name: meta 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.1.8" 229 | path: 230 | dependency: transitive 231 | description: 232 | name: path 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "1.6.4" 236 | path_provider: 237 | dependency: transitive 238 | description: 239 | name: path_provider 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.5.1" 243 | pedantic: 244 | dependency: transitive 245 | description: 246 | name: pedantic 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.8.0+1" 250 | petitparser: 251 | dependency: transitive 252 | description: 253 | name: petitparser 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.4.0" 257 | platform: 258 | dependency: transitive 259 | description: 260 | name: platform 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.2.1" 264 | quiver: 265 | dependency: transitive 266 | description: 267 | name: quiver 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.0.5" 271 | sky_engine: 272 | dependency: transitive 273 | description: flutter 274 | source: sdk 275 | version: "0.0.99" 276 | source_span: 277 | dependency: transitive 278 | description: 279 | name: source_span 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "1.5.5" 283 | sqflite: 284 | dependency: transitive 285 | description: 286 | name: sqflite 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.2.0" 290 | stack_trace: 291 | dependency: transitive 292 | description: 293 | name: stack_trace 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.9.3" 297 | stream_channel: 298 | dependency: transitive 299 | description: 300 | name: stream_channel 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "2.0.0" 304 | string_scanner: 305 | dependency: transitive 306 | description: 307 | name: string_scanner 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "1.0.5" 311 | synchronized: 312 | dependency: transitive 313 | description: 314 | name: synchronized 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "2.1.1" 318 | term_glyph: 319 | dependency: transitive 320 | description: 321 | name: term_glyph 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "1.1.0" 325 | test_api: 326 | dependency: transitive 327 | description: 328 | name: test_api 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "0.2.11" 332 | typed_data: 333 | dependency: transitive 334 | description: 335 | name: typed_data 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "1.1.6" 339 | uuid: 340 | dependency: transitive 341 | description: 342 | name: uuid 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "2.0.4" 346 | vector_math: 347 | dependency: transitive 348 | description: 349 | name: vector_math 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "2.0.8" 353 | xml: 354 | dependency: transitive 355 | description: 356 | name: xml 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "3.5.0" 360 | sdks: 361 | dart: ">=2.6.0 <3.0.0" 362 | flutter: ">=1.12.13+hotfix.4 <2.0.0" 363 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_property_app 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | cached_network_image: ^2.0.0 27 | image_picker: ^0.6.1+4 28 | geolocator: ^5.1.3 29 | firebase_database: ^3.0.7 30 | firebase_storage: ^3.0.6 31 | connectivity: ^0.4.4 32 | intl: ^0.16.0 33 | flutter_local_notifications: ^0.8.4 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://dart.dev/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | 50 | # To add assets to your application, add an assets section, like this: 51 | 52 | assets: 53 | - assets/images/ 54 | 55 | # assets: 56 | # - images/a_dot_burr.jpeg 57 | # - images/a_dot_ham.jpeg 58 | 59 | # An image asset can refer to one or more resolution-specific "variants", see 60 | # https://flutter.dev/assets-and-images/#resolution-aware. 61 | 62 | # For details regarding adding assets from package dependencies, see 63 | # https://flutter.dev/assets-and-images/#from-packages 64 | 65 | # To add custom fonts to your application, add a fonts section here, 66 | # in this "flutter" section. Each entry in this list should have a 67 | # "family" key with the font family name, and a "fonts" key with a 68 | # list giving the asset and other descriptors for the font. For 69 | # example: 70 | # fonts: 71 | # - family: Schyler 72 | # fonts: 73 | # - asset: fonts/Schyler-Regular.ttf 74 | # - asset: fonts/Schyler-Italic.ttf 75 | # style: italic 76 | # - family: Trajan Pro 77 | # fonts: 78 | # - asset: fonts/TrajanPro.ttf 79 | # - asset: fonts/TrajanPro_Bold.ttf 80 | # weight: 700 81 | # 82 | # For details regarding fonts from package dependencies, 83 | # see https://flutter.dev/custom-fonts/#from-packages 84 | -------------------------------------------------------------------------------- /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:flutter_property_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(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 | --------------------------------------------------------------------------------