├── .gitignore ├── .gradle ├── 5.2.1 │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ └── fileHashes.lock │ └── gc.properties ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ └── cache.properties └── vcs-1 │ └── gc.properties ├── .metadata ├── README.md ├── air bnb clone.jpg ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── bmitech │ │ │ │ └── airbnb_clone │ │ │ │ └── MainActivity.java │ │ └── 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 └── settings_aar.gradle ├── assets ├── fonts │ ├── Poppins-ExtraLight.ttf │ ├── Poppins-Light.ttf │ ├── Poppins-Medium.ttf │ └── Poppins-Regular.ttf └── images │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── Illustrations │ ├── il1.jpg │ ├── il2.jpg │ └── il3.jpg │ ├── landing_page_img.png │ ├── logo.png │ ├── logo1.png │ ├── profilePicture.png │ ├── properties │ ├── p1.jpg │ ├── p2.jpg │ └── p3.jpg │ └── social_media │ ├── google.png │ └── phone.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── 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-50x50@1x.png │ │ ├── Icon-App-50x50@2x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.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 │ └── main.m ├── lib ├── Animation │ └── FadeAnimation.dart ├── Constants │ └── Constants.dart ├── Model │ ├── Address.dart │ ├── Appartement.dart │ ├── Chambre.dart │ ├── Hotel.dart │ ├── Maison.dart │ ├── Property.dart │ ├── SliderModel.dart │ ├── Villa.dart │ └── Wilaya.dart ├── Routes │ ├── AddProperty.dart │ ├── AddProperty │ │ ├── CategorieType.dart │ │ ├── CommoditeAjout.dart │ │ ├── Emplacement.dart │ │ ├── Nom.dart │ │ ├── Photo.dart │ │ └── Quantitatif.dart │ ├── AddProperty1.dart │ ├── BookingScreen.dart │ ├── DescriptionDetails.dart │ ├── HomePage.dart │ ├── InfoPersonnel.dart │ ├── Map.dart │ ├── Messages.dart │ ├── Ongoing.dart │ ├── Payer.dart │ ├── Profile.dart │ ├── Profile1.dart │ ├── Properties.dart │ ├── Properties1.dart │ ├── Property-details.dart │ ├── Property-details1.dart │ ├── SearchScreen.dart │ ├── homeScreen.dart │ ├── homeScreen1.dart │ └── login.dart ├── Widgets │ ├── CircleCheckBox.dart │ ├── ImageView.dart │ ├── ImageView.dart.dart │ ├── ItemDropDownButtonCategory.dart │ ├── TypeProperties.dart │ ├── commentsWidget.dart │ └── custom_slider_widget.dart ├── flutter_counter.dart └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /.gradle/5.2.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.2.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/.gradle/5.2.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/5.2.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/.gradle/5.2.1/gc.properties -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Sat Jun 27 18:17:55 WAT 2020 2 | gradle.version=5.2.1 3 | -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /.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: 1ad9baa8b99a2897c20f9e6e54d3b9b359ade314 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter airbnb clone 2 | airbnb clone (Both frontend and backend) created with Flutter and Firebase(flutterfire) 3 | ### Show some ❤️ and star the repo to support the project. 4 | ------------- 5 | ### Note 6 | ------------- 7 | 8 | 9 | This repository is still under development and I will continue to add more features to it. 10 | 11 | ### SCREENSHOTS 12 | ------------- 13 | > some screens. 14 | ![](https://github.com/mahmoudBens/airbnb-flutter-clone/blob/main/air%20bnb%20clone.jpg?raw=true) 15 | 16 | 17 | 18 | 19 | AND MORE !! 20 | ### 2. FEATURES 21 | ------------- 22 | 23 | - LOGIN & SIGNUP 24 | - ADD PROPERTIES 25 | - SEARCH FOR LOCATION 26 | - PROFIL MANAGEMENT 27 | 28 | 29 | ### 3. Setup the firebase app 30 | ------------- 31 | You'll need to create a Firebase instance. Follow the instructions at https://console.firebase.google.com. 32 | - Once your Firebase instance is created, you'll need to enable anonymous authentication. 33 | - Go to the Firebase Console for your new instance. 34 | - Click "Authentication" in the left-hand menu 35 | - Click the "sign-in method" tab 36 | - Click "Google" and enable it 37 | - Enable the Firebase Database 38 | - Go to the Firebase Console 39 | - Click "Database" in the left-hand menu 40 | - Click the Cloudstore "Create Database" button 41 | - Select "Start in test mode" and "Enable" 42 | (skip if not running on Android) 43 | - Create an app within your Firebase instance for Android, with package name com.bmitech.dari_darek_admin 44 | - Run the following command to get your SHA-1 key: 45 | `keytool -exportcert -list -v ` 46 | `-alias androiddebugkey -keystore ~/.android/debug.keystore` 47 | - In the Firebase console, in the settings of your Android app, add your SHA-1 key by clicking "Add Fingerprint". 48 | - Follow instructions to download google-services.json 49 | - place google-services.json into /android/app/. 50 | (skip if not running on iOS) 51 | - Create an app within your Firebase instance for iOS, with your app package name 52 | - Follow instructions to download GoogleService-Info.plist 53 | - Open XCode, right click the Runner folder, select the "Add Files to 'Runner'" menu, and select the GoogleService-Info.plist file to add it to /ios/Runner in XCode 54 | - Open /ios/Runner/Info.plist in a text editor. Locate the CFBundleURLSchemes key. The second item in the array value of this key is specific to the Firebase instance. Replace it with the value for REVERSED_CLIENT_ID from GoogleService-Info.plist 55 | Double check install instructions for both 56 | 57 | - Google Auth Plugin 58 | https://pub.dartlang.org/packages/firebase_auth 59 | - Firestore Plugin 60 | https://pub.dartlang.org/packages/cloud_firestore 61 | 62 | ## How to Contribute 63 | ------------- 64 | 1. Fork the the project 65 | 2. Create your feature branch (git checkout -b my-new-feature) 66 | 3. Make required changes and commit (git commit -am 'Add some feature') 67 | 4. Push to the branch (git push origin my-new-feature) 68 | 5. Create new Pull Request 69 | 70 | -------------------------------------------------------------------------------- /air bnb clone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/air bnb clone.jpg -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "bmitech.airbnb_clone" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | } 42 | 43 | buildTypes { 44 | release { 45 | // TODO: Add your own signing config for the release build. 46 | // Signing with the debug keys for now, so `flutter run --release` works. 47 | signingConfig signingConfigs.debug 48 | } 49 | } 50 | } 51 | 52 | flutter { 53 | source '../..' 54 | } 55 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /android/app/src/main/java/bmitech/airbnb_clone/MainActivity.java: -------------------------------------------------------------------------------- 1 | package bmitech.airbnb_clone; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /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 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /assets/fonts/Poppins-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/fonts/Poppins-ExtraLight.ttf -------------------------------------------------------------------------------- /assets/fonts/Poppins-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/fonts/Poppins-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/Poppins-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/fonts/Poppins-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Poppins-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/fonts/Poppins-Regular.ttf -------------------------------------------------------------------------------- /assets/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/1.jpg -------------------------------------------------------------------------------- /assets/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/2.jpg -------------------------------------------------------------------------------- /assets/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/3.jpg -------------------------------------------------------------------------------- /assets/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/4.jpg -------------------------------------------------------------------------------- /assets/images/Illustrations/il1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/Illustrations/il1.jpg -------------------------------------------------------------------------------- /assets/images/Illustrations/il2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/Illustrations/il2.jpg -------------------------------------------------------------------------------- /assets/images/Illustrations/il3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/Illustrations/il3.jpg -------------------------------------------------------------------------------- /assets/images/landing_page_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/landing_page_img.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/logo1.png -------------------------------------------------------------------------------- /assets/images/profilePicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/profilePicture.png -------------------------------------------------------------------------------- /assets/images/properties/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/properties/p1.jpg -------------------------------------------------------------------------------- /assets/images/properties/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/properties/p2.jpg -------------------------------------------------------------------------------- /assets/images/properties/p3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/properties/p3.jpg -------------------------------------------------------------------------------- /assets/images/social_media/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/social_media/google.png -------------------------------------------------------------------------------- /assets/images/social_media/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/assets/images/social_media/phone.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/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.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/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 | Dari Darek 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/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/Animation/FadeAnimation.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmoudBens/airbnb-flutter-clone/453b4198653c63754a8be0df01127a64218ed010/lib/Animation/FadeAnimation.dart -------------------------------------------------------------------------------- /lib/Constants/Constants.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:airbnb_clone/Model/Address.dart'; 4 | import 'package:airbnb_clone/Model/Hotel.dart'; 5 | import 'package:airbnb_clone/Model/Property.dart'; 6 | import 'package:airbnb_clone/Model/Wilaya.dart'; 7 | import 'package:airbnb_clone/Model/Appartement.dart'; 8 | class Constants { 9 | 10 | static List properties=[ 11 | Hotel( 12 | "hotel", 13 | ['assets/images/properties/p1.jpg',"assets/images/properties/p2.jpg"], 14 | 5000, 15 | Address("Algerie", "Blida", "Boufarik", "el mo9rani", "15", "09025"), 16 | "description qui peut depasser 3 lignes donc la suite sera cachée until clicking the button afficher la suite pour l'afficher. voici une démonstration qui le fait ", 17 | 4.2, 18 | Commodite(true, true, false, true, true, true, true, true, true), 19 | true, 20 | false, 21 | true, 22 | ), 23 | 24 | appartement( 25 | "appartement", 26 | ['assets/images/properties/p1.jpg',"assets/images/properties/p2.jpg"], 27 | 2500, 28 | Address("Algerie", "Alger", "Reghaia", "el hadad", "55", "16025"), 29 | "description qui peut depasser 3 lignes donc la suite sera cachée until clicking the button afficher la suite pour l'afficher. voici une démonstration qui le fait ", 30 | 4.0, 31 | Commodite(true, true, false, true, true, true, true, true, true), 32 | true, 33 | false, 34 | true, 35 | ), 36 | ]; 37 | 38 | 39 | static List wilayas=[ 40 | Wilaya("Alger",16,"Ville sur plage avec des monuments touristiques","assets/images/properties/p1.jpg"), 41 | Wilaya("Oran",31,"Ville sur plage avec des monuments touristiques","assets/images/properties/p2.jpg"), 42 | Wilaya("Blida",09,"Ville avec des monuments touristiques et forets","assets/images/properties/p3.jpg"), 43 | Wilaya("Gherdaia",47,"Ville du sahara avec des monuments historiques","assets/images/properties/p4.jpg"), 44 | ]; 45 | 46 | 47 | static Color redAirbnb= Color(0xffFF5A5F); 48 | static Color greenAirbnb= Color(0xff00A699); 49 | 50 | } -------------------------------------------------------------------------------- /lib/Model/Address.dart: -------------------------------------------------------------------------------- 1 | class Address { 2 | String _pays; 3 | String _wilaya; 4 | String _commune; 5 | String _rue; 6 | String _numeroPropriete; 7 | String _codePostal; 8 | 9 | Address(this._pays, this._wilaya, this._commune, this._rue, 10 | this._numeroPropriete, this._codePostal); 11 | 12 | String get codePostal => _codePostal; 13 | 14 | set codePostal(String value) { 15 | _codePostal = value; 16 | } 17 | 18 | String get numeroPropriete => _numeroPropriete; 19 | 20 | set numeroPropriete(String value) { 21 | _numeroPropriete = value; 22 | } 23 | 24 | String get rue => _rue; 25 | 26 | set rue(String value) { 27 | _rue = value; 28 | } 29 | 30 | String get commune => _commune; 31 | 32 | set commune(String value) { 33 | _commune = value; 34 | } 35 | 36 | String get wilaya => _wilaya; 37 | 38 | set wilaya(String value) { 39 | _wilaya = value; 40 | } 41 | 42 | String get pays => _pays; 43 | 44 | set pays(String value) { 45 | _pays = value; 46 | } 47 | } -------------------------------------------------------------------------------- /lib/Model/Appartement.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Address.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | 4 | class appartement extends Property{ 5 | bool endroitEntier; 6 | bool chambrePartage; 7 | bool equipe; 8 | 9 | appartement(String titre, List images, int prix, Address address, String descreption, double raiting, Commodite commodite,this.endroitEntier,this.chambrePartage,this.equipe,) 10 | : super( 11 | titre, 12 | images, 13 | prix, 14 | address, 15 | descreption, 16 | raiting, 17 | commodite); 18 | } -------------------------------------------------------------------------------- /lib/Model/Chambre.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Property.dart'; 2 | import 'package:airbnb_clone/Model/Address.dart'; 3 | 4 | class Chambre extends Property{ 5 | bool sanitairePrive; 6 | bool chambrePartage; 7 | bool equipe; 8 | 9 | Chambre(String titre, List images, int prix, Address address, String descreption, double raiting, Commodite commodite,this.sanitairePrive,this.chambrePartage,this.equipe,) 10 | : super( 11 | titre, 12 | images, 13 | prix, 14 | address, 15 | descreption, 16 | raiting, 17 | commodite); 18 | } 19 | -------------------------------------------------------------------------------- /lib/Model/Hotel.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Property.dart'; 2 | import 'package:airbnb_clone/Model/Address.dart'; 3 | 4 | class Hotel extends Property{ 5 | bool sanitairePrive; 6 | bool chambrePartage; 7 | bool equipe; 8 | 9 | Hotel(String titre, List images, int prix, Address address, String descreption, double raiting, Commodite commodite,this.sanitairePrive,this.chambrePartage,this.equipe,) 10 | : super( 11 | titre, 12 | images, 13 | prix, 14 | address, 15 | descreption, 16 | raiting, 17 | commodite); 18 | } 19 | -------------------------------------------------------------------------------- /lib/Model/Maison.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Address.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | 4 | class Maison extends Property{ 5 | bool endroitEntier; 6 | bool chambrePartage; 7 | bool equipe; 8 | 9 | Maison(String titre, List images, int prix, Address address, String descreption, double raiting, Commodite commodite,this.endroitEntier,this.chambrePartage,this.equipe,) 10 | : super( 11 | titre, 12 | images, 13 | prix, 14 | address, 15 | descreption, 16 | raiting, 17 | commodite); 18 | } 19 | -------------------------------------------------------------------------------- /lib/Model/Property.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Address.dart'; 2 | 3 | abstract class Property { 4 | String _titre; 5 | List _images; 6 | int _prix; 7 | Address _address; 8 | String _descreption; 9 | double _raiting; 10 | Commodite _commodite; 11 | 12 | 13 | Commodite get commodite => _commodite; 14 | 15 | 16 | Address get address => _address; 17 | 18 | set address(Address value) { 19 | _address = value; 20 | } 21 | 22 | set commodite(Commodite value) { 23 | _commodite = value; 24 | } 25 | 26 | String get titre => _titre; 27 | 28 | set titre(String value) { 29 | _titre = value; 30 | } 31 | 32 | 33 | 34 | Property( this._titre, 35 | this._images, 36 | this._prix, 37 | this._address, 38 | this._descreption, 39 | this._raiting, 40 | this._commodite, 41 | ); 42 | 43 | 44 | 45 | 46 | List get images => _images; 47 | 48 | set images(List value) { 49 | _images = value; 50 | } 51 | 52 | int get prix => _prix; 53 | 54 | set prix(int value) { 55 | _prix = value; 56 | } 57 | 58 | 59 | String get descreption => _descreption; 60 | 61 | set descreption(String value) { 62 | _descreption = value; 63 | } 64 | 65 | double get raiting => _raiting; 66 | 67 | set raiting(double value) { 68 | _raiting = value; 69 | } 70 | } 71 | 72 | 73 | 74 | class Commodite { 75 | bool InterdectionFumee ; 76 | bool serviceDeChambre; 77 | bool piscine; 78 | bool gym; 79 | bool repasInclus; 80 | bool wifi; 81 | bool enfantAutorise; 82 | bool Parking; 83 | bool equipe; 84 | 85 | Commodite(this.InterdectionFumee, this.serviceDeChambre, this.piscine, 86 | this.gym, this.repasInclus, this.wifi, this.enfantAutorise, this.Parking,this.equipe); 87 | } 88 | 89 | -------------------------------------------------------------------------------- /lib/Model/SliderModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SliderModel{ 4 | String imagePath; 5 | String title; 6 | String text; 7 | 8 | SliderModel(this.imagePath, this.title, this.text); 9 | 10 | 11 | static List getSlides(){ 12 | List slides = new List(); 13 | SliderModel s1 = new SliderModel("assets/images/Illustrations/il1.jpg", "first screen", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. as vehicula ante nisl. Nullam faucibus purus sed tellus fermentum, ac porttitor metus laoreet. "); 14 | SliderModel s2 = new SliderModel("assets/images/Illustrations/il2.jpg", "second screen", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. tum, ac porttitor metus laoreet. "); 15 | SliderModel s3 = new SliderModel("assets/images/Illustrations/il3.jpg", "third screen", "Lorem ipsum dolor sit amet, consectetur adipiscing elit.s purus sed tellus fermentum, ac porttitor metus laoreet. "); 16 | slides.add(s1); 17 | slides.add(s2); 18 | slides.add(s3); 19 | return slides; 20 | 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /lib/Model/Villa.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Address.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | 4 | class Villa extends Property{ 5 | bool endroitEntier; 6 | bool chambrePartage; 7 | bool equipe; 8 | 9 | Villa(String titre, List images, int prix, Address address, String descreption, double raiting, Commodite commodite,this.endroitEntier,this.chambrePartage,this.equipe,) 10 | : super( 11 | titre, 12 | images, 13 | prix, 14 | address, 15 | descreption, 16 | raiting, 17 | commodite); 18 | } 19 | -------------------------------------------------------------------------------- /lib/Model/Wilaya.dart: -------------------------------------------------------------------------------- 1 | class Wilaya { 2 | String _label; 3 | int _matricule; 4 | String _descreption; 5 | String _image; 6 | 7 | String get image => _image; 8 | 9 | set image(String value) { 10 | _image = value; 11 | } 12 | 13 | Wilaya(this._label,this._matricule,this._descreption,this._image); 14 | 15 | String get descreption => _descreption; 16 | set descreption(String desc) 17 | { 18 | _descreption=desc; 19 | } 20 | String get label => _label; 21 | 22 | set label(String value) { 23 | _label = value; 24 | } 25 | 26 | int get matricule => _matricule; 27 | 28 | set matricule(int value) { 29 | _matricule = value; 30 | } 31 | } -------------------------------------------------------------------------------- /lib/Routes/AddProperty.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:airbnb_clone/Routes/AddProperty/CategorieType.dart'; 3 | import 'package:airbnb_clone/Routes/Map.dart'; 4 | import 'package:airbnb_clone/Widgets/ItemDropDownButtonCategory.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/widgets.dart'; 8 | 9 | 10 | import 'package:airbnb_clone/Routes/HomePage.dart'; 11 | 12 | void main() => runApp( 13 | MaterialApp( 14 | debugShowCheckedModeBanner: false, 15 | home : AddProperty(), 16 | ) 17 | ); 18 | class AddProperty extends StatefulWidget { 19 | @override 20 | _AddPropertyState createState() => _AddPropertyState(); 21 | } 22 | 23 | class _AddPropertyState extends State { 24 | ItemDropDownButtonCategory _selectedCategory; 25 | @override 26 | Widget build(BuildContext context) { 27 | 28 | return WillPopScope( 29 | onWillPop: () async { 30 | Navigator.push( 31 | context, 32 | MaterialPageRoute(builder: (context) => HomePage()), 33 | ); 34 | return true; 35 | }, 36 | child: Scaffold( 37 | backgroundColor: Colors.white, 38 | body: SingleChildScrollView( 39 | child: Padding( 40 | padding: const EdgeInsets.symmetric(horizontal: 25,vertical:15), 41 | child: Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | mainAxisAlignment: MainAxisAlignment.start, 44 | children: [ 45 | SizedBox(height: 35,), 46 | InkWell( 47 | onTap: (){ 48 | Navigator.push( 49 | context, 50 | MaterialPageRoute(builder: (context) => CategorieType()), 51 | ); 52 | }, 53 | child: Align( 54 | alignment: Alignment.topRight, 55 | child: IconButton(icon:Icon(Icons.add,color: Colors.black87,),iconSize: 30,)), 56 | ), 57 | Text("2 Annonces",style: TextStyle(color:Colors.black87,fontSize: 22,fontWeight: FontWeight.bold),), 58 | Text("En cours",style: TextStyle(fontSize: 22,fontWeight: FontWeight.bold),), 59 | SizedBox(height: 20,), 60 | Material( 61 | elevation: 3, 62 | child: Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | Container( 66 | height:80, 67 | width: MediaQuery.of(context).size.width/2, 68 | child: Center(child: Text("Chambre privé à Algerie",style: TextStyle(fontSize:15,fontWeight: FontWeight.w300),maxLines: 5,textAlign: TextAlign.center,))), 69 | Container( 70 | padding:EdgeInsets.all(8), 71 | margin: EdgeInsets.only(left: 8), 72 | height: 80, 73 | child: Image.network("https://cdn.radiofrance.fr/s3/cruiser-production/2019/06/935cd278-34b7-47b0-9efa-95d2d3991248/838_gettyimages-1128954319.jpg",fit: BoxFit.scaleDown,)) 74 | ], 75 | ), 76 | ), 77 | Material( 78 | elevation: 3, 79 | child: Row( 80 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 81 | children: [ 82 | Container( 83 | height:80, 84 | width: MediaQuery.of(context).size.width/2, 85 | child: Center(child: Text("Chambre privé à Algerie",style: TextStyle(fontSize:15,fontWeight: FontWeight.w300),maxLines: 5,textAlign: TextAlign.center,))), 86 | Container( 87 | padding:EdgeInsets.all(8), 88 | margin: EdgeInsets.only(left: 8), 89 | height: 80, 90 | child: Image.network("https://cdn.radiofrance.fr/s3/cruiser-production/2019/06/935cd278-34b7-47b0-9efa-95d2d3991248/838_gettyimages-1128954319.jpg",fit: BoxFit.scaleDown,)) 91 | ], 92 | ), 93 | ), 94 | SizedBox(height: 20,), 95 | Material( 96 | elevation: 5, 97 | child: Padding( 98 | padding: const EdgeInsets.all(8.0), 99 | child: Row( 100 | mainAxisAlignment: MainAxisAlignment.start, 101 | children: [ 102 | Icon(Icons.add,color: Colors.red,size: 25,), 103 | SizedBox(width: 15,), 104 | InkWell( 105 | onTap: (){ 106 | Navigator.push( 107 | context, 108 | MaterialPageRoute(builder: (context) => CategorieType()), 109 | ); 110 | }, 111 | child: Text("Créer une autre annonce",style: TextStyle(fontWeight: FontWeight.w500),)) 112 | ], 113 | ), 114 | ), 115 | ), 116 | 117 | ], 118 | ), 119 | ), 120 | ) 121 | ), 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/Routes/AddProperty/CategorieType.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Routes/AddProperty/Emplacement.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'Quantitatif.dart'; 5 | class CategorieType extends StatefulWidget { 6 | @override 7 | _CategorieTypeState createState() => _CategorieTypeState(); 8 | } 9 | 10 | class _CategorieTypeState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | body: SingleChildScrollView( 15 | child: Padding( 16 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 15 ), 17 | child: Column( 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | IconButton( 21 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 22 | onPressed: (){ 23 | Navigator.pop(context); 24 | },), 25 | SizedBox(height: 30,), 26 | Text("Parlez-nous de votre logement",style: TextStyle(fontSize: 30,fontWeight: FontWeight.w500),maxLines: 2,textAlign: TextAlign.center,), 27 | SizedBox(height: 30,), 28 | InkWell( 29 | onTap: (){ 30 | _askedToLead(); 31 | }, 32 | child: Column( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | Padding( 36 | padding: EdgeInsets.fromLTRB(10,8,10,0), 37 | child: Text("Commencer par choisir une catégorie générale",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 38 | ), 39 | Padding( 40 | padding: EdgeInsets.fromLTRB(10,12,10,3), 41 | child: Text("Séléctionnez une catégorie générale",style: TextStyle(color:Colors.grey,fontSize: 13,fontWeight: FontWeight.w300),), 42 | ), 43 | ], 44 | ), 45 | ), 46 | SizedBox(height: 15,), 47 | Center( 48 | child: Container( 49 | margin: EdgeInsets.symmetric(horizontal: 20), 50 | alignment: Alignment.center, 51 | height: 1, 52 | color: Colors.grey, 53 | ), 54 | ), 55 | SizedBox(height: 20,), 56 | InkWell( 57 | onTap: (){ 58 | SousCategorieDialog(); 59 | }, 60 | child: Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | children: [ 63 | Padding( 64 | padding: EdgeInsets.fromLTRB(10,8,10,0), 65 | child: Text("choisir maintenant un type de logement",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 66 | ), 67 | Padding( 68 | padding: EdgeInsets.fromLTRB(10,12,10,3), 69 | child: Text("Selectionnez une option",style: TextStyle(color:Colors.grey,fontSize: 13,fontWeight: FontWeight.w300),), 70 | ), 71 | ], 72 | ), 73 | ), 74 | SizedBox(height: 15,), 75 | Center( 76 | child: Container( 77 | margin: EdgeInsets.symmetric(horizontal: 20), 78 | alignment: Alignment.center, 79 | height: 1, 80 | color: Colors.grey, 81 | ), 82 | ), 83 | ], 84 | ), 85 | ), 86 | ), 87 | floatingActionButton: MaterialButton( 88 | onPressed: (){ 89 | Navigator.push( 90 | context, 91 | MaterialPageRoute(builder: (context) => Emplacement()), 92 | ); 93 | }, 94 | elevation: 3, 95 | child: Container( 96 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 97 | decoration: BoxDecoration( 98 | borderRadius: BorderRadius.circular(15), 99 | color: Colors.red, 100 | ), 101 | child: Text("Suivant",style: TextStyle(color: Colors.white),)), 102 | ), 103 | ); 104 | } 105 | Future _askedToLead() async { 106 | switch (await showDialog( 107 | context: context, 108 | builder: (BuildContext context) { 109 | return SimpleDialog( 110 | children: [ 111 | SimpleDialogOption( 112 | onPressed: () { Navigator.pop(context, "Appartement"); }, 113 | child: const Text('Appartement'), 114 | ), 115 | SimpleDialogOption( 116 | onPressed: () { Navigator.pop(context, "Chambre"); }, 117 | child: const Text('Chambre'), 118 | ), 119 | SimpleDialogOption( 120 | onPressed: () { Navigator.pop(context, "Hotel"); }, 121 | child: const Text('Hotel'), 122 | ), 123 | SimpleDialogOption( 124 | onPressed: () { Navigator.pop(context, "Maison"); }, 125 | child: const Text('Maison'), 126 | ), 127 | ], 128 | ); 129 | } 130 | )) { 131 | case "Homme": 132 | // Let's go. 133 | // ... 134 | break; 135 | case "Femme": 136 | // ... 137 | break; 138 | } 139 | } 140 | 141 | Future SousCategorieDialog() async { 142 | switch (await showDialog( 143 | context: context, 144 | builder: (BuildContext context) { 145 | return SimpleDialog( 146 | children: [ 147 | SimpleDialogOption( 148 | onPressed: () { Navigator.pop(context, "Endroit entier"); }, 149 | child: const Text('Endroit entier'), 150 | ), 151 | SimpleDialogOption( 152 | onPressed: () { Navigator.pop(context, "Chambre partagé"); }, 153 | child: const Text('Chambre partagé'), 154 | ), 155 | ], 156 | ); 157 | } 158 | )) { 159 | case "Homme": 160 | // Let's go. 161 | // ... 162 | break; 163 | case "Femme": 164 | // ... 165 | break; 166 | } 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /lib/Routes/AddProperty/Emplacement.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Property.dart'; 2 | import 'package:airbnb_clone/Routes/AddProperty/CommoditeAjout.dart'; 3 | import 'package:airbnb_clone/flutter_counter.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class Emplacement extends StatefulWidget { 8 | @override 9 | _EmplacementState createState() => _EmplacementState(); 10 | } 11 | 12 | class _EmplacementState extends State { 13 | num _defaultValue; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: SingleChildScrollView( 19 | child: Padding( 20 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 15 ), 21 | child: Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | IconButton( 25 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 26 | onPressed: (){ 27 | Navigator.pop(context); 28 | },), 29 | SizedBox(height: 30,), 30 | Padding( 31 | padding: EdgeInsets.symmetric(horizontal: 15), 32 | child: Text("Où est situé votre logement ?",style: TextStyle(fontSize: 30,fontWeight: FontWeight.w500),textAlign: TextAlign.left,), 33 | ), 34 | Padding( 35 | padding: EdgeInsets.symmetric(horizontal: 15), 36 | child: Text("C'est la position que les utilisateurs voient",style: TextStyle(fontSize: 17,fontWeight: FontWeight.w300),textAlign: TextAlign.left,), 37 | ), 38 | SizedBox(height: 30,), 39 | Padding( 40 | padding: const EdgeInsets.symmetric(horizontal: 0,vertical: 5), 41 | child: MaterialButton( 42 | color: Colors.white, 43 | elevation: 5, 44 | child: Container( 45 | margin: EdgeInsets.symmetric(horizontal: 25), 46 | padding: EdgeInsets.symmetric(horizontal: 20,vertical: 15), 47 | decoration: BoxDecoration( 48 | borderRadius: BorderRadius.circular(10), 49 | border: Border.all(color: Colors.black87), 50 | ), 51 | child: Text("Utiliser l'emplacement actuel",textAlign: TextAlign.center,style: TextStyle(color: Colors.red),), 52 | ), 53 | ), 54 | ), 55 | SizedBox(height: 10,), 56 | Center( 57 | child: Text("Où saisissez votre adresse",style: TextStyle(color: Colors.grey,fontSize: 12),), 58 | ), 59 | SizedBox(height: 30,) , 60 | Padding( 61 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 62 | child: Column( 63 | crossAxisAlignment: CrossAxisAlignment.start, 64 | children: [ 65 | Text("Pays/Région",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 66 | TextField( 67 | style: TextStyle(color: Colors.grey), 68 | controller: TextEditingController(text: "Algérie",), 69 | decoration: InputDecoration( 70 | ), 71 | ), 72 | //separateurHorizontal(), 73 | 74 | ], 75 | ), 76 | ), 77 | SizedBox(height: 15,) , 78 | Padding( 79 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 80 | child: Column( 81 | crossAxisAlignment: CrossAxisAlignment.start, 82 | children: [ 83 | Text("Wilaya",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 84 | TextField( 85 | style: TextStyle(color: Colors.grey), 86 | controller: TextEditingController(text: "Blida",), 87 | decoration: InputDecoration( 88 | ), 89 | ), 90 | //separateurHorizontal(), 91 | 92 | ], 93 | ), 94 | ), 95 | SizedBox(height: 15,) , 96 | Padding( 97 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 98 | child: Column( 99 | crossAxisAlignment: CrossAxisAlignment.start, 100 | children: [ 101 | Text("Commune",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 102 | TextField( 103 | style: TextStyle(color: Colors.grey), 104 | controller: TextEditingController(text: "Oued el aleug",), 105 | decoration: InputDecoration( 106 | ), 107 | ), 108 | //separateurHorizontal(), 109 | 110 | ], 111 | ), 112 | ), 113 | SizedBox(height: 15,) , 114 | Padding( 115 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 116 | child: Column( 117 | crossAxisAlignment: CrossAxisAlignment.start, 118 | children: [ 119 | Text("Rue",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 120 | TextField( 121 | style: TextStyle(color: Colors.grey), 122 | controller: TextEditingController(text: "amir abdelkader",), 123 | decoration: InputDecoration( 124 | ), 125 | ), 126 | //separateurHorizontal(), 127 | 128 | ], 129 | ), 130 | ), 131 | SizedBox(height: 15,) , 132 | Padding( 133 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 134 | child: Column( 135 | crossAxisAlignment: CrossAxisAlignment.start, 136 | children: [ 137 | Text("Numéro de propriété",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 138 | TextField( 139 | style: TextStyle(color: Colors.grey), 140 | controller: TextEditingController(text: "125",), 141 | decoration: InputDecoration( 142 | ), 143 | ), 144 | //separateurHorizontal(), 145 | 146 | ], 147 | ), 148 | ), 149 | SizedBox(height: 15,) , 150 | Padding( 151 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 2), 152 | child: Column( 153 | crossAxisAlignment: CrossAxisAlignment.start, 154 | children: [ 155 | Text("Code postal",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),), 156 | TextField( 157 | style: TextStyle(color: Colors.grey), 158 | controller: TextEditingController(text: "09037",), 159 | decoration: InputDecoration( 160 | ), 161 | ), 162 | //separateurHorizontal(), 163 | 164 | ], 165 | ), 166 | ), 167 | ], 168 | ), 169 | ), 170 | ), 171 | floatingActionButton: MaterialButton( 172 | onPressed: (){ 173 | Navigator.push( 174 | context, 175 | MaterialPageRoute(builder: (context) => CommoditeAjout()), 176 | ); 177 | }, 178 | elevation: 3, 179 | child: Container( 180 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 181 | decoration: BoxDecoration( 182 | borderRadius: BorderRadius.circular(15), 183 | color: Colors.red, 184 | ), 185 | child: Text("Suivant",style: TextStyle(color: Colors.white),)), 186 | ), 187 | 188 | ); 189 | } 190 | Container separateurHorizontal() { 191 | return Container( 192 | margin: EdgeInsets.symmetric(horizontal:0,vertical: 8), 193 | height: 1, 194 | color: Colors.black12, 195 | ); 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /lib/Routes/AddProperty/Nom.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Routes/AddProperty/Emplacement.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import '../AddProperty.dart'; 5 | 6 | class Nom extends StatefulWidget { 7 | @override 8 | _NomState createState() => _NomState(); 9 | } 10 | 11 | class _NomState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | body: SingleChildScrollView( 16 | child: Padding( 17 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 25 ), 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.start, 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | IconButton( 23 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 24 | onPressed: (){ 25 | Navigator.pop(context); 26 | },), 27 | SizedBox(height: 30,), 28 | Text("Donner un nom à votre annonce",style: TextStyle(fontSize: 30,fontWeight: FontWeight.w500),), 29 | SizedBox(height: 20,), 30 | Text("Attirez les voyageurs avec un titre d'annonce qui met en valeur ce qui fait la particularité de votre logement",style: TextStyle(fontSize: 18,color:Colors.black87,fontWeight: FontWeight.w400),), 31 | SizedBox(height: 30,), 32 | TextField( 33 | style: TextStyle(color: Colors.black87,fontSize: 18), 34 | decoration: InputDecoration( 35 | hintText: "Ajouter un titre", 36 | ), 37 | ), 38 | SizedBox(height: 80,), 39 | Align( 40 | alignment: Alignment.bottomRight, 41 | child: MaterialButton( 42 | onPressed: (){ 43 | Navigator.push( 44 | context, 45 | MaterialPageRoute(builder: (context) => AddProperty()), 46 | ); 47 | }, 48 | elevation: 3, 49 | child: Container( 50 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 51 | decoration: BoxDecoration( 52 | borderRadius: BorderRadius.circular(15), 53 | color: Colors.red, 54 | ), 55 | child: Text("Suivant",style: TextStyle(color: Colors.white),)), 56 | ), 57 | ) 58 | ], 59 | ), 60 | ), 61 | ), 62 | // MediaQuery.of(context).viewInsets.bottom == 0.0 63 | 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Routes/AddProperty/Photo.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Routes/AddProperty/Nom.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Photo extends StatefulWidget { 5 | @override 6 | _PhotoState createState() => _PhotoState(); 7 | } 8 | 9 | class _PhotoState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | body: SingleChildScrollView( 14 | child: Padding( 15 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 25 ), 16 | child: Column( 17 | mainAxisAlignment: MainAxisAlignment.start, 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | IconButton( 21 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 22 | onPressed: (){ 23 | Navigator.pop(context); 24 | },), 25 | SizedBox(height: 30,), 26 | Text("Ajouter des photos à votre annonce",style: TextStyle(fontSize: 30,fontWeight: FontWeight.w500),), 27 | SizedBox(height: 20,), 28 | Text("Les photos aident les voyageurs à se projeter dans votre logement. Vous pouvez commencer par une photo et en ajouter d'autres apreès publication",style: TextStyle(fontSize: 18,color:Colors.black87,fontWeight: FontWeight.w400),), 29 | SizedBox(height: 30,), 30 | MaterialButton( 31 | onPressed: (){ 32 | /*Navigator.push( 33 | context, 34 | MaterialPageRoute(builder: (context) => ()), 35 | );*/ 36 | }, 37 | elevation: 3, 38 | child: Container( 39 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 30), 40 | decoration: BoxDecoration( 41 | borderRadius: BorderRadius.circular(5), 42 | color: Colors.red, 43 | ), 44 | child: Text("Ajouter des photos",style: TextStyle(color: Colors.white),)), 45 | ), 46 | SizedBox(height: 25,), 47 | Align( 48 | alignment: Alignment.centerRight, 49 | child: MaterialButton( 50 | onPressed: (){ 51 | Navigator.push( 52 | context, 53 | MaterialPageRoute(builder: (context) => Nom()), 54 | ); 55 | }, 56 | elevation: 3, 57 | child: Container( 58 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 59 | decoration: BoxDecoration( 60 | borderRadius: BorderRadius.circular(5), 61 | border: Border.all(color: Colors.red) 62 | 63 | ), 64 | child: Text("Plus tard",style: TextStyle(color: Colors.red),)), 65 | ), 66 | ), 67 | ], 68 | ), 69 | ), 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/Routes/AddProperty/Quantitatif.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/flutter_counter.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Quantitatif extends StatefulWidget { 5 | @override 6 | _QuantitatifState createState() => _QuantitatifState(); 7 | } 8 | 9 | class _QuantitatifState extends State { 10 | num _defaultValue; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | body: SingleChildScrollView( 16 | child: Padding( 17 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 20 ), 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | IconButton( 22 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 23 | onPressed: (){ 24 | Navigator.pop(context); 25 | },), 26 | SizedBox(height: 30,), 27 | Text("Combien de voyageurs pouvez-vous accueillir ?",style: TextStyle(fontSize: 30,fontWeight: FontWeight.w500),textAlign: TextAlign.left,), 28 | Text("Vérifier que vous disposez de suffisament de lits pour assurer le confort de tous vos voyageurs.",style: TextStyle(fontSize: 17,fontWeight: FontWeight.w300),textAlign: TextAlign.left,), 29 | SizedBox(height: 30,), 30 | Padding( 31 | padding: const EdgeInsets.all(15), 32 | child: Material( 33 | borderRadius: BorderRadius.circular(20), 34 | color: Colors.white, 35 | elevation: 5, 36 | child: Container( 37 | //margin: EdgeInsets.symmetric(vertical: 25), 38 | padding: EdgeInsets.symmetric(horizontal: 20,vertical: 2), 39 | decoration: BoxDecoration( 40 | borderRadius: BorderRadius.circular(20), 41 | border: Border.all(color: Colors.black87), 42 | ), 43 | child: Row( 44 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 45 | children: [ 46 | Text("Cette interface reste à confirmer ,",style: TextStyle(fontSize: 15),), 47 | Counter( 48 | minValue: 0, 49 | maxValue: 10, 50 | decimalPlaces: 0, 51 | initialValue: 0, 52 | step: 1, 53 | textStyle: TextStyle(letterSpacing: 10), 54 | onChanged: (value0){ 55 | setState(() { 56 | _defaultValue=value0; 57 | }); 58 | }, 59 | ), 60 | ], 61 | ), 62 | ), 63 | ), 64 | ), 65 | ], 66 | ), 67 | ), 68 | ), 69 | floatingActionButton: MaterialButton( 70 | onPressed: (){ 71 | Navigator.push( 72 | context, 73 | MaterialPageRoute(builder: (context) => Quantitatif()), 74 | ); 75 | }, 76 | elevation: 3, 77 | child: Container( 78 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 79 | decoration: BoxDecoration( 80 | borderRadius: BorderRadius.circular(15), 81 | color: Colors.red, 82 | ), 83 | child: Text("Suivant",style: TextStyle(color: Colors.white),)), 84 | ), 85 | ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/Routes/BookingScreen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:collection'; 3 | 4 | import 'package:airbnb_clone/Model/Property.dart'; 5 | import 'package:airbnb_clone/Widgets/custom_slider_widget.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:date_range_picker/date_range_picker.dart' as DateRagePicker; 9 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 10 | 11 | class BookingScreen extends StatefulWidget { 12 | Property _property; 13 | BookingScreen(this._property); 14 | @override 15 | _BookingScreenState createState() => _BookingScreenState(); 16 | } 17 | 18 | class _BookingScreenState extends State { 19 | Completer _controller = Completer(); 20 | 21 | static const LatLng _center = const LatLng(45.521563, -122.677433); 22 | 23 | void _onMapCreated(GoogleMapController controller) { 24 | _controller.complete(controller); 25 | } 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | body: ListView( 30 | children: [ 31 | Container( 32 | height: 200, 33 | padding: EdgeInsets.symmetric(horizontal: 20,vertical: 25), 34 | decoration: BoxDecoration( 35 | borderRadius: BorderRadius.all(Radius.circular(25)), 36 | color: Color(0xff3366cc), 37 | //image: Image.asset(widget._property.images[0],fit: BoxFit.cover,), 38 | ), 39 | child: GoogleMap( 40 | onMapCreated: _onMapCreated, 41 | initialCameraPosition: CameraPosition( 42 | target: _center, 43 | zoom: 11.0, 44 | ), 45 | ), 46 | ), 47 | Padding( 48 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 20), 49 | child: MaterialButton( 50 | color: Color(0xff3366cc), 51 | onPressed: () async { 52 | final List picked = await DateRagePicker.showDatePicker( 53 | context: context, 54 | initialFirstDate: new DateTime.now(), 55 | initialLastDate: (new DateTime.now()).add(new Duration(days: 7)), 56 | firstDate: new DateTime.now(), 57 | lastDate: new DateTime(DateTime.now().year+1), 58 | ); 59 | if (picked != null && picked.length == 2) { 60 | print(picked); 61 | } 62 | }, 63 | child: new Text("Choisir votre durée de séjour",style: TextStyle(color: Colors.white),) 64 | ), 65 | ), 66 | Column( 67 | children: [ 68 | Padding( 69 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 70 | child: Row( 71 | mainAxisSize: MainAxisSize.max, 72 | mainAxisAlignment: MainAxisAlignment.spaceAround, 73 | children: [ 74 | Column( 75 | crossAxisAlignment: CrossAxisAlignment.center, 76 | children: [ 77 | Text("Début de Séjour",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 78 | Text("25-juin-2020",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 79 | ], 80 | ), 81 | Container( 82 | width: 1, 83 | color: Colors.black38, 84 | height: 50, 85 | ), 86 | Column( 87 | crossAxisAlignment: CrossAxisAlignment.center, 88 | children: [ 89 | Text("Fin de Séjour",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 90 | Text("29-juin-2020",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 91 | ], 92 | ), 93 | ], 94 | ), 95 | ), 96 | Padding( 97 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 98 | child: Row( 99 | mainAxisSize: MainAxisSize.max, 100 | mainAxisAlignment: MainAxisAlignment.spaceAround, 101 | children: [ 102 | Column( 103 | mainAxisSize: MainAxisSize.min, 104 | crossAxisAlignment: CrossAxisAlignment.center, 105 | children: [ 106 | Text("Nombre de nuit",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 107 | Text("4",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 108 | ], 109 | ), 110 | Container( 111 | width: 1, 112 | color: Colors.black38, 113 | height: 50, 114 | ), 115 | Column( 116 | mainAxisSize: MainAxisSize.min, 117 | crossAxisAlignment: CrossAxisAlignment.center, 118 | children: [ 119 | Text("Prix total",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 120 | Text("9800 DA",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 121 | ], 122 | ), 123 | ], 124 | ), 125 | ), 126 | ], 127 | ), 128 | ], 129 | ), 130 | bottomNavigationBar: Padding( 131 | padding: EdgeInsets.only(right : MediaQuery.of(context).size.width*.15, 132 | left:MediaQuery.of(context).size.width*.15, 133 | bottom: 12), 134 | child: CustomSliderWidget(), 135 | ), 136 | ); 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /lib/Routes/DescriptionDetails.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DescriptionDetails extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | // TODO: implement build 7 | throw UnimplementedError(); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /lib/Routes/HomePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Routes/AddProperty.dart'; 3 | import 'package:airbnb_clone/Routes/Profile.dart'; 4 | import 'package:airbnb_clone/Routes/Messages.dart'; 5 | import 'package:airbnb_clone/Routes/Properties.dart'; 6 | import 'package:airbnb_clone/Routes/homeScreen.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 9 | 10 | import '../Widgets/TypeProperties.dart'; 11 | class HomePage extends StatefulWidget{ 12 | @override 13 | State createState() => HomePageState(); 14 | } 15 | 16 | void main() => runApp( 17 | MaterialApp( 18 | debugShowCheckedModeBanner: false, 19 | 20 | home: HomePage(), 21 | theme: ThemeData( 22 | primaryColor: Constants.greenAirbnb, 23 | accentColor: Constants.redAirbnb, 24 | scaffoldBackgroundColor: Colors.orange[400] 25 | ) 26 | ), 27 | ); 28 | 29 | 30 | class HomePageState extends State { 31 | int _currentTab=0; 32 | List _children=[HomeScreen(),Properties(),Messages(),Profile()]; 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | backgroundColor: Color(0XFFE7EBEE), 38 | body: SafeArea( 39 | child: _children[_currentTab], 40 | ), 41 | bottomNavigationBar: BottomNavigationBar( 42 | elevation: 5, 43 | selectedItemColor: Constants.greenAirbnb, 44 | unselectedItemColor: Colors.grey[800], 45 | type: BottomNavigationBarType.fixed, 46 | onTap: (int value) { 47 | setState(() { 48 | _currentTab=value; 49 | }); 50 | }, 51 | currentIndex: _currentTab, 52 | items:[ 53 | BottomNavigationBarItem( 54 | icon: Icon( 55 | Icons.search, 56 | size: 30, 57 | ), 58 | title: Text("EXPLORER",style: TextStyle(fontSize: 11),), 59 | ), 60 | BottomNavigationBarItem( 61 | icon: Icon( 62 | Icons.favorite_border, 63 | //color: Colors.black, 64 | size: 30, 65 | ), 66 | title: Text("ENREGISTRES",style: TextStyle(fontSize: 11),), 67 | ), 68 | BottomNavigationBarItem( 69 | icon: Icon( 70 | Icons.chat_bubble_outline, 71 | 72 | size: 30, 73 | ), 74 | title: Text("MESSAGES",style: TextStyle(fontSize: 11),), 75 | ), 76 | BottomNavigationBarItem( 77 | icon: Icon( 78 | Icons.person_outline, 79 | 80 | size: 30, 81 | ), 82 | title: Text("PROFIL",style: TextStyle(fontSize: 11),), 83 | ) 84 | ] 85 | ), 86 | ); 87 | } 88 | } 89 | 90 | 91 | -------------------------------------------------------------------------------- /lib/Routes/InfoPersonnel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class InfoPersonnel extends StatefulWidget { 3 | @override 4 | _infoPersonnelState createState() => _infoPersonnelState(); 5 | } 6 | 7 | class _infoPersonnelState extends State { 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | body: SingleChildScrollView( 12 | child: Padding( 13 | padding: EdgeInsets.symmetric(horizontal:13,vertical: 20), 14 | child: Column( 15 | crossAxisAlignment: CrossAxisAlignment.start, 16 | children: [ 17 | Row( 18 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 19 | children: [ 20 | IconButton( 21 | icon: Icon(Icons.arrow_back,size: 19,color: Colors.black87,), 22 | onPressed: (){ 23 | Navigator.pop(context); 24 | }, 25 | ), 26 | InkWell( 27 | child: Text("sauvegarder",style: TextStyle(fontSize: 14,fontWeight: FontWeight.w400),), 28 | onTap: (){ 29 | Navigator.pop(context); 30 | }, 31 | ) 32 | ], 33 | ), 34 | Padding( 35 | padding: EdgeInsets.symmetric(vertical:8.0,horizontal: 10), 36 | child: Text("Modifier les informations personnelles",style: TextStyle(color:Colors.black,fontSize: 30,fontWeight: FontWeight.w500),), 37 | ), 38 | SizedBox(height: 25,), 39 | Column( 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | children: [ 42 | Padding( 43 | padding: EdgeInsets.fromLTRB(10,8,10,0), 44 | child: Text("Prénom",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 45 | ), 46 | Padding( 47 | padding: EdgeInsets.symmetric(horizontal: 10), 48 | child: TextField( 49 | decoration: InputDecoration( 50 | hintStyle: TextStyle(color: Colors.black87), 51 | suffixIcon: IconButton( 52 | icon: Icon(Icons.cancel,size: 18,), 53 | onPressed: (){}, 54 | ) 55 | ), 56 | controller: TextEditingController( 57 | text: "Mahmoud" 58 | ), 59 | ), 60 | ), 61 | ], 62 | ), 63 | SizedBox(height: 25,), 64 | Column( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | children: [ 67 | Padding( 68 | padding: EdgeInsets.fromLTRB(10,8,10,0), 69 | child: Text("Nom",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 70 | ), 71 | Padding( 72 | padding: EdgeInsets.symmetric(horizontal: 10), 73 | child: TextField( 74 | decoration: InputDecoration( 75 | hintStyle: TextStyle(color: Colors.black87), 76 | suffixIcon: IconButton( 77 | icon: Icon(Icons.cancel,size: 18,), 78 | onPressed: (){}, 79 | ) 80 | ), 81 | controller: TextEditingController( 82 | text: "EL BENS" 83 | ), 84 | ), 85 | ), 86 | ], 87 | ), 88 | SizedBox(height: 25,), 89 | InkWell( 90 | onTap: (){ 91 | 92 | }, 93 | child: GestureDetector( 94 | onTap: (){ 95 | _askedToLead(); 96 | }, 97 | child: Column( 98 | crossAxisAlignment: CrossAxisAlignment.start, 99 | children: [ 100 | Padding( 101 | padding: EdgeInsets.fromLTRB(10,8,10,0), 102 | child: Text("Le sexe",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 103 | ), 104 | Padding( 105 | padding: EdgeInsets.symmetric(horizontal: 12,vertical: 2), 106 | child: Text("Homme",style: TextStyle(color:Colors.black,fontSize: 17,fontWeight: FontWeight.w300),), 107 | ), 108 | ], 109 | ), 110 | ), 111 | ), 112 | SizedBox(height: 25,), 113 | InkWell( 114 | onTap: (){ 115 | _selectDate(context); 116 | }, 117 | child: Column( 118 | crossAxisAlignment: CrossAxisAlignment.start, 119 | children: [ 120 | Padding( 121 | padding: EdgeInsets.fromLTRB(10,8,10,0), 122 | child: Text("Date de naissance",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 123 | ), 124 | Padding( 125 | padding: EdgeInsets.symmetric(horizontal: 10), 126 | child: Text("15- 08 - 1995"), 127 | ), 128 | ], 129 | ), 130 | ), 131 | SizedBox(height: 25,), 132 | Column( 133 | crossAxisAlignment: CrossAxisAlignment.start, 134 | children: [ 135 | Padding( 136 | padding: EdgeInsets.fromLTRB(10,8,10,0), 137 | child: Text("Numero de téléphone",style: TextStyle(color:Colors.black,fontSize: 15,fontWeight: FontWeight.w400),), 138 | ), 139 | Padding( 140 | padding: EdgeInsets.symmetric(horizontal: 10), 141 | child: TextField( 142 | decoration: InputDecoration( 143 | hintStyle: TextStyle(color: Colors.black87), 144 | suffixIcon: IconButton( 145 | icon: Icon(Icons.cancel,size: 18,), 146 | onPressed: (){}, 147 | ) 148 | ), 149 | controller: TextEditingController( 150 | text: "+213 XXXXXXXX" 151 | ), 152 | ), 153 | ), 154 | ], 155 | ), 156 | ], 157 | ), 158 | ), 159 | ), 160 | ); 161 | } 162 | Future _selectDate(BuildContext context) async { 163 | DateTime selectedDate = DateTime.now(); 164 | final DateTime picked = await showDatePicker( 165 | context: context, 166 | initialDate: selectedDate, 167 | firstDate: DateTime(1950, 1), 168 | lastDate: DateTime(DateTime.now().year+1)); 169 | if (picked != null && picked != selectedDate) 170 | setState(() { 171 | selectedDate = picked; 172 | }); 173 | } 174 | 175 | Future _askedToLead() async { 176 | switch (await showDialog( 177 | context: context, 178 | builder: (BuildContext context) { 179 | return SimpleDialog( 180 | title: const Text('Sexe'), 181 | children: [ 182 | SimpleDialogOption( 183 | onPressed: () { Navigator.pop(context, "Homme"); }, 184 | child: const Text('Homme'), 185 | ), 186 | SimpleDialogOption( 187 | onPressed: () { Navigator.pop(context, "Femme"); }, 188 | child: const Text('Femme'), 189 | ), 190 | ], 191 | ); 192 | } 193 | )) { 194 | case "Homme": 195 | // Let's go. 196 | // ... 197 | break; 198 | case "Femme": 199 | // ... 200 | break; 201 | } 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /lib/Routes/Map.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatefulWidget { 10 | @override 11 | _MyAppState createState() => _MyAppState(); 12 | } 13 | 14 | class _MyAppState extends State { 15 | Completer _controller = Completer(); 16 | 17 | static const LatLng _center = const LatLng(45.521563, -122.677433); 18 | 19 | void _onMapCreated(GoogleMapController controller) { 20 | _controller.complete(controller); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return MaterialApp( 26 | home: Scaffold( 27 | appBar: AppBar( 28 | title: Text('Maps Sample App'), 29 | backgroundColor: Colors.green[700], 30 | ), 31 | body: GoogleMap( 32 | onMapCreated: _onMapCreated, 33 | initialCameraPosition: CameraPosition( 34 | target: _center, 35 | zoom: 11.0, 36 | ), 37 | ), 38 | ), 39 | ); 40 | } 41 | } -------------------------------------------------------------------------------- /lib/Routes/Messages.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | void main()=>runApp( 4 | MaterialApp( 5 | debugShowCheckedModeBanner: false, 6 | home : Messages(), 7 | ) 8 | ); 9 | 10 | class Messages extends StatefulWidget { 11 | 12 | @override 13 | _MessagesState createState() => _MessagesState(); 14 | } 15 | 16 | class _MessagesState extends State { 17 | 18 | List items =["a","b","c","d"]; 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | 23 | body: Padding( 24 | padding: EdgeInsets.symmetric(horizontal: 25,vertical: 30), 25 | child: Column( 26 | crossAxisAlignment: CrossAxisAlignment.start, 27 | children: [ 28 | Row( 29 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 30 | children: [ 31 | IconButton( 32 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 33 | onPressed: (){ 34 | Navigator.pop(context); 35 | },), 36 | Text("Notifications") 37 | ], 38 | ), 39 | Expanded( 40 | child: ListView.builder( 41 | itemCount: items.length, 42 | scrollDirection: Axis.vertical, 43 | itemBuilder: (context,i){ 44 | return Container( 45 | padding: EdgeInsets.all(8), 46 | child: Dismissible( 47 | key: Key(items[i]), 48 | child: Material( 49 | elevation: 3, 50 | child: Container( 51 | margin: EdgeInsets.symmetric(vertical: 15,horizontal: 10), 52 | child: Row( 53 | children: [ 54 | Container( 55 | margin: EdgeInsets.only(right: 10), 56 | height: 60, 57 | width: 60, 58 | decoration: BoxDecoration( 59 | shape: BoxShape.rectangle, 60 | color: Colors.red 61 | ), 62 | ), 63 | Flexible( 64 | child: Text("Un Admin a accepté votre demande",style: TextStyle(fontSize:12),maxLines: 2,overflow: TextOverflow.ellipsis,)), 65 | 66 | ], 67 | ), 68 | ), 69 | ), 70 | onDismissed: (direction){ 71 | setState(() { 72 | items.removeAt(i); 73 | }); 74 | }, 75 | ), 76 | ); 77 | }), 78 | ), 79 | ], 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/Routes/Ongoing.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/SliderModel.dart'; 3 | import 'package:airbnb_clone/Routes/login.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class Ongoing extends StatefulWidget { 8 | @override 9 | _OngoingState createState() => _OngoingState(); 10 | } 11 | 12 | class _OngoingState extends State { 13 | List slides = new List(); 14 | 15 | int currentState; 16 | 17 | PageController pageController = new PageController(initialPage: 0); 18 | @override 19 | void initState() { 20 | slides=SliderModel.getSlides(); 21 | } 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | backgroundColor: Colors.white, 26 | body: PageView.builder( 27 | itemBuilder: (context,index){ 28 | return SlideTiles( 29 | slides[index].imagePath, 30 | slides[index].text, 31 | slides[index].title, 32 | index, 33 | ); 34 | }, 35 | controller: pageController, 36 | itemCount: slides.length, 37 | scrollDirection: Axis.horizontal, 38 | onPageChanged: (val){ 39 | currentState=val; 40 | }, 41 | ), 42 | ); 43 | } 44 | } 45 | 46 | class SlideTiles extends StatelessWidget { 47 | String imagePath,text,title; 48 | int current; 49 | 50 | SlideTiles(this.imagePath, this.text, this.title,this.current); 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Container( 55 | width: MediaQuery.of(context).size.width, 56 | padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10), 57 | child: Column( 58 | 59 | crossAxisAlignment: CrossAxisAlignment.center, 60 | mainAxisAlignment: MainAxisAlignment.center, 61 | children: [ 62 | Image.asset(imagePath,width: MediaQuery.of(context).size.width,), 63 | SizedBox(height: 15,), 64 | Row( 65 | mainAxisAlignment: MainAxisAlignment.center, 66 | children: [ 67 | for(int i=0;i Login()), 90 | ); 91 | }, 92 | child: Container( 93 | padding: EdgeInsets.symmetric(horizontal: 30,vertical: 10), 94 | margin: EdgeInsets.symmetric(horizontal: 30,vertical: 30), 95 | width: MediaQuery.of(context).size.width, 96 | decoration: BoxDecoration( 97 | color: Constants.greenAirbnb, 98 | borderRadius: BorderRadius.circular(25), 99 | boxShadow: [ 100 | BoxShadow( 101 | blurRadius: 2, 102 | color: Colors.grey, 103 | offset: Offset(0,2) 104 | 105 | ) 106 | ] 107 | ), 108 | child: Text("Login",style: TextStyle(color: Colors.white),textAlign: TextAlign.center,), 109 | 110 | ), 111 | ), 112 | ], 113 | ), 114 | ); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/Routes/Payer.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Payer extends StatefulWidget { 5 | @override 6 | _PayerState createState() => _PayerState(); 7 | } 8 | 9 | class _PayerState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | body: SingleChildScrollView( 14 | child: Padding( 15 | padding: EdgeInsets.symmetric(vertical:25,horizontal: 15 ), 16 | child: Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | Row( 20 | mainAxisSize: MainAxisSize.min, 21 | children: [ 22 | IconButton( 23 | icon: Icon(Icons.arrow_back,color: Colors.black87,size: 23,), 24 | onPressed: (){ 25 | Navigator.pop(context); 26 | }, 27 | ), 28 | Text("Confirmez et payez",style: TextStyle(fontSize: 18),), 29 | ], 30 | ), 31 | SizedBox(height: 30), 32 | Container( 33 | child: Row( 34 | mainAxisSize: MainAxisSize.min, 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | children: [ 37 | Container( 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.circular(15), 40 | ), 41 | height: 160,width: 120, 42 | child: ClipRRect( 43 | borderRadius: BorderRadius.circular(15) , 44 | child: Image.asset("assets/images/properties/p1.jpg",fit: BoxFit.fill,) 45 | ) 46 | ), 47 | SizedBox(width: 15,), 48 | Flexible( 49 | child: Column( 50 | mainAxisAlignment: MainAxisAlignment.center, 51 | crossAxisAlignment: CrossAxisAlignment.start, 52 | children: [ 53 | Text("Appartement en résidence",style: TextStyle(fontSize: 12),overflow: TextOverflow.ellipsis,maxLines: 1,), 54 | SizedBox(height: 10,), 55 | Text("Appartement",style: TextStyle(fontSize: 16),overflow: TextOverflow.ellipsis,maxLines: 1,), 56 | SizedBox(height: 8,), 57 | Text("Alger centre",style: TextStyle(fontSize: 16),overflow: TextOverflow.ellipsis,maxLines: 1,), 58 | SizedBox(height: 8,), 59 | Row( 60 | children: [ 61 | Container( 62 | margin:EdgeInsets.only(right: 5), 63 | child: Icon(Icons.star,color: Colors.red,size: 18,)), 64 | Container( 65 | margin:EdgeInsets.only(right: 5), 66 | child: Align( 67 | alignment: Alignment.topLeft, 68 | 69 | child: Text("5,0",style: TextStyle(color: Colors.black,fontSize: 12,fontWeight: FontWeight.bold),overflow: TextOverflow.ellipsis,), 70 | ), 71 | ) , 72 | Align( 73 | alignment: Alignment.topLeft, 74 | child: Text("(25)",style: TextStyle(color: Colors.black54,fontSize: 12,fontWeight: FontWeight.w400,letterSpacing: 0.2),overflow: TextOverflow.ellipsis,), 75 | ) , 76 | ], 77 | ), 78 | ], 79 | ), 80 | ), 81 | ], 82 | ), 83 | ), 84 | SizedBox(height: 25,), 85 | Container( 86 | height: 10, 87 | color: Colors.black12, 88 | width: MediaQuery.of(context).size.width, 89 | ), 90 | Text("Votre voyage",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 20),), 91 | SizedBox(height: 15,), 92 | Row( 93 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 94 | children: [ 95 | Text("Dates",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 17),), 96 | InkWell( 97 | onTap: (){ 98 | 99 | }, 100 | child: Text("Modifier",style: TextStyle(fontWeight: FontWeight.w400,fontSize: 17,decoration: TextDecoration.underline),)), 101 | ], 102 | ), 103 | SizedBox(height: 10,), 104 | Text("25-08-2020 / 29-08-2020",style: TextStyle(color: Colors.grey,fontSize: 16),), 105 | SizedBox(height: 15,), 106 | Row( 107 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 108 | children: [ 109 | Text("Voyageurs",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 17),), 110 | InkWell( 111 | onTap: (){ 112 | 113 | }, 114 | child: Text("Modifier",style: TextStyle(fontWeight: FontWeight.w400,fontSize: 17,decoration: TextDecoration.underline),)), 115 | ], 116 | ), 117 | SizedBox(height: 10,), 118 | Text("5 voyageurs",style: TextStyle(color: Colors.grey,fontSize: 16),), 119 | SizedBox(height: 10,), 120 | Text("Détails du prix",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 17),), 121 | SizedBox(height: 10,), 122 | Row( 123 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 124 | children: [ 125 | Text("2500 x 5 nuits",style: TextStyle(color: Colors.grey,fontSize: 16),), 126 | Text("12500DA",style: TextStyle(color: Colors.grey,fontSize: 16),), 127 | ], 128 | ), 129 | SizedBox(height: 50,), 130 | Center( 131 | child: MaterialButton( 132 | child: Container( 133 | width: MediaQuery.of(context).size.width, 134 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 135 | decoration: BoxDecoration( 136 | borderRadius: BorderRadius.circular(15), 137 | color: Constants.greenAirbnb, 138 | ), 139 | child: Text("Confirmer et payer",style: TextStyle(color: Colors.white),textAlign: TextAlign.center,)), 140 | ), 141 | ) 142 | ] 143 | ), 144 | ), 145 | ), 146 | ); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /lib/Routes/Profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | import 'package:airbnb_clone/Routes/AddProperty.dart'; 4 | import 'package:airbnb_clone/Routes/InfoPersonnel.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | void main()=>runApp( 8 | MaterialApp( 9 | debugShowCheckedModeBanner: false, 10 | home : Profile(), 11 | ) 12 | ); 13 | 14 | class Profile extends StatefulWidget { 15 | 16 | @override 17 | _ProfileState createState() => _ProfileState(); 18 | } 19 | 20 | class _ProfileState extends State { 21 | final textStyleState = TextStyle( 22 | fontSize: 11.0, 23 | color: Colors.white 24 | ); 25 | 26 | final textStyleTop = TextStyle( 27 | fontSize: 22.0, 28 | fontWeight: FontWeight.bold, 29 | color: Colors.white 30 | ); 31 | 32 | final textStyle2 = TextStyle( 33 | color: Colors.white 34 | 35 | ); 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | body:ListView( 41 | children: [ 42 | Container( 43 | 44 | child: Padding( 45 | padding: EdgeInsets.all(25), 46 | child: Row( 47 | children: [ 48 | Container( 49 | width: 60.0, 50 | height: 60.0, 51 | decoration: BoxDecoration( 52 | image: DecorationImage( 53 | image: AssetImage("assets/images/profilePicture.png"), 54 | fit: BoxFit.cover 55 | ), 56 | borderRadius: BorderRadius.circular(20) 57 | ), 58 | ), 59 | SizedBox(width: 15,), 60 | Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | children: [ 63 | Text("Robert",style: TextStyle( 64 | fontWeight: FontWeight.bold, 65 | fontSize: 24, 66 | color: Colors.black87 67 | ),), 68 | ], 69 | ) 70 | ], 71 | ), 72 | ), 73 | ), 74 | ClipRRect( 75 | 76 | child: Container( 77 | margin: const EdgeInsets.only(bottom: 5.0), 78 | decoration: BoxDecoration( 79 | color: Colors.black12, 80 | boxShadow: [ 81 | BoxShadow( 82 | color: Colors.black87, 83 | offset: Offset(0.0, 1.0), //(x,y) 84 | blurRadius: 5.0, 85 | ), 86 | ], 87 | ), 88 | width: 50, 89 | height: 1, 90 | ), 91 | ), 92 | Padding( 93 | padding: EdgeInsets.all(15), 94 | child: Text("Paramètres du compte".toUpperCase(),style: TextStyle(color: Colors.grey,fontSize: 15,),), 95 | ), 96 | FlatButton( 97 | splashColor: Colors.grey, 98 | onPressed: (){ 99 | Navigator.push( 100 | context, 101 | MaterialPageRoute(builder: (context) => InfoPersonnel()), 102 | ); 103 | }, 104 | child: Padding( 105 | padding: EdgeInsets.all(15), 106 | child: Row( 107 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 108 | children: [ 109 | Expanded( 110 | child: Text("Informations personnelles", 111 | style: TextStyle(color: Colors.black,fontSize: 17,fontWeight: FontWeight.w300), 112 | overflow: TextOverflow.ellipsis,), 113 | ), 114 | Icon( 115 | Icons.person_outline, 116 | ), 117 | ], 118 | ), 119 | ), 120 | ), 121 | Container( 122 | margin: EdgeInsets.symmetric(horizontal: 30), 123 | decoration: BoxDecoration( 124 | color: Colors.black12, 125 | ), 126 | width: 50, 127 | height: 1, 128 | ), 129 | FlatButton( 130 | splashColor: Colors.grey, 131 | onPressed: (){}, 132 | child: Padding( 133 | padding: EdgeInsets.all(15), 134 | child: Row( 135 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 136 | children: [ 137 | Expanded( 138 | child: Text("Notifications", 139 | style: TextStyle(color: Colors.black,fontSize: 18,fontWeight: FontWeight.w300), 140 | overflow: TextOverflow.ellipsis,), 141 | ), 142 | Icon( 143 | Icons.notifications_none, 144 | ), 145 | ], 146 | ), 147 | ), 148 | ), 149 | Container( 150 | margin: EdgeInsets.symmetric(horizontal: 30), 151 | decoration: BoxDecoration( 152 | color: Colors.black12, 153 | ), 154 | width: 50, 155 | height: 1, 156 | ), 157 | FlatButton( 158 | splashColor: Colors.grey, 159 | onPressed: (){ 160 | Navigator.push( 161 | context, 162 | MaterialPageRoute(builder: (context) => AddProperty()), 163 | ); 164 | }, 165 | child: Padding( 166 | padding: EdgeInsets.all(15), 167 | child: Row( 168 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 169 | children: [ 170 | Expanded( 171 | child: Text("Ajouter appartement", 172 | style: TextStyle(color: Colors.black,fontSize: 18,fontWeight: FontWeight.w300), 173 | overflow: TextOverflow.ellipsis,), 174 | ), 175 | Icon( 176 | Icons.add_circle_outline, 177 | ), 178 | ], 179 | ), 180 | ), 181 | ), 182 | Container( 183 | margin: EdgeInsets.symmetric(horizontal: 30), 184 | decoration: BoxDecoration( 185 | color: Colors.black12, 186 | ), 187 | width: 50, 188 | height: 1, 189 | ), 190 | FlatButton( 191 | splashColor: Colors.grey, 192 | onPressed: (){}, 193 | child: Padding( 194 | padding: EdgeInsets.all(15), 195 | child: Row( 196 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 197 | children: [ 198 | Expanded( 199 | child: Text("Se déconnecter", 200 | style: TextStyle(color: Colors.black,fontSize: 18,fontWeight: FontWeight.w300), 201 | overflow: TextOverflow.ellipsis,), 202 | ), 203 | Icon( 204 | Icons.exit_to_app, 205 | ), 206 | ], 207 | ), 208 | ), 209 | ), 210 | ], 211 | ), 212 | ); 213 | } 214 | } -------------------------------------------------------------------------------- /lib/Routes/Properties.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | import 'package:airbnb_clone/Routes/BookingScreen.dart'; 4 | import 'package:airbnb_clone/Routes/Property-details.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/rendering.dart'; 8 | import 'package:flutter/widgets.dart'; 9 | import 'package:airbnb_clone/Widgets/ImageView.dart'; 10 | import 'package:flutter_slider_indicator/flutter_slider_indicator.dart'; 11 | 12 | import 'Payer.dart'; 13 | 14 | class Properties extends StatefulWidget { 15 | 16 | @override 17 | _PropertiesState createState() => _PropertiesState(); 18 | } 19 | 20 | class _PropertiesState extends State { 21 | var _pageController=PageController(); 22 | var _currentIndex=0; 23 | 24 | var _liked=false; 25 | 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | _pageController.addListener(() { 30 | setState(() { 31 | _currentIndex=_pageController.page.round(); 32 | }); 33 | }); 34 | 35 | List properties = [ 36 | 37 | new ImageProperty(true, Constants.properties[1]), 38 | new ImageProperty(false, Constants.properties[0]), 39 | //_buildPadding(), 40 | ]; 41 | return Scaffold( 42 | 43 | body: SafeArea( 44 | child: ListView( 45 | scrollDirection: Axis.vertical, 46 | children: [ 47 | for(Widget prop in properties) 48 | prop, 49 | 50 | ], 51 | ), 52 | ), 53 | ); 54 | 55 | } 56 | Container buildImageSlider(BuildContext context,PageController p,int index,Property property) { 57 | return Container( 58 | // margin: EdgeInsets.all(20), 59 | child: PageView.builder( 60 | controller: p..addListener(() { 61 | setState(() { 62 | index=p.page.round(); 63 | }); 64 | }), 65 | itemCount: property.images.length, 66 | itemBuilder: ( 67 | context,index){ 68 | return ClipRRect( 69 | child:Image.asset(property.images[index],fit: BoxFit.cover,)); 70 | } 71 | ) 72 | ); 73 | } 74 | 75 | Align buildWidgetImageIndicator(BuildContext context,Property property, int currentindex) { 76 | return Align( 77 | alignment: Alignment.bottomCenter, 78 | child: Padding( 79 | padding: EdgeInsets.all(10.0), 80 | child: SliderIndicator( 81 | length: property.images.length, 82 | activeIndex: currentindex, 83 | indicator:Padding( padding:EdgeInsets.all(3),child:Icon(Icons.fiber_manual_record,color: Colors.white70,size: 10,)), 84 | activeIndicator: Padding(padding:EdgeInsets.all(3),child:Icon(Icons.fiber_manual_record,color: Colors.white,size: 14,),) 85 | ), 86 | ), 87 | ); 88 | } 89 | 90 | buildHeartWidget(BuildContext context) { 91 | 92 | return Container( 93 | margin: EdgeInsets.all(10), 94 | alignment: Alignment.topRight, 95 | child:GestureDetector( 96 | child:Container( 97 | padding: EdgeInsets.all(5), 98 | decoration: BoxDecoration( 99 | color: Colors.white, 100 | shape: BoxShape.circle, 101 | // borderRadius: BorderRadius.circular(25) 102 | ), 103 | child: Icon(!_liked?Icons.favorite_border:Icons.favorite,color:!_liked? Colors.black:Constants.redAirbnb,size: 25,), 104 | ), 105 | onTap: (){ 106 | setState(() { 107 | _liked=!_liked; 108 | }); 109 | }, 110 | ) 111 | ); 112 | } 113 | 114 | _buildPadding(Property property) { 115 | return Padding( 116 | padding: EdgeInsets.only(bottom: 5), 117 | child: InkWell( 118 | onTap: (){ 119 | Navigator.push( 120 | context, 121 | MaterialPageRoute(builder: (context) => PropertyDetails(property)), 122 | ); 123 | }, 124 | child:Column( 125 | children: [ 126 | Container( 127 | margin: EdgeInsets.fromLTRB(0,0,0,15), 128 | decoration: BoxDecoration( 129 | borderRadius: BorderRadius.circular(3), 130 | 131 | ), 132 | height: 200, 133 | child: Stack( 134 | children: [ 135 | buildImageSlider(context,PageController(),_currentIndex,property), 136 | buildWidgetImageIndicator(context,Constants.properties[1],_currentIndex), 137 | buildHeartWidget(context), 138 | ], 139 | ), 140 | ), 141 | Padding( 142 | padding: const EdgeInsets.fromLTRB( 35,0,35, 20), 143 | child: Row( 144 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 145 | children: [ 146 | Column( 147 | children: [ 148 | Align( 149 | alignment: Alignment.topLeft, 150 | child: Text("ORAN",style: TextStyle(color: Colors.black87,fontSize: 15,fontWeight: FontWeight.w400),), 151 | ), 152 | Align( 153 | alignment: Alignment.topLeft, 154 | child: Text("Maison entière",style: TextStyle(color: Colors.black87,fontSize: 18,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 155 | ), 156 | Align( 157 | alignment: Alignment.topLeft, 158 | child: Text("EL-BEY",style: TextStyle(color: Colors.black87,fontSize: 18,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 159 | ), 160 | Align( 161 | alignment: Alignment.topLeft, 162 | child: Text("4200 DZD/nuit",style: TextStyle(color: Colors.black54,fontSize: 13,fontWeight: FontWeight.w400),), 163 | ), 164 | Row( 165 | children: [ 166 | Icon(Icons.star,color: Constants.greenAirbnb,size: 12,), 167 | Align( 168 | alignment: Alignment.topLeft, 169 | child: Text("5,0",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 170 | ) , 171 | Align( 172 | alignment: Alignment.topLeft, 173 | child: Text("(25)",style: TextStyle(color: Colors.black54,fontSize: 13,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 174 | ) , 175 | ], 176 | ), 177 | ], 178 | ), 179 | Container( 180 | padding: EdgeInsets.symmetric(horizontal: 15,vertical: 10), 181 | decoration: BoxDecoration( 182 | borderRadius: BorderRadius.circular(20), 183 | color: Constants.greenAirbnb 184 | ), 185 | child: InkWell( 186 | child: Text("Book now",style: TextStyle(color: Colors.white),), 187 | onTap: (){ 188 | Navigator.push( 189 | context, 190 | MaterialPageRoute(builder: (context) => Payer()), 191 | ); 192 | }, 193 | ), 194 | ) 195 | ], 196 | ), 197 | ), 198 | 199 | 200 | ], 201 | ), ), 202 | ); 203 | } 204 | 205 | } 206 | -------------------------------------------------------------------------------- /lib/Routes/Properties1.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | import 'package:airbnb_clone/Model/Wilaya.dart'; 4 | import 'package:airbnb_clone/Routes/Property-details.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 8 | class Properties extends StatefulWidget { 9 | final Wilaya wilaya; 10 | Properties({this.wilaya}); 11 | @override 12 | _PropertiesState createState() => _PropertiesState(); 13 | } 14 | 15 | class _PropertiesState extends State { 16 | Row _buildRaitingStars(double raiting) { 17 | 18 | return Row( 19 | children: [ 20 | Icon(Icons.star,color: Colors.orangeAccent,), 21 | Icon(Icons.star,color: Colors.orangeAccent,), 22 | Icon(Icons.star,color: Colors.orangeAccent,), 23 | Icon(Icons.star,color: Colors.orangeAccent,), 24 | ], 25 | ); 26 | } 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | body: Column( 31 | children: [ 32 | Stack( 33 | children: [ 34 | Container( 35 | height: MediaQuery.of(context).size.width, 36 | decoration: BoxDecoration( 37 | borderRadius: BorderRadius.circular(30), 38 | boxShadow: [BoxShadow( 39 | color: Colors.black26, 40 | offset: Offset(0.0,2.0), 41 | blurRadius: 6.0 42 | ) 43 | ] 44 | ), 45 | child:Hero( 46 | tag: widget.wilaya.image, 47 | child: ClipRRect( 48 | borderRadius: BorderRadius.circular(30), 49 | child:Image(image: AssetImage(widget.wilaya.image), 50 | fit: BoxFit.cover,), 51 | ) 52 | ) 53 | ), 54 | Row( 55 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 56 | children: [ 57 | Padding( 58 | padding: EdgeInsets.symmetric(horizontal: 10.0,vertical: 40.0), 59 | child: IconButton( 60 | icon: Icon(Icons.arrow_back,), 61 | color: Colors.black, 62 | iconSize: 30, 63 | onPressed: () => Navigator.pop((context)), 64 | ), 65 | ), 66 | Row( 67 | children: [ 68 | Padding( 69 | padding: EdgeInsets.symmetric(horizontal: 10.0,vertical: 40.0), 70 | child: IconButton( 71 | icon: Icon(FontAwesomeIcons.sortAmountDown,), 72 | color: Colors.black, 73 | iconSize: 25, 74 | onPressed: () => Navigator.pop((context)), 75 | ), 76 | ), Padding( 77 | padding: EdgeInsets.symmetric(horizontal: 10.0,vertical: 40.0), 78 | child: IconButton( 79 | icon: Icon(Icons.search,), 80 | color: Colors.black, 81 | iconSize: 30, 82 | onPressed: () => Navigator.pop((context)), 83 | ), 84 | ), 85 | ], 86 | ) 87 | ], 88 | ), 89 | Positioned( 90 | left: 20, 91 | bottom: 20, 92 | child:Column( 93 | crossAxisAlignment: CrossAxisAlignment.start , 94 | children: [ 95 | Text("${widget.wilaya.label}",style: TextStyle( 96 | fontSize: 35, 97 | fontWeight: FontWeight.w600, 98 | color: Colors.white, 99 | letterSpacing: 1.2 100 | ),), 101 | Row( 102 | children: [ 103 | Icon( 104 | FontAwesomeIcons.idBadge,size: 15.0,color: Colors.white70, 105 | ), 106 | SizedBox(width:8,), 107 | Text("${widget.wilaya.matricule}",style: TextStyle( 108 | color: Colors.white70, 109 | fontSize: 20, 110 | ),) 111 | ], 112 | ) 113 | ], 114 | ) , 115 | ), 116 | Positioned( 117 | bottom: 20.0, 118 | right: 20.0, 119 | child: Icon(Icons.location_on, 120 | size: 25, 121 | color: Colors.white70,), 122 | ) 123 | ], 124 | ), 125 | Expanded( 126 | child: GestureDetector( 127 | onTap:(){ 128 | Navigator.push( 129 | context, 130 | MaterialPageRoute(builder: (context) => PropertyDetails(Constants.properties[0])), 131 | ); 132 | }, 133 | child: ListView.builder( 134 | padding : EdgeInsets.only(top:10,bottom: 15), 135 | itemCount : Constants.properties.length 136 | ,itemBuilder: (BuildContext context,int index){ 137 | Property property = Constants.properties[index]; 138 | return Stack( 139 | children: [ 140 | Container( 141 | margin: EdgeInsets.fromLTRB(40,5,20,5), 142 | height : 170, 143 | width: double.infinity, 144 | decoration: BoxDecoration( 145 | borderRadius: BorderRadius.circular(20), 146 | color: Colors.white 147 | ), 148 | child: Padding( 149 | padding: EdgeInsets.fromLTRB(100,20,20,20), 150 | child: Column( 151 | mainAxisAlignment: MainAxisAlignment.center, 152 | crossAxisAlignment: CrossAxisAlignment.start, 153 | children: [ 154 | Row( 155 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 156 | crossAxisAlignment: CrossAxisAlignment.start, 157 | children: [ 158 | Container( 159 | width:120, 160 | child: Text(property.titre,style: TextStyle(fontWeight: FontWeight.w600, 161 | fontSize: 18 162 | ), 163 | maxLines: 2, 164 | overflow: TextOverflow.ellipsis, 165 | ), 166 | ), 167 | Column( 168 | children: [ 169 | Text("${property.prix}",style: TextStyle( 170 | fontSize: 22, 171 | fontWeight: FontWeight.w600, 172 | ),), 173 | Text("DA/nuit",style: TextStyle( 174 | fontSize: 12, 175 | fontWeight: FontWeight.w600, 176 | color: Colors.black38 177 | ), 178 | textAlign: TextAlign.end, 179 | ), 180 | ], 181 | ) 182 | 183 | ], 184 | ), 185 | Text("${property.toString()}",style: TextStyle( 186 | color: Colors.grey 187 | ),), 188 | _buildRaitingStars(property.raiting), 189 | SizedBox(height: 10,), 190 | 191 | ], 192 | ), 193 | ), 194 | ), 195 | Positioned( 196 | left:20, 197 | top :15, 198 | bottom :15, 199 | child: ClipRRect( 200 | borderRadius: BorderRadius.circular(20), 201 | child: Image(width: 110,image: AssetImage(property.images[0]), 202 | fit: BoxFit.cover,), 203 | ), 204 | ) 205 | ], 206 | ); 207 | } 208 | ), 209 | ), 210 | ) 211 | ], 212 | ), 213 | ); 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /lib/Routes/Property-details1.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Property.dart'; 2 | import 'package:airbnb_clone/Routes/BookingScreen.dart'; 3 | import 'package:airbnb_clone/Widgets/custom_slider_widget.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | import 'package:flutter_slider_indicator/flutter_slider_indicator.dart'; 8 | void main()=>runApp( 9 | MaterialApp( 10 | debugShowCheckedModeBanner: false, 11 | ) 12 | ); 13 | class PropertyDetails extends StatefulWidget { 14 | final Property _property; 15 | PropertyDetails(this._property); 16 | @override 17 | _PropertyDetailsState createState() => _PropertyDetailsState(); 18 | } 19 | 20 | class _PropertyDetailsState extends State { 21 | var _pageController=PageController(); 22 | var _currentIndex=0; 23 | var _maxlines =3; 24 | @override 25 | Widget build(BuildContext context) { 26 | _pageController.addListener(() { 27 | setState(() { 28 | _currentIndex=_pageController.page.round(); 29 | }); 30 | }); 31 | return Scaffold( 32 | backgroundColor: Colors.white, 33 | body: Stack( 34 | children: [ 35 | buildImageSlider(context), 36 | buildWidgetImageIndicator(context), 37 | buildCloseWidget(context), 38 | buildContainerPrice(), 39 | DraggableScrollableSheet( 40 | initialChildSize: .5, 41 | minChildSize: .5, 42 | maxChildSize: .8, 43 | builder: (context,controller){ 44 | return SingleChildScrollView( 45 | controller: controller, 46 | child: Stack( 47 | children: [ 48 | Container( 49 | margin: EdgeInsets.only(top :25), 50 | width: MediaQuery.of(context).size.width, 51 | decoration: BoxDecoration( 52 | color: Colors.white, 53 | borderRadius: BorderRadius.only(topLeft: Radius.circular(25),topRight: Radius.circular(25)) 54 | ), 55 | child: Column( 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | children: [ 58 | Center( 59 | child: Center( 60 | child:Icon(Icons.drag_handle,color: Colors.black38,), 61 | ), 62 | ), 63 | Padding( 64 | padding: EdgeInsets.all(24.0), 65 | child: Text(widget._property.titre,style: TextStyle(fontWeight: FontWeight.bold,fontSize: 30),), 66 | ), 67 | Padding( 68 | padding: EdgeInsets.symmetric(horizontal: 24), 69 | child: Row( 70 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 71 | children: [ 72 | buildWidgetSize(), 73 | Container( 74 | width: 1, 75 | height: 50, 76 | color: Colors.black38, 77 | ), 78 | buildWidgetNbrPiece(), 79 | Container( 80 | width: 1, 81 | height: 50, 82 | color: Colors.black38, 83 | ), 84 | buildWidgetNbrFacades(), 85 | ], 86 | ), 87 | ), 88 | SizedBox(height: 24,), 89 | Padding( 90 | padding: EdgeInsets.symmetric(horizontal: 24), 91 | child: Text("${widget._property.descreption}", 92 | style: TextStyle(height: 1.5), 93 | maxLines: _maxlines, 94 | overflow: TextOverflow.ellipsis,), 95 | ), 96 | Padding( 97 | padding: EdgeInsets.symmetric(horizontal: 24), 98 | child: GestureDetector( 99 | onTap: (){ 100 | setState(() { 101 | if(_maxlines==3) 102 | _maxlines=10; 103 | else _maxlines=3; 104 | }); 105 | }, 106 | child: Text(_maxlines==3 ? "Afficher la suite": "Afficher moins", 107 | style: TextStyle(fontWeight: FontWeight.bold,color: Color(0xff3366cc),height: 1.5), 108 | ) 109 | ), 110 | ) 111 | ], 112 | ), 113 | ) 114 | ], 115 | ), 116 | ); 117 | }, 118 | ) 119 | ], 120 | ), 121 | bottomNavigationBar: Padding( 122 | padding: EdgeInsets.only(right : MediaQuery.of(context).size.width*.15, 123 | left:MediaQuery.of(context).size.width*.15, 124 | bottom: 12), 125 | child: MaterialButton( 126 | color: Color(0xff3366cc), 127 | onPressed: (){ 128 | Navigator.push(context, MaterialPageRoute(builder: (context)=> BookingScreen(widget._property))); 129 | }, 130 | child: new Text("Aller vers la réservation",style: TextStyle(color: Colors.white),) 131 | ), 132 | ), 133 | ); 134 | } 135 | 136 | Column buildWidgetSize() { 137 | return Column( 138 | crossAxisAlignment: CrossAxisAlignment.start, 139 | children: [ 140 | Text("Surface",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 141 | // Text("${widget._property.surface}",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 142 | ], 143 | ); 144 | } 145 | Column buildWidgetNbrPiece() { 146 | return Column( 147 | crossAxisAlignment: CrossAxisAlignment.start, 148 | children: [ 149 | Text("Pieces",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 150 | // Text("${widget._property.nombrePiece}",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 151 | ], 152 | ); 153 | } 154 | Column buildWidgetNbrFacades() { 155 | return Column( 156 | crossAxisAlignment: CrossAxisAlignment.start, 157 | children: [ 158 | Text("façades",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 16),), 159 | // Text("${widget._property.nbrFacades}",style: TextStyle(color: Colors.black38,height : 1.5,fontSize: 16),) 160 | ], 161 | ); 162 | } 163 | 164 | Container buildImageSlider(BuildContext context) { 165 | return Container( 166 | height: MediaQuery.of(context).size.height* .6, 167 | child: PageView.builder( 168 | controller: _pageController, 169 | itemCount: widget._property.images.length, 170 | itemBuilder: ( 171 | context,index){ 172 | return Image.asset(widget._property.images[_currentIndex],fit: BoxFit.cover,); 173 | } 174 | ) 175 | ); 176 | } 177 | 178 | Align buildWidgetImageIndicator(BuildContext context) { 179 | return Align( 180 | alignment: Alignment.topCenter, 181 | child: Padding( 182 | padding: EdgeInsets.only( 183 | top: MediaQuery.of(context).size.height *.45), 184 | child: SliderIndicator( 185 | length: widget._property.images.length, 186 | activeIndex: _currentIndex, 187 | indicator: Icon(Icons.radio_button_unchecked,color: Colors.white,size: 10,), 188 | activeIndicator: Icon(Icons.fiber_manual_record,color: Colors.white,size: 12,), 189 | ), 190 | ), 191 | ); 192 | } 193 | 194 | Align buildCloseWidget(BuildContext context) { 195 | return Align( 196 | alignment: Alignment.topRight, 197 | 198 | child: Container( 199 | margin: EdgeInsets.only(right: 24,top: 45), 200 | child: IconButton(icon: Icon(Icons.close), 201 | color: Colors.white, 202 | onPressed: (){Navigator.of(context).pop();}, 203 | ), 204 | ), 205 | ); 206 | } 207 | 208 | Container buildContainerPrice() { 209 | return Container( 210 | margin: EdgeInsets.only(left: 24,top: 50), 211 | padding: EdgeInsets.symmetric(vertical: 6,horizontal:12 ), 212 | decoration: BoxDecoration( 213 | color: Colors.grey, 214 | borderRadius: BorderRadius.all(Radius.circular(25)), 215 | ), 216 | child: Row( 217 | mainAxisSize: MainAxisSize.min, 218 | crossAxisAlignment: CrossAxisAlignment.end, 219 | children: [ 220 | Icon(Icons.attach_money,size: 16,color: Colors.white,), 221 | Text("${widget._property.prix}",style: TextStyle(color: Colors.white),), 222 | Text("/ nuit",style: TextStyle(color: Colors.white,fontSize: 16),), 223 | ], 224 | ), 225 | ); 226 | } 227 | } 228 | -------------------------------------------------------------------------------- /lib/Routes/homeScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Routes/Profile.dart'; 3 | import 'package:airbnb_clone/Routes/SearchScreen.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | void main()=>runApp( 7 | MaterialApp( 8 | debugShowCheckedModeBanner: false, 9 | home : HomeScreen(), 10 | ) 11 | ); 12 | 13 | class HomeScreen extends StatefulWidget { 14 | 15 | @override 16 | _HomeScreenState createState() => _HomeScreenState(); 17 | } 18 | 19 | class _HomeScreenState extends State { 20 | final controller = PageController( 21 | initialPage: 1, 22 | ); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | body: SingleChildScrollView( 28 | child: Padding( 29 | padding: const EdgeInsets.all(8.0), 30 | child: Column( 31 | children: [ 32 | SizedBox(height: 50,), 33 | InkWell( 34 | borderRadius: BorderRadius.circular(20), 35 | onTap: () { 36 | Navigator.push( 37 | context, 38 | MaterialPageRoute(builder: (context) => SearchScreen()), 39 | ); 40 | }, 41 | splashColor: Colors.white, 42 | hoverColor: Constants.greenAirbnb, 43 | child: Container( 44 | decoration: BoxDecoration( 45 | borderRadius: BorderRadius.circular(20), 46 | border: Border.all(color: Colors.black87),), 47 | child: Padding( 48 | padding: EdgeInsets.symmetric(horizontal: 15,vertical: 10), 49 | child: Row( 50 | mainAxisAlignment: MainAxisAlignment.spaceAround, 51 | children: [ 52 | Icon(Icons.search), 53 | Text("Emplacement, site touristique",style:TextStyle(fontSize: 13,color: Colors.black54), 54 | overflow: TextOverflow.ellipsis, 55 | ), 56 | ], 57 | ), 58 | ), 59 | ), 60 | ), 61 | SizedBox(height: 80,), 62 | Padding( 63 | padding: EdgeInsets.symmetric(horizontal: 20), 64 | child: Stack( 65 | children: [ 66 | Container( 67 | decoration: BoxDecoration( 68 | borderRadius: BorderRadius.circular(5), 69 | ), 70 | child: Image.asset("assets/images/landing_page_img.png",fit: BoxFit.scaleDown,), 71 | ), 72 | Column( 73 | crossAxisAlignment: CrossAxisAlignment.center, 74 | children: [ 75 | SizedBox(height: 20,), 76 | Center(child: Text("Explorez",style:TextStyle(fontSize: 25,fontWeight:FontWeight.bold,color: Colors.white))), 77 | Center(child: Text("l'Algérie",style:TextStyle(fontSize: 20,color: Colors.white))), 78 | ], 79 | ), 80 | Positioned( 81 | top: 0, 82 | bottom: 0, 83 | left: 0, 84 | right: 0, 85 | 86 | child: MaterialButton( 87 | onPressed: (){ 88 | /* Navigator.push( 89 | context, 90 | MaterialPageRoute(builder: (context) => Photo()), 91 | );*/ 92 | }, 93 | elevation: 3, 94 | child: Container( 95 | padding: EdgeInsets.symmetric(vertical: 15,horizontal: 40), 96 | margin: EdgeInsets.symmetric(vertical: 15,horizontal: 15), 97 | decoration: BoxDecoration( 98 | borderRadius: BorderRadius.circular(15), 99 | color: Colors.white, 100 | ), 101 | child: Text("Explorez",style: TextStyle(color: Colors.red),)), 102 | ), 103 | ) 104 | ], 105 | ), 106 | ), 107 | SizedBox(height: 20,), 108 | Container( 109 | width: MediaQuery.of(context).size.width, 110 | color: Colors.black, 111 | height: 400, 112 | child: Column( 113 | children: [ 114 | Padding( 115 | padding: const EdgeInsets.all(10), 116 | child: Align( 117 | alignment: Alignment.topLeft, 118 | child: Text("DARI DAREK",style: TextStyle(color:Color(0xfff35e0b)),)), 119 | ), 120 | Padding( 121 | padding: const EdgeInsets.only(bottom: 10,right: 10,left: 10), 122 | child: Text("Rencontrez des gens partout en Algérie et découverez les plus beaux endroits du pays. Avec DARI DAREK, trouvez les",style: TextStyle(fontSize: 13,color:Color(0xffd3d3d3)),), 123 | ), 124 | Expanded( 125 | child: Container( 126 | color: Colors.white, 127 | child: PageView( 128 | scrollDirection: Axis.horizontal, 129 | controller: controller, 130 | children: [ 131 | buildScrollActivities("les meilleures vacances", "assets/images/3.jpg"), 132 | buildScrollActivities("Logement familial", "assets/images/4.jpg"), 133 | buildScrollActivities("Endroits calmes", "assets/images/1.jpg"), 134 | buildScrollActivities("Les meilleures appartements", "assets/images/2.jpg"), 135 | ], 136 | ), 137 | ), 138 | ) 139 | ], 140 | ), 141 | ) 142 | ], 143 | ), 144 | ), 145 | ), 146 | ); 147 | } 148 | Padding buildScrollActivities(String text,String imgUri){ 149 | return Padding( 150 | padding: const EdgeInsets.symmetric(horizontal: 10), 151 | child: Column( 152 | children: [ 153 | Container( 154 | color: Colors.white, 155 | height: 250, 156 | width: 350, 157 | child: Image.asset(imgUri,fit: BoxFit.fill,) 158 | ), 159 | Container( 160 | width: double.infinity, 161 | color: Colors.black, 162 | child: Text(text,style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),textAlign: TextAlign.center,)), 163 | ], 164 | ), 165 | ); 166 | } 167 | } -------------------------------------------------------------------------------- /lib/Routes/homeScreen1.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | import '../Widgets/TypeProperties.dart'; 7 | void main()=>runApp( 8 | MaterialApp( 9 | debugShowCheckedModeBanner: false, 10 | home : HomeScreen1(), 11 | ) 12 | ); 13 | 14 | class HomeScreen1 extends StatefulWidget { 15 | 16 | @override 17 | _HomeScreenState createState() => _HomeScreenState(); 18 | } 19 | 20 | class _HomeScreenState extends State { 21 | int _selectedIndex = 0; 22 | int _currentTab = 0; 23 | 24 | final textStyleState = TextStyle( 25 | fontSize: 11.0, 26 | color: Colors.white 27 | ); 28 | 29 | final textStyleTop = TextStyle( 30 | fontSize: 22.0, 31 | fontWeight: FontWeight.bold, 32 | color: Colors.white 33 | ); 34 | 35 | final textStyle2 = TextStyle( 36 | color: Colors.white 37 | ); 38 | List _icons = [ 39 | FontAwesomeIcons.building, 40 | FontAwesomeIcons.home, 41 | FontAwesomeIcons.hotel, 42 | FontAwesomeIcons.desktop, 43 | // FontAwesomeIcons.chair, 44 | ]; 45 | 46 | Widget _buildIcon(int index) { 47 | return GestureDetector( 48 | onTap: () { 49 | setState(() { 50 | _selectedIndex = index; 51 | }); 52 | }, 53 | child: Container( 54 | height: 60, 55 | width: 60, 56 | decoration: BoxDecoration( 57 | color: _selectedIndex == index ? Theme 58 | .of(context) 59 | .accentColor : Color(0XFFE7EBEE), 60 | borderRadius: BorderRadius.circular(30) 61 | ), 62 | child: Icon(_icons[index], 63 | size: 25, 64 | color: _selectedIndex == index 65 | ? Colors.white // Theme.of(context).accentColor 66 | : Color(0XFFB4C1C4), 67 | ), 68 | ), 69 | ); 70 | } 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | return Scaffold( 75 | body: ListView( 76 | padding: EdgeInsets.symmetric(vertical: 30), 77 | children: [ 78 | Padding( 79 | padding: EdgeInsets.only(left: 20, right: 120), 80 | child: Text("Qu'est ce que vous cherchez ?", 81 | style: TextStyle( 82 | fontSize: 30.0, fontWeight: FontWeight.bold),) 83 | ), 84 | SizedBox(height: 20,), 85 | Row( 86 | mainAxisAlignment: MainAxisAlignment.spaceAround, 87 | children: 88 | _icons 89 | .asMap() 90 | .entries 91 | .map((MapEntry map) => _buildIcon(map.key) 92 | ) 93 | .toList(), 94 | ), 95 | SizedBox(height: 20,), 96 | TopWilaya(), 97 | // TopWilaya(), 98 | ], 99 | ) 100 | ); 101 | } 102 | 103 | /* _buildBottomCard() { 104 | return Expanded( 105 | child: Container( 106 | child: Stack( 107 | children: [ 108 | Transform.translate( 109 | offset:Offset(50,70), 110 | child: Container( 111 | decoration: BoxDecoration( 112 | color: Colors.white, 113 | borderRadius: BorderRadius.only( 114 | topLeft: Radius.circular(40.0), 115 | ) 116 | ), 117 | child: Padding( 118 | padding: EdgeInsets.all(16.0), 119 | child: Column( 120 | crossAxisAlignment: CrossAxisAlignment.start, 121 | children: [ 122 | Padding( 123 | padding: EdgeInsets.all(8), 124 | child: Text( 125 | "Mes locaux", 126 | style: TextStyle( 127 | fontWeight: FontWeight.bold, 128 | fontSize: 24.0 129 | ), 130 | ), 131 | ), 132 | SizedBox(height: 20,), 133 | Container( 134 | width: 300, 135 | height: 300, 136 | child: ListView( 137 | scrollDirection: Axis.horizontal, 138 | children: [ 139 | item(Constants.properties[0]), 140 | item(Constants.properties[1]), 141 | item(Constants.properties[2]), 142 | ], 143 | ), 144 | ) 145 | ], 146 | ) 147 | ), 148 | ), 149 | ), 150 | Align( 151 | alignment: Alignment(0.8, -0.8), 152 | child: Container( 153 | width: 50, 154 | height: 50, 155 | child: Icon(Icons.edit,color: Colors.white,), 156 | decoration: BoxDecoration( 157 | color: Colors.pink, 158 | boxShadow: [ 159 | BoxShadow( 160 | color: Colors.pink.withOpacity(0.4), 161 | spreadRadius: 1.0, 162 | blurRadius: 3.0 163 | ) 164 | ], 165 | borderRadius: BorderRadius.circular(10.0) 166 | ), 167 | ), 168 | ) 169 | ], 170 | ), 171 | ), 172 | ); 173 | }*/ 174 | item(Property p) { 175 | return Container( 176 | margin: EdgeInsets.symmetric(horizontal: 8), 177 | width: 200, 178 | decoration: BoxDecoration( 179 | borderRadius: BorderRadius.circular(40.0), 180 | color: Colors.red, 181 | image: DecorationImage( 182 | image: AssetImage(p.images[0]), fit: BoxFit.cover), 183 | ), 184 | child: Align( 185 | alignment: Alignment.bottomCenter, 186 | child: Container( 187 | height: 130, 188 | decoration: BoxDecoration( 189 | borderRadius: BorderRadius.only( 190 | topLeft: Radius.circular(40), 191 | topRight: Radius.circular(40), 192 | ), 193 | color: Colors.white, 194 | ), 195 | child: Padding(padding: EdgeInsets.all(8.0), 196 | child: Column( 197 | crossAxisAlignment: CrossAxisAlignment.stretch, 198 | children: [ 199 | Padding( 200 | padding: EdgeInsets.all(16), 201 | child: Text(p.titre, style: TextStyle( 202 | fontWeight: FontWeight.bold, 203 | ), 204 | ), 205 | ), 206 | Row( 207 | children: [ 208 | Container( 209 | margin: EdgeInsets.all(4.0), 210 | width: 25.0, 211 | height: 25.0, 212 | decoration: BoxDecoration( 213 | image: DecorationImage( 214 | image: AssetImage(p.images[1]), 215 | fit: BoxFit.cover 216 | ), 217 | borderRadius: BorderRadius.circular(5) 218 | ), 219 | ), 220 | Container( 221 | margin: EdgeInsets.all(4.0), 222 | width: 25.0, 223 | height: 25.0, 224 | decoration: BoxDecoration( 225 | image: DecorationImage( 226 | image: AssetImage(p.images[1]), 227 | fit: BoxFit.cover 228 | ), 229 | borderRadius: BorderRadius.circular(5) 230 | ), 231 | ), 232 | Container( 233 | margin: EdgeInsets.all(4.0), 234 | width: 25.0, 235 | height: 25.0, 236 | decoration: BoxDecoration( 237 | image: DecorationImage( 238 | image: AssetImage(p.images[0]), 239 | fit: BoxFit.cover 240 | ), 241 | borderRadius: BorderRadius.circular(5) 242 | ), 243 | ), 244 | Spacer(), 245 | Icon(Icons.thumb_up, size: 20, color: Colors.grey,), 246 | Text("100", style: TextStyle(color: Colors.grey),) 247 | ], 248 | ) 249 | ], 250 | ),), 251 | ), 252 | ), 253 | ); 254 | } 255 | } 256 | 257 | -------------------------------------------------------------------------------- /lib/Routes/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'HomePage.dart'; 5 | 6 | class Login extends StatefulWidget { 7 | @override 8 | _LoginState createState() => _LoginState(); 9 | } 10 | 11 | class _LoginState extends State { 12 | bool _inscription=false; 13 | BoxDecoration customDecoration () 14 | { 15 | return BoxDecoration( 16 | color: Colors.white, 17 | borderRadius: BorderRadius.circular(8), 18 | boxShadow: [ 19 | BoxShadow( 20 | offset: Offset(0,2), 21 | color: Colors.grey[300], 22 | blurRadius: 5, 23 | )], 24 | ); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | backgroundColor: Colors.white, 31 | body: SafeArea( 32 | maintainBottomViewPadding: true, 33 | child: SingleChildScrollView( 34 | child: Padding( 35 | padding: EdgeInsets.symmetric(horizontal: 15,vertical: 40), 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.center, 38 | children: [ 39 | Container( 40 | height: 130, 41 | width: 130, 42 | child: Image( 43 | image: AssetImage("assets/images/logo.png"), 44 | fit: BoxFit.scaleDown, 45 | ), 46 | ), 47 | Text("Welcome To ",style: TextStyle(fontSize: 15,fontWeight: FontWeight.w500),), 48 | SizedBox(height: 25,), 49 | Visibility( 50 | visible: _inscription, 51 | child: Container( 52 | margin: EdgeInsets.only(bottom: 20), 53 | decoration: customDecoration(), 54 | child: TextField( 55 | decoration: InputDecoration( 56 | hintText: "Nom & prénom", 57 | border: InputBorder.none, 58 | hintStyle: TextStyle(color: Colors.grey), 59 | prefixIcon: Icon(Icons.person_outline,color: Constants.greenAirbnb,) 60 | ), 61 | ), 62 | ), 63 | ), 64 | Visibility( 65 | visible: _inscription, 66 | child: Container( 67 | margin: EdgeInsets.only(bottom: 20), 68 | decoration: customDecoration(), 69 | child: TextField( 70 | decoration: InputDecoration( 71 | hintText: "Téléphone", 72 | border: InputBorder.none, 73 | hintStyle: TextStyle(color: Colors.grey), 74 | prefixIcon: Icon(Icons.smartphone,color: Constants.greenAirbnb,) 75 | ), 76 | ), 77 | ), 78 | ), 79 | Container( 80 | margin: EdgeInsets.only(bottom: 20), 81 | decoration: customDecoration(), 82 | child: TextField( 83 | decoration: InputDecoration( 84 | hintText: "Email", 85 | border: InputBorder.none, 86 | hintStyle: TextStyle(color: Colors.grey), 87 | prefixIcon: Icon(Icons.mail_outline,color: Constants.greenAirbnb,), 88 | ), 89 | ), 90 | ), 91 | Container( 92 | margin: EdgeInsets.only(bottom: 10), 93 | decoration: customDecoration(), 94 | child: TextField( 95 | obscureText: true, 96 | decoration: InputDecoration( 97 | hintText: "Password", 98 | border: InputBorder.none, 99 | hintStyle: TextStyle(color: Colors.grey), 100 | prefixIcon: Icon(Icons.lock_outline,color: Constants.greenAirbnb,) 101 | ), 102 | ), 103 | ), 104 | Visibility( 105 | visible: !_inscription, 106 | child: Padding( 107 | padding: const EdgeInsets.only(bottom:30), 108 | child: Align( 109 | alignment: Alignment.centerRight, 110 | child: Text("Forgot password ?",style: TextStyle(color: Constants.greenAirbnb,fontSize: 12),)), 111 | ), 112 | ), 113 | SizedBox(height:_inscription? 30:0 ,), 114 | InkWell( 115 | borderRadius: BorderRadius.circular(20), 116 | onTap: () { 117 | setState(() { 118 | if(!_inscription) 119 | Navigator.push( 120 | context, 121 | MaterialPageRoute(builder: (context) => HomePage()), 122 | ); 123 | else 124 | Navigator.push( 125 | context, 126 | MaterialPageRoute(builder: (context) => HomePage()), 127 | ); 128 | }); 129 | }, 130 | splashColor: Colors.white, 131 | hoverColor: Constants.greenAirbnb, 132 | child: Container( 133 | margin: EdgeInsets.symmetric(horizontal: 20), 134 | height: 50, 135 | width: MediaQuery.of(context).size.width, 136 | decoration: BoxDecoration( 137 | color: Constants.greenAirbnb, 138 | borderRadius: BorderRadius.circular(8), 139 | boxShadow: [ 140 | BoxShadow( 141 | offset: Offset(0,2), 142 | color: Colors.grey, 143 | blurRadius: 5, 144 | )], 145 | ), 146 | child: Center(child: Text(!_inscription?"Continue":"Login",style: TextStyle(fontWeight: FontWeight.w600,color: Colors.white),)), 147 | ), 148 | ), 149 | InkWell( 150 | onTap: () { 151 | setState(() { 152 | _inscription=!_inscription; 153 | }); 154 | }, 155 | child: Align( 156 | alignment: Alignment.center, 157 | child: Padding( 158 | padding: EdgeInsets.all(20), 159 | child: InkWell( 160 | child: RichText( 161 | text: TextSpan( 162 | text: _inscription?"Do you have an account ? ":"New User ?", 163 | style: TextStyle(color: Colors.grey[500], fontSize: 14,fontWeight: FontWeight.w500), 164 | children: [ 165 | TextSpan( 166 | text:_inscription?"Sign in":" Create an account", 167 | style: TextStyle(color: Constants.greenAirbnb,fontWeight: FontWeight.w600, fontSize: 14),) 168 | ]), 169 | ), 170 | ), 171 | ), 172 | ), 173 | ), 174 | SizedBox(height: 20,), 175 | Text("Or continue with " ,style: TextStyle(color: Colors.grey[500], fontSize: 14,fontWeight: FontWeight.w500),), 176 | SizedBox(height: 15,), 177 | Row( 178 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 179 | children: [ 180 | ContinueWith("assets/images/social_media/google.png"), 181 | ContinueWith("assets/images/social_media/phone.png"), 182 | ], 183 | ) 184 | ], 185 | ), 186 | ), 187 | ), 188 | ), 189 | ); 190 | 191 | 192 | } 193 | 194 | Container ContinueWith(String image) { 195 | return Container( 196 | padding: EdgeInsets.all(15), 197 | height: 50, 198 | decoration: BoxDecoration( 199 | shape: BoxShape.circle, 200 | color: Colors.white, 201 | boxShadow: [ 202 | BoxShadow( 203 | offset: Offset(0,3), 204 | color: Colors.grey, 205 | blurRadius: 5 206 | ) 207 | ] 208 | 209 | ), 210 | child: Image.asset(image,), 211 | ); 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /lib/Widgets/CircleCheckBox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CircleCheckBox extends StatefulWidget { 5 | String _text; 6 | bool _value; 7 | 8 | CircleCheckBox(this._text, this._value); 9 | 10 | @override 11 | _CircleCheckBoxState createState() => _CircleCheckBoxState(); 12 | } 13 | 14 | class _CircleCheckBoxState extends State { 15 | 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | body: Row( 21 | children: [ 22 | Text(widget._text), 23 | Container( 24 | decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.blue), 25 | child: Padding( 26 | padding: const EdgeInsets.all(10.0), 27 | child: widget._value 28 | ? Icon( 29 | Icons.check, 30 | size: 30.0, 31 | color: Colors.white, 32 | ) 33 | : Icon( 34 | Icons.check_box_outline_blank, 35 | size: 30.0, 36 | color: Colors.blue, 37 | ), 38 | ), 39 | ), 40 | ], 41 | ) , 42 | ); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /lib/Widgets/ImageView.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Property.dart'; 3 | import 'package:airbnb_clone/Routes/Payer.dart'; 4 | import 'package:airbnb_clone/Routes/Property-details.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_slider_indicator/flutter_slider_indicator.dart'; 7 | 8 | class ImageProperty extends StatefulWidget { 9 | bool _liked; 10 | Property property; 11 | int _currentIndex=0; 12 | 13 | ImageProperty(this._liked, this.property); 14 | 15 | @override 16 | _ImagePropertyState createState() => _ImagePropertyState(); 17 | } 18 | 19 | class _ImagePropertyState extends State { 20 | 21 | 22 | 23 | Container buildImageSlider(BuildContext context,PageController p,int index,Property property) { 24 | return Container( 25 | // margin: EdgeInsets.all(20), 26 | child: PageView.builder( 27 | controller: p..addListener(() { 28 | setState(() { 29 | index=p.page.round(); 30 | widget._currentIndex=p.page.round(); 31 | }); 32 | }), 33 | itemCount: property.images.length, 34 | itemBuilder: ( 35 | context,index){ 36 | return ClipRRect( 37 | child:Image.asset(property.images[index],fit: BoxFit.cover,)); 38 | } 39 | ) 40 | ); 41 | } 42 | 43 | Align buildWidgetImageIndicator(BuildContext context,Property property, int currentindex) { 44 | return Align( 45 | alignment: Alignment.bottomCenter, 46 | child: Padding( 47 | padding: EdgeInsets.all(10.0), 48 | child: SliderIndicator( 49 | length: property.images.length, 50 | activeIndex: currentindex, 51 | indicator:Padding( padding:EdgeInsets.all(3),child:Icon(Icons.fiber_manual_record,color: Colors.white70,size: 10,)), 52 | activeIndicator: Padding(padding:EdgeInsets.all(3),child:Icon(Icons.fiber_manual_record,color: Colors.white,size: 14,),) 53 | ), 54 | ), 55 | ); 56 | } 57 | 58 | buildHeartWidget(BuildContext context) { 59 | 60 | return Container( 61 | margin: EdgeInsets.all(10), 62 | alignment: Alignment.topRight, 63 | child:GestureDetector( 64 | child:Container( 65 | padding: EdgeInsets.all(5), 66 | decoration: BoxDecoration( 67 | color: Colors.white, 68 | shape: BoxShape.circle, 69 | // borderRadius: BorderRadius.circular(25) 70 | ), 71 | child: Icon(!widget._liked?Icons.favorite_border:Icons.favorite,color:!widget._liked? Colors.black:Constants.redAirbnb,size: 25,), 72 | ), 73 | onTap: (){ 74 | setState(() { 75 | widget._liked=!widget._liked; 76 | }); 77 | }, 78 | ) 79 | ); 80 | } 81 | 82 | 83 | @override 84 | Widget build(BuildContext context) { 85 | return Padding( 86 | padding: EdgeInsets.only(bottom: 5), 87 | child: InkWell( 88 | onTap: (){ 89 | Navigator.push( 90 | context, 91 | MaterialPageRoute(builder: (context) => PropertyDetails(widget.property)), 92 | ); 93 | }, 94 | child:Column( 95 | children: [ 96 | Container( 97 | margin: EdgeInsets.fromLTRB(0,0,0,15), 98 | decoration: BoxDecoration( 99 | borderRadius: BorderRadius.circular(3), 100 | 101 | ), 102 | height: 200, 103 | child: Stack( 104 | children: [ 105 | buildImageSlider(context,PageController(),widget._currentIndex,widget.property), 106 | buildWidgetImageIndicator(context,Constants.properties[1],widget._currentIndex), 107 | buildHeartWidget(context), 108 | ], 109 | ), 110 | ), 111 | Padding( 112 | padding: const EdgeInsets.fromLTRB( 35,0,35, 20), 113 | child: Row( 114 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 115 | children: [ 116 | Column( 117 | children: [ 118 | Align( 119 | alignment: Alignment.topLeft, 120 | child: Text(widget.property.titre,style: TextStyle(color: Colors.black87,fontSize: 15,fontWeight: FontWeight.w400),), 121 | ), 122 | Align( 123 | alignment: Alignment.topLeft, 124 | child: Text(widget.property.address.wilaya,style: TextStyle(color: Colors.black87,fontSize: 18,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 125 | ), 126 | Align( 127 | alignment: Alignment.topLeft, 128 | child: Text(widget.property.titre,style: TextStyle(color: Colors.black87,fontSize: 18,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 129 | ), 130 | Align( 131 | alignment: Alignment.topLeft, 132 | child: Text("${widget.property.prix} DZD/nuit",style: TextStyle(color: Colors.black54,fontSize: 13,fontWeight: FontWeight.w400),), 133 | ), 134 | Row( 135 | children: [ 136 | Icon(Icons.star,color: Constants.greenAirbnb,size: 12,), 137 | Align( 138 | alignment: Alignment.topLeft, 139 | child: Text("${widget.property.raiting}",style: TextStyle(color: Colors.black87,fontSize: 13,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 140 | ) , 141 | Align( 142 | alignment: Alignment.topLeft, 143 | child: Text("(25)",style: TextStyle(color: Colors.black54,fontSize: 13,fontWeight: FontWeight.w400),overflow: TextOverflow.ellipsis,), 144 | ) , 145 | ], 146 | ), 147 | ], 148 | ), 149 | Container( 150 | padding: EdgeInsets.symmetric(horizontal: 15,vertical: 10), 151 | decoration: BoxDecoration( 152 | borderRadius: BorderRadius.circular(20), 153 | color: Constants.greenAirbnb 154 | ), 155 | child: InkWell( 156 | child: Text("Book now",style: TextStyle(color: Colors.white),), 157 | onTap: (){ 158 | Navigator.push( 159 | context, 160 | MaterialPageRoute(builder: (context) => Payer()), 161 | ); 162 | }, 163 | ), 164 | ) 165 | ], 166 | ), 167 | ), 168 | 169 | 170 | ], 171 | ), ), 172 | ); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /lib/Widgets/ImageView.dart.dart: -------------------------------------------------------------------------------- 1 | // TODO Implement this library. -------------------------------------------------------------------------------- /lib/Widgets/ItemDropDownButtonCategory.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | class ItemDropDownButtonCategory{ 4 | final String label; 5 | final Icon icon; 6 | 7 | ItemDropDownButtonCategory(this.label,this.icon); 8 | static List list =[ 9 | ItemDropDownButtonCategory("Appartement",Icon( FontAwesomeIcons.building,)), 10 | ItemDropDownButtonCategory("Hotel",Icon( FontAwesomeIcons.hotel,)), 11 | ItemDropDownButtonCategory("Villa",Icon( FontAwesomeIcons.home,)), 12 | ItemDropDownButtonCategory("Bureau",Icon( FontAwesomeIcons.chair,)), 13 | ]; 14 | } -------------------------------------------------------------------------------- /lib/Widgets/TypeProperties.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Constants/Constants.dart'; 2 | import 'package:airbnb_clone/Model/Wilaya.dart'; 3 | import 'package:airbnb_clone/Routes/Profile.dart'; 4 | import 'package:airbnb_clone/Routes/Properties1.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 8 | 9 | class TopWilaya extends StatelessWidget { 10 | 11 | 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Column( 16 | children: [ 17 | Padding( 18 | padding: EdgeInsets.symmetric(horizontal: 20), 19 | child:Row( 20 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 21 | children: [ 22 | Text("Top Wilayas",style: TextStyle(fontSize: 22, 23 | fontWeight: FontWeight.bold, 24 | letterSpacing: 1.5), 25 | ), 26 | GestureDetector( 27 | onTap: ()=> { 28 | Navigator.push(context, MaterialPageRoute(builder: (_) => Profile())) 29 | }, 30 | child :Text("tout voir", 31 | style: TextStyle( 32 | color: Theme.of(context).primaryColor, 33 | fontSize: 16, 34 | fontWeight: FontWeight.w600, 35 | letterSpacing: 1.0), 36 | ) 37 | ) 38 | ], 39 | ) 40 | 41 | 42 | ), 43 | Container( 44 | height: 300, 45 | child: ListView.builder(itemCount: Constants.properties.length, 46 | scrollDirection: Axis.horizontal, 47 | itemBuilder: (BuildContext context,int index){ 48 | Wilaya wilaya =Constants.wilayas[index]; 49 | 50 | return GestureDetector( 51 | onTap: ()=> { 52 | Navigator.push(context, MaterialPageRoute(builder: (_) => Properties(wilaya: wilaya))) 53 | }, 54 | child: Container( 55 | width: 210, 56 | margin: EdgeInsets.all(10), 57 | child: Stack( 58 | alignment: Alignment.topCenter, 59 | children: [ 60 | Positioned( 61 | bottom: 15.0, 62 | child:Container( 63 | height: 120, 64 | width: 200, 65 | decoration: BoxDecoration( 66 | color: Colors.white, 67 | borderRadius: BorderRadius.circular(10) 68 | ), 69 | child: Padding( 70 | padding: EdgeInsets.all(10), 71 | child:Column( 72 | crossAxisAlignment: CrossAxisAlignment.start , 73 | mainAxisAlignment: MainAxisAlignment.end, 74 | children: [ 75 | Text("15 properties",style: TextStyle(fontSize: 22,fontWeight: FontWeight.w600,letterSpacing: 1.2),), 76 | Text(wilaya.descreption,style: TextStyle(color: Colors.grey),) 77 | ], 78 | ), 79 | ) 80 | ) , 81 | ) 82 | , 83 | Container( 84 | decoration: BoxDecoration( 85 | color: Colors.white, 86 | borderRadius: BorderRadius.circular(20), 87 | boxShadow: [BoxShadow( 88 | color: Colors.black26, 89 | offset:Offset(0.0,3.0), 90 | blurRadius: 6 91 | )] 92 | ), 93 | child: Stack( 94 | children: [ 95 | Hero( 96 | tag: wilaya.image, 97 | child: ClipRRect( 98 | borderRadius: BorderRadius.circular(20), 99 | child:Image( 100 | height: 180, 101 | width: 180, 102 | image: AssetImage(wilaya.image), 103 | fit: BoxFit.cover, 104 | ) , 105 | ), 106 | ), 107 | 108 | Positioned( 109 | left: 10, 110 | bottom: 10, 111 | child:Column( 112 | crossAxisAlignment: CrossAxisAlignment.start , 113 | children: [ 114 | Text("${wilaya.label}",style: TextStyle( 115 | fontSize: 26, 116 | fontWeight: FontWeight.w600, 117 | color: Colors.white, 118 | letterSpacing: 1.2 119 | ),), 120 | Row( 121 | children: [ 122 | Icon( 123 | FontAwesomeIcons.idBadge,size: 10.0,color: Colors.white, 124 | ), 125 | SizedBox(width:8,), 126 | Text("${wilaya.matricule}",style: TextStyle( 127 | color: Colors.white, 128 | ),) 129 | ], 130 | ) 131 | ], 132 | ) , 133 | ) 134 | ], 135 | ), 136 | ) 137 | ], 138 | ), 139 | ), 140 | ); 141 | }, 142 | ), 143 | ) 144 | ], 145 | ); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /lib/Widgets/commentsWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class commentsWidget extends StatefulWidget { 3 | @override 4 | _commentsWidgetState createState() => _commentsWidgetState(); 5 | } 6 | 7 | class _commentsWidgetState extends State { 8 | int _maxlines=3; 9 | String comment; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Padding( 14 | padding: EdgeInsets.fromLTRB(25,0,25,10), 15 | child: Column( 16 | children: [ 17 | Align( 18 | alignment: Alignment.topLeft, 19 | child: Text("Excellent plan. En plein centre ville, belle maison entierement équipé.\nCadre exceptionnel en plein coeur d'Alger. \nKader était au petit soin",style: TextStyle(color: Colors.black,fontSize: 15.5,letterSpacing: 0.2),overflow: TextOverflow.ellipsis,maxLines: _maxlines,), 20 | ), 21 | Align( 22 | alignment: Alignment.topLeft, 23 | child: InkWell( 24 | child: Text(_maxlines<=3?"Afficher plus":"Afficher moins",style: TextStyle(decoration: TextDecoration.underline,fontWeight: FontWeight.w500)), 25 | onTap: (){ 26 | setState(() { 27 | if(_maxlines==3) 28 | _maxlines=35; 29 | else 30 | _maxlines=3; 31 | }); 32 | }, 33 | ), 34 | ), 35 | ], 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/Widgets/custom_slider_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:airbnb_clone/Model/Property.dart'; 2 | import 'package:airbnb_clone/Routes/BookingScreen.dart'; 3 | import 'package:airbnb_clone/Routes/Profile.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:shimmer/shimmer.dart'; 6 | class CustomSliderWidget extends StatefulWidget { 7 | CustomSliderWidget(); 8 | @override 9 | _CustomSliderWidgetState createState() => _CustomSliderWidgetState(); 10 | 11 | } 12 | 13 | class _CustomSliderWidgetState extends State{ 14 | var _maxWidth=0.0; 15 | var _width=0.0; 16 | var _value =0.0; 17 | var _booked =false; 18 | @override 19 | Widget build(BuildContext context) { 20 | return LayoutBuilder( 21 | builder: (context,constraint){ 22 | _maxWidth=constraint.maxWidth; 23 | return Container( 24 | decoration: BoxDecoration( 25 | color: _booked ? Color(0xff3366cc) : Color(0xff39ca30), 26 | borderRadius: BorderRadius.all(Radius.circular(50)), 27 | border: Border.all( 28 | color: _booked ? Color(0xff3366cc): Color(0xff39ca30),width: 3, 29 | ) 30 | ), 31 | height: 60, 32 | child: Stack( 33 | children: [ 34 | Center( 35 | child:Shimmer( 36 | gradient: LinearGradient( 37 | colors:[ 38 | Colors.black87, 39 | Colors.white60, 40 | 41 | ], 42 | begin: Alignment.centerLeft, 43 | end: Alignment.centerRight 44 | ), 45 | child: Text( 46 | _booked ? " réservé ": "Glisser pour réserver",style: TextStyle(fontSize: 20),), 47 | )), 48 | AnimatedContainer( 49 | 50 | duration: Duration(milliseconds: 100,), 51 | width: _width<= 55 ? 55 :_width, 52 | child: Row( 53 | children: [ 54 | Expanded( 55 | child: SizedBox(), 56 | ), 57 | GestureDetector( 58 | onVerticalDragUpdate: _onDrag , 59 | onVerticalDragEnd: _onDragEnd, 60 | child: Container( 61 | width: 55, 62 | height: 55, 63 | decoration: BoxDecoration( 64 | color: Colors.white, 65 | borderRadius: BorderRadius.all(Radius.circular(50)), 66 | ), 67 | child: Icon(Icons.keyboard_arrow_right, 68 | color: Colors.grey,), 69 | ), 70 | ) 71 | ], 72 | ), 73 | ) 74 | ], 75 | ), 76 | ); 77 | } 78 | ); 79 | } 80 | 81 | void _onDragEnd(DragEndDetails details) { 82 | setState(() { 83 | if(_value>.9 ){ 84 | _value = 1; 85 | Navigator.push(context, MaterialPageRoute(builder: (context) => Profile()),); 86 | } 87 | else { 88 | _value = 0; 89 | } 90 | setState(() { 91 | _width = _maxWidth * _value ; 92 | _booked = _value>.9; 93 | }); 94 | }); 95 | } 96 | 97 | void _onDrag(DragUpdateDetails details) { 98 | setState(() { 99 | _value = (details.globalPosition.dx) /_maxWidth; 100 | _width = _maxWidth * _value ; 101 | }); 102 | } 103 | } 104 | 105 | -------------------------------------------------------------------------------- /lib/flutter_counter.dart: -------------------------------------------------------------------------------- 1 | library counter; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/rendering.dart'; 5 | typedef void CounterChangeCallback(num value); 6 | class Counter extends StatelessWidget { 7 | final CounterChangeCallback onChanged; 8 | Counter({ 9 | Key key, 10 | @required num initialValue, 11 | @required this.minValue, 12 | @required this.maxValue, 13 | @required this.onChanged, 14 | @required this.decimalPlaces, 15 | this.color, 16 | this.textStyle, 17 | this.step = 1, 18 | this.buttonSize = 25, 19 | }) : assert(initialValue != null), 20 | assert(minValue != null), 21 | assert(maxValue != null), 22 | assert(maxValue > minValue), 23 | assert(initialValue >= minValue && initialValue <= maxValue), 24 | assert(step > 0), 25 | selectedValue = initialValue, 26 | super(key: key); 27 | ///min value user can pick 28 | final num minValue; 29 | ///max value user can pick 30 | final num maxValue; 31 | /// decimal places required by the counter 32 | final int decimalPlaces; 33 | ///Currently selected integer value 34 | num selectedValue; 35 | /// if min=0, max=5, step=3, then items will be 0 and 3. 36 | final num step; 37 | /// indicates the color of fab used for increment and decrement 38 | Color color; 39 | /// text syle 40 | TextStyle textStyle; 41 | final double buttonSize; 42 | void _incrementCounter() { 43 | if (selectedValue + step <= maxValue) { 44 | onChanged((selectedValue + step)); 45 | } 46 | } 47 | void _decrementCounter() { 48 | if (selectedValue - step >= minValue) { 49 | onChanged((selectedValue - step)); 50 | } 51 | } 52 | @override 53 | Widget build(BuildContext context) { 54 | final ThemeData themeData = Theme.of(context); 55 | color = color ?? themeData.accentColor; 56 | textStyle = textStyle ?? new TextStyle( 57 | fontSize: 20.0, 58 | ); 59 | return new Container( 60 | padding: new EdgeInsets.all(4.0), 61 | child: new Row( 62 | crossAxisAlignment: CrossAxisAlignment.center, 63 | mainAxisSize: MainAxisSize.min, 64 | children: [ 65 | new SizedBox( 66 | width: buttonSize, 67 | height: buttonSize, 68 | child: FloatingActionButton( 69 | heroTag: null, 70 | onPressed: _decrementCounter, 71 | elevation: 2, 72 | tooltip: 'Decrement', 73 | child: Icon(Icons.remove), 74 | backgroundColor: color, 75 | ), 76 | ), 77 | new Container( 78 | padding: EdgeInsets.all(4.0), 79 | child: new Text( 80 | '${num.parse((selectedValue).toStringAsFixed(decimalPlaces))}', 81 | style: textStyle 82 | ), 83 | ), 84 | new SizedBox( 85 | width: buttonSize, 86 | height: buttonSize, 87 | child: FloatingActionButton( 88 | heroTag: null, 89 | onPressed: _incrementCounter, 90 | elevation: 2, 91 | tooltip: 'Increment', 92 | child: Icon(Icons.add), 93 | backgroundColor: color, 94 | ), 95 | ), 96 | ], 97 | ), 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /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.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.2" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.0" 32 | characters: 33 | dependency: transitive 34 | description: 35 | name: characters 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.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.3" 46 | clock: 47 | dependency: transitive 48 | description: 49 | name: clock 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.1" 53 | collection: 54 | dependency: transitive 55 | description: 56 | name: collection 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.14.13" 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.5" 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 | date_range_picker: 82 | dependency: "direct dev" 83 | description: 84 | name: date_range_picker 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.0.6" 88 | fake_async: 89 | dependency: transitive 90 | description: 91 | name: fake_async 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.1.0" 95 | flutter: 96 | dependency: "direct main" 97 | description: flutter 98 | source: sdk 99 | version: "0.0.0" 100 | flutter_date_pickers: 101 | dependency: "direct dev" 102 | description: 103 | name: flutter_date_pickers 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "0.1.7" 107 | flutter_launcher_icons: 108 | dependency: "direct dev" 109 | description: 110 | name: flutter_launcher_icons 111 | url: "https://pub.dartlang.org" 112 | source: hosted 113 | version: "0.7.5" 114 | flutter_localizations: 115 | dependency: "direct dev" 116 | description: flutter 117 | source: sdk 118 | version: "0.0.0" 119 | flutter_plugin_android_lifecycle: 120 | dependency: transitive 121 | description: 122 | name: flutter_plugin_android_lifecycle 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.0.11" 126 | flutter_rounded_date_picker: 127 | dependency: "direct dev" 128 | description: 129 | name: flutter_rounded_date_picker 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.0.0" 133 | flutter_slider_indicator: 134 | dependency: "direct dev" 135 | description: 136 | name: flutter_slider_indicator 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.2.0" 140 | flutter_test: 141 | dependency: "direct dev" 142 | description: flutter 143 | source: sdk 144 | version: "0.0.0" 145 | font_awesome_flutter: 146 | dependency: "direct dev" 147 | description: 148 | name: font_awesome_flutter 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "8.10.0" 152 | google_maps_flutter: 153 | dependency: "direct dev" 154 | description: 155 | name: google_maps_flutter 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.5.33" 159 | google_maps_flutter_platform_interface: 160 | dependency: transitive 161 | description: 162 | name: google_maps_flutter_platform_interface 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.0.4" 166 | image: 167 | dependency: transitive 168 | description: 169 | name: image 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.1.18" 173 | intl: 174 | dependency: transitive 175 | description: 176 | name: intl 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.16.1" 180 | matcher: 181 | dependency: transitive 182 | description: 183 | name: matcher 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.12.8" 187 | meta: 188 | dependency: transitive 189 | description: 190 | name: meta 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.8" 194 | path: 195 | dependency: transitive 196 | description: 197 | name: path 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.7.0" 201 | petitparser: 202 | dependency: transitive 203 | description: 204 | name: petitparser 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "3.0.4" 208 | plugin_platform_interface: 209 | dependency: transitive 210 | description: 211 | name: plugin_platform_interface 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.0.3" 215 | shimmer: 216 | dependency: "direct dev" 217 | description: 218 | name: shimmer 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.1.2" 222 | simple_animations: 223 | dependency: "direct dev" 224 | description: 225 | name: simple_animations 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.3.12" 229 | sky_engine: 230 | dependency: transitive 231 | description: flutter 232 | source: sdk 233 | version: "0.0.99" 234 | source_span: 235 | dependency: transitive 236 | description: 237 | name: source_span 238 | url: "https://pub.dartlang.org" 239 | source: hosted 240 | version: "1.7.0" 241 | stack_trace: 242 | dependency: transitive 243 | description: 244 | name: stack_trace 245 | url: "https://pub.dartlang.org" 246 | source: hosted 247 | version: "1.9.5" 248 | stream_channel: 249 | dependency: transitive 250 | description: 251 | name: stream_channel 252 | url: "https://pub.dartlang.org" 253 | source: hosted 254 | version: "2.0.0" 255 | stream_transform: 256 | dependency: transitive 257 | description: 258 | name: stream_transform 259 | url: "https://pub.dartlang.org" 260 | source: hosted 261 | version: "1.2.0" 262 | string_scanner: 263 | dependency: transitive 264 | description: 265 | name: string_scanner 266 | url: "https://pub.dartlang.org" 267 | source: hosted 268 | version: "1.0.5" 269 | term_glyph: 270 | dependency: transitive 271 | description: 272 | name: term_glyph 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "1.1.0" 276 | test_api: 277 | dependency: transitive 278 | description: 279 | name: test_api 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "0.2.17" 283 | typed_data: 284 | dependency: transitive 285 | description: 286 | name: typed_data 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.2.0" 290 | vector_math: 291 | dependency: transitive 292 | description: 293 | name: vector_math 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "2.0.8" 297 | xml: 298 | dependency: transitive 299 | description: 300 | name: xml 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "4.5.1" 304 | yaml: 305 | dependency: transitive 306 | description: 307 | name: yaml 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "2.2.1" 311 | sdks: 312 | dart: ">=2.9.0-14.0.dev <3.0.0" 313 | flutter: ">=1.16.3 <2.0.0" 314 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: airbnb_clone 2 | description: air bnb clone 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | 32 | dev_dependencies: 33 | flutter_test: 34 | sdk: flutter 35 | simple_animations: ^1.3.3 36 | flutter_localizations: 37 | sdk: flutter 38 | flutter_rounded_date_picker: 1.0.0 39 | font_awesome_flutter: ^8.8.1 40 | #carousel_slider: ^2.2.1 41 | flutter_slider_indicator: ^0.2.0 42 | shimmer: ^1.1.1 43 | google_maps_flutter: ^0.5.28+1 44 | # syncfusion_flutter_datepicker: ^18.2.46-beta 45 | flutter_date_pickers: ^0.1.4 46 | date_range_picker: ^1.0.5 47 | flutter_launcher_icons: ^0.7.2 48 | 49 | 50 | # For information on the generic Dart part of this file, see the 51 | # following page: https://dart.dev/tools/pub/pubspec 52 | 53 | # The following section is specific to Flutter. 54 | flutter: 55 | 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | 61 | # To add assets to your application, add an assets section, like this: 62 | assets: 63 | - assets/images/ 64 | - assets/images/properties/ 65 | - assets/images/social_media/ 66 | - assets/images/Illustrations/ 67 | - assets/ 68 | # An image asset can refer to one or more resolution-specific "variants", see 69 | # https://flutter.dev/assets-and-images/#resolution-aware. 70 | 71 | # For details regarding adding assets from package dependencies, see 72 | # https://flutter.dev/assets-and-images/#from-packages 73 | 74 | # To add custom fonts to your application, add a fonts section here, 75 | # in this "flutter" section. Each entry in this list should have a 76 | # "family" key with the font family name, and a "fonts" key with a 77 | # list giving the asset and other descriptors for the font. For 78 | # example: 79 | fonts: 80 | - family: Poppins 81 | fonts: 82 | - asset: assets/fonts/Poppins-ExtraLight.ttf 83 | - asset: assets/fonts/Poppins-Light.ttf 84 | - asset: assets/fonts/Poppins-Medium.ttf 85 | - asset: assets/fonts/Poppins-Regular.ttf 86 | # - family: Trajan Pro 87 | # fonts: 88 | # - asset: fonts/TrajanPro.ttf 89 | # - asset: fonts/TrajanPro_Bold.ttf 90 | # weight: 700 91 | # 92 | # For details regarding fonts from package dependencies, 93 | # see https://flutter.dev/custom-fonts/#from-packages 94 | flutter_icons: 95 | android: true 96 | ios: true 97 | image_path: "assets/images/logo1.png" 98 | -------------------------------------------------------------------------------- /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:airbnb_clone/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(MaterialApp()); 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 | --------------------------------------------------------------------------------