├── .gitignore ├── .metadata ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutterchallenges │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── facebook_redesign │ ├── add_story.svg │ ├── banner.png │ ├── bookmark.svg │ ├── camera.svg │ ├── clock.svg │ ├── comment.svg │ ├── covid_campaign.png │ ├── dark_mode.svg │ ├── facebook_logo.svg │ ├── friend_1.png │ ├── games.svg │ ├── globe.svg │ ├── heart.svg │ ├── help.svg │ ├── history.svg │ ├── history_saved.png │ ├── home.svg │ ├── information.svg │ ├── ios_arrow_back.svg │ ├── like.svg │ ├── like_circle.svg │ ├── loved_circle.svg │ ├── market.svg │ ├── messenger.svg │ ├── more_options.svg │ ├── more_options_bottom_bar.svg │ ├── notifications.svg │ ├── play.svg │ ├── post_1.png │ ├── profile.svg │ ├── search.svg │ ├── search_circle.svg │ ├── settings.svg │ ├── share.svg │ ├── shopping-bag.svg │ ├── shopping_cart.svg │ ├── smile.svg │ ├── star.svg │ ├── stories_1.png │ ├── stories_2.png │ ├── stories_3.png │ ├── stories_4.png │ ├── stories_5.png │ ├── stories_6.png │ ├── video.svg │ ├── view.svg │ └── youtube.svg ├── space_concept │ ├── arrow_back.svg │ ├── close.svg │ ├── earth_planet_with_shadow.png │ ├── earth_planet_with_shadow_clip.png │ ├── explore_icon.svg │ ├── explore_screen_background.png │ ├── left_arrow.svg │ ├── menu.svg │ ├── onboarding.svg │ ├── planet_icon.svg │ ├── planet_screen_background.png │ ├── planet_with_shadow.png │ ├── profile_icon.svg │ ├── right_arrow.svg │ ├── search.svg │ └── space_exploration_planet.png └── travel_app │ ├── arrow_left.svg │ ├── avatar.jpg │ ├── card_central.png │ ├── card_left.png │ ├── card_right.png │ ├── crown_5.png │ ├── explore.svg │ ├── filter.svg │ ├── heart.svg │ ├── italy.png │ ├── location.svg │ ├── motel.png │ ├── profile.svg │ ├── search.svg │ ├── show_eye.svg │ ├── show_eye_shadow.svg │ ├── star.svg │ └── west_asia.png ├── fonts ├── hybi11_amigo │ ├── Hybi11-Amigo-Bold.ttf │ ├── Hybi11-Amigo-Light.ttf │ ├── Hybi11-Amigo-Regular.ttf │ └── Hybi11-Amigo-SemiBold.ttf ├── mark │ ├── Mark-Bold.otf │ ├── Mark-Light.otf │ ├── Mark-Medium.otf │ ├── Mark-Regular.otf │ └── Mark-Thin.otf ├── sf_pro_display │ ├── SF-Pro-Display-Bold.otf │ ├── SF-Pro-Display-Light.otf │ ├── SF-Pro-Display-Medium.otf │ ├── SF-Pro-Display-Regular.otf │ └── SF-Pro-Display-Semibold.otf └── sf_pro_text │ ├── SF-Pro-Text-Bold.otf │ ├── SF-Pro-Text-Light.otf │ ├── SF-Pro-Text-Medium.otf │ ├── SF-Pro-Text-Regular.otf │ └── SF-Pro-Text-Semibold.otf ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── global_widgets │ └── action_button.dart ├── main.dart ├── modules │ ├── facebook_redesign │ │ ├── blocs │ │ │ ├── bottom_navigation_bloc.dart │ │ │ └── theme_bloc.dart │ │ ├── facebook_principal_screen.dart │ │ ├── friends_page.dart │ │ ├── home_page.dart │ │ ├── options_page.dart │ │ ├── profile_page.dart │ │ └── widgets │ │ │ ├── avatar_profile.dart │ │ │ ├── bottom_bar_app.dart │ │ │ └── top_bar_app.dart │ ├── hidden_drawer_bottom_bar_fab │ │ ├── hidden_drawer_bottom_bar_fab_screen.dart │ │ └── widgets │ │ │ ├── bottom_app_bar.dart │ │ │ └── multiple_fab.dart │ ├── home_screen.dart │ ├── space_concept │ │ ├── space_concept_explore_planet_screen.dart │ │ ├── space_concept_intro_screen.dart │ │ ├── space_concept_onboarding_screen.dart │ │ ├── space_concept_principal_screen.dart │ │ └── widgets │ │ │ ├── bottom_bar.dart │ │ │ ├── pick_to_option.dart │ │ │ └── top_bar.dart │ └── travel_app │ │ ├── country.dart │ │ ├── travel_app_bloc.dart │ │ ├── travel_country_details_screen.dart │ │ └── travel_home_screen.dart ├── navigation │ └── routes.dart └── theme │ ├── app_theme.dart │ └── pallete_color.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 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /.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: bbfbf1770cca2da7c82e887e4e4af910034800b6 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll": true, 4 | "source.organizeImports": true 5 | }, 6 | "files.defaultLanguage": "dart", 7 | "editor.formatOnSave": true 8 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Guillermo Jeremy De La Cruz Onton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Challenges 2 | 3 | | Hidden menu/Bottom bar/Multi FAB | **Space Concept** - [***Design***](https://dribbble.com/shots/14287361-SPACE-APP-CONCEPT) | 4 | |:------------:|:-------------:| 5 | | | | 6 | | Facebook Redesign Light - [***Design***](https://dribbble.com/shots/15479224-Facebook-Redesign-Concept) | Facebook Redesign Dark - [**Design**](https://dribbble.com/shots/15479224-Facebook-Redesign-Concept)| 7 | | | | 8 | | Travel App - [**Design**](https://www.figma.com/community/file/941774708392456817) | 9 | | | 10 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | 3 | linter: 4 | rules: 5 | public_member_api_docs: false -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 32 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.flutterchallenges" 42 | minSdkVersion 20 43 | targetSdkVersion 32 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 20 | 24 | 28 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutterchallenges/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutterchallenges 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: 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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/facebook_redesign/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/banner.png -------------------------------------------------------------------------------- /assets/facebook_redesign/bookmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/camera.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/clock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/comment.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/covid_campaign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/covid_campaign.png -------------------------------------------------------------------------------- /assets/facebook_redesign/dark_mode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/facebook_logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/friend_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/friend_1.png -------------------------------------------------------------------------------- /assets/facebook_redesign/games.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/globe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/heart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/help.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/history.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/history_saved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/history_saved.png -------------------------------------------------------------------------------- /assets/facebook_redesign/home.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/information.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/ios_arrow_back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/like.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/like_circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/loved_circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/market.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/messenger.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/more_options.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/facebook_redesign/more_options_bottom_bar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/notifications.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/post_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/post_1.png -------------------------------------------------------------------------------- /assets/facebook_redesign/profile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/facebook_redesign/search_circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/shopping-bag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/shopping_cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/smile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_1.png -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_2.png -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_3.png -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_4.png -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_5.png -------------------------------------------------------------------------------- /assets/facebook_redesign/stories_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/facebook_redesign/stories_6.png -------------------------------------------------------------------------------- /assets/facebook_redesign/video.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/view.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/facebook_redesign/youtube.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/space_concept/arrow_back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/space_concept/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/space_concept/earth_planet_with_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/earth_planet_with_shadow.png -------------------------------------------------------------------------------- /assets/space_concept/earth_planet_with_shadow_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/earth_planet_with_shadow_clip.png -------------------------------------------------------------------------------- /assets/space_concept/explore_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/space_concept/explore_screen_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/explore_screen_background.png -------------------------------------------------------------------------------- /assets/space_concept/left_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/space_concept/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/space_concept/planet_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/space_concept/planet_screen_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/planet_screen_background.png -------------------------------------------------------------------------------- /assets/space_concept/planet_with_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/planet_with_shadow.png -------------------------------------------------------------------------------- /assets/space_concept/profile_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/space_concept/right_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/space_concept/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/space_concept/space_exploration_planet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/space_concept/space_exploration_planet.png -------------------------------------------------------------------------------- /assets/travel_app/arrow_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/avatar.jpg -------------------------------------------------------------------------------- /assets/travel_app/card_central.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/card_central.png -------------------------------------------------------------------------------- /assets/travel_app/card_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/card_left.png -------------------------------------------------------------------------------- /assets/travel_app/card_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/card_right.png -------------------------------------------------------------------------------- /assets/travel_app/crown_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/crown_5.png -------------------------------------------------------------------------------- /assets/travel_app/explore.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/italy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/italy.png -------------------------------------------------------------------------------- /assets/travel_app/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/motel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/motel.png -------------------------------------------------------------------------------- /assets/travel_app/profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/travel_app/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/show_eye.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/travel_app/show_eye_shadow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /assets/travel_app/star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/travel_app/west_asia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/assets/travel_app/west_asia.png -------------------------------------------------------------------------------- /fonts/hybi11_amigo/Hybi11-Amigo-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/hybi11_amigo/Hybi11-Amigo-Bold.ttf -------------------------------------------------------------------------------- /fonts/hybi11_amigo/Hybi11-Amigo-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/hybi11_amigo/Hybi11-Amigo-Light.ttf -------------------------------------------------------------------------------- /fonts/hybi11_amigo/Hybi11-Amigo-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/hybi11_amigo/Hybi11-Amigo-Regular.ttf -------------------------------------------------------------------------------- /fonts/hybi11_amigo/Hybi11-Amigo-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/hybi11_amigo/Hybi11-Amigo-SemiBold.ttf -------------------------------------------------------------------------------- /fonts/mark/Mark-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/mark/Mark-Bold.otf -------------------------------------------------------------------------------- /fonts/mark/Mark-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/mark/Mark-Light.otf -------------------------------------------------------------------------------- /fonts/mark/Mark-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/mark/Mark-Medium.otf -------------------------------------------------------------------------------- /fonts/mark/Mark-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/mark/Mark-Regular.otf -------------------------------------------------------------------------------- /fonts/mark/Mark-Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/mark/Mark-Thin.otf -------------------------------------------------------------------------------- /fonts/sf_pro_display/SF-Pro-Display-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_display/SF-Pro-Display-Bold.otf -------------------------------------------------------------------------------- /fonts/sf_pro_display/SF-Pro-Display-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_display/SF-Pro-Display-Light.otf -------------------------------------------------------------------------------- /fonts/sf_pro_display/SF-Pro-Display-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_display/SF-Pro-Display-Medium.otf -------------------------------------------------------------------------------- /fonts/sf_pro_display/SF-Pro-Display-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_display/SF-Pro-Display-Regular.otf -------------------------------------------------------------------------------- /fonts/sf_pro_display/SF-Pro-Display-Semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_display/SF-Pro-Display-Semibold.otf -------------------------------------------------------------------------------- /fonts/sf_pro_text/SF-Pro-Text-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_text/SF-Pro-Text-Bold.otf -------------------------------------------------------------------------------- /fonts/sf_pro_text/SF-Pro-Text-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_text/SF-Pro-Text-Light.otf -------------------------------------------------------------------------------- /fonts/sf_pro_text/SF-Pro-Text-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_text/SF-Pro-Text-Medium.otf -------------------------------------------------------------------------------- /fonts/sf_pro_text/SF-Pro-Text-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_text/SF-Pro-Text-Regular.otf -------------------------------------------------------------------------------- /fonts/sf_pro_text/SF-Pro-Text-Semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/fonts/sf_pro_text/SF-Pro-Text-Semibold.otf -------------------------------------------------------------------------------- /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.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillermoDLCO/FlutterChallenges/8761a04f355fb2a6080c806d36e4ed63b661522a/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 | flutterchallenges 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/global_widgets/action_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutterchallenges/theme/pallete_color.dart'; 3 | 4 | class ActionButton extends StatelessWidget { 5 | const ActionButton({ 6 | super.key, 7 | required this.action, 8 | required this.label, 9 | }); 10 | 11 | final VoidCallback action; 12 | final String label; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.all(20), 18 | child: SizedBox( 19 | width: MediaQuery.of(context).size.width, 20 | height: 50, 21 | child: ElevatedButton( 22 | onPressed: action, 23 | style: ElevatedButton.styleFrom( 24 | backgroundColor: PalleteColor.actionButtonColor, 25 | shape: 26 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), 27 | ), 28 | child: Text( 29 | label, 30 | style: const TextStyle( 31 | color: Colors.white, 32 | fontWeight: FontWeight.bold, 33 | ), 34 | ), 35 | ), 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/theme_bloc.dart'; 4 | import 'package:flutterchallenges/navigation/routes.dart'; 5 | 6 | void main() => runApp( 7 | BlocProvider( 8 | create: (context) => ThemeBloc(), 9 | child: const MyApp(), 10 | ), 11 | ); 12 | 13 | class MyApp extends StatelessWidget { 14 | const MyApp({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return BlocBuilder( 19 | builder: (context, state) { 20 | return MaterialApp( 21 | title: 'Flutter Demo', 22 | theme: state.theme, 23 | debugShowCheckedModeBanner: false, 24 | onGenerateRoute: Routes.routes, 25 | ); 26 | }, 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/blocs/bottom_navigation_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | 4 | enum IndexPage { 5 | home, 6 | video, 7 | market, 8 | profile, 9 | options, 10 | } 11 | 12 | class BottomNavigationBloc extends Cubit { 13 | BottomNavigationBloc() : super(const BottomNavigationState(IndexPage.home)); 14 | 15 | void changePage(IndexPage page) { 16 | emit(BottomNavigationState(page)); 17 | } 18 | } 19 | 20 | class BottomNavigationState extends Equatable { 21 | const BottomNavigationState(this.page); 22 | final IndexPage page; 23 | 24 | @override 25 | List get props => [page]; 26 | } 27 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/blocs/theme_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutterchallenges/theme/app_theme.dart'; 5 | 6 | class ThemeBloc extends Cubit { 7 | ThemeBloc() 8 | : super( 9 | ThemeState( 10 | theme: appThemeData[AppTheme.normal]!, 11 | appThemeType: AppTheme.normal, 12 | ), 13 | ); 14 | 15 | void changeTheme(AppTheme appTheme) { 16 | emit(ThemeState(theme: appThemeData[appTheme]!, appThemeType: appTheme)); 17 | } 18 | } 19 | 20 | class ThemeState extends Equatable { 21 | const ThemeState({ 22 | required this.theme, 23 | required this.appThemeType, 24 | }); 25 | final ThemeData theme; 26 | final AppTheme appThemeType; 27 | 28 | @override 29 | List get props => [theme, appThemeType]; 30 | } 31 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/facebook_principal_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/bottom_navigation_bloc.dart'; 5 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/theme_bloc.dart'; 6 | import 'package:flutterchallenges/modules/facebook_redesign/friends_page.dart'; 7 | import 'package:flutterchallenges/modules/facebook_redesign/home_page.dart'; 8 | import 'package:flutterchallenges/modules/facebook_redesign/options_page.dart'; 9 | import 'package:flutterchallenges/modules/facebook_redesign/widgets/bottom_bar_app.dart'; 10 | import 'package:flutterchallenges/theme/app_theme.dart'; 11 | 12 | class FacebookPrincipalScreen extends StatelessWidget { 13 | const FacebookPrincipalScreen({super.key}); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final theme = Theme.of(context); 18 | final themeBloc = context.watch(); 19 | final isLight = themeBloc.state.appThemeType == AppTheme.light; 20 | return AnnotatedRegion( 21 | value: SystemUiOverlayStyle( 22 | systemNavigationBarColor: 23 | isLight ? Colors.white : theme.bottomAppBarColor, 24 | systemNavigationBarIconBrightness: 25 | isLight ? Brightness.dark : Brightness.light, 26 | statusBarColor: isLight ? Colors.white : theme.primaryColor, 27 | statusBarIconBrightness: isLight ? Brightness.dark : Brightness.light, 28 | statusBarBrightness: isLight ? Brightness.dark : Brightness.light, 29 | ), 30 | child: SafeArea( 31 | child: BlocProvider( 32 | create: (context) => BottomNavigationBloc(), 33 | child: Scaffold( 34 | backgroundColor: theme.backgroundColor, 35 | body: BlocBuilder( 36 | builder: (BuildContext context, BottomNavigationState state) { 37 | return IndexedStack( 38 | index: state.page.index, 39 | children: [ 40 | const HomePage(), 41 | Container(), 42 | Container(), 43 | const FriendsPage(), 44 | const OptionsPage(), 45 | ], 46 | ); 47 | }, 48 | ), 49 | extendBody: true, 50 | bottomNavigationBar: 51 | BlocBuilder( 52 | builder: (BuildContext context, BottomNavigationState state) { 53 | final bottomNavigationBloc = 54 | context.read(); 55 | return BottomBarApp( 56 | onTabSelected: (index) => 57 | bottomNavigationBloc.changePage(IndexPage.values[index]), 58 | selectedIndex: bottomNavigationBloc.state.page.index, 59 | backgroundColor: theme.bottomAppBarColor, 60 | color: const Color(0xffCFD7ED), 61 | selectedColor: const Color(0xff1977F3), 62 | height: 65, 63 | items: const [ 64 | BottomBarAppItem(icon: 'assets/facebook_redesign/home.svg'), 65 | BottomBarAppItem( 66 | icon: 'assets/facebook_redesign/play.svg', 67 | hasNotification: true, 68 | ), 69 | BottomBarAppItem( 70 | icon: 'assets/facebook_redesign/market.svg', 71 | hasNotification: true, 72 | ), 73 | BottomBarAppItem( 74 | icon: 'assets/facebook_redesign/profile.svg', 75 | ), 76 | BottomBarAppItem( 77 | icon: 78 | 'assets/facebook_redesign/more_options_bottom_bar.svg', 79 | ), 80 | ], 81 | ); 82 | }, 83 | ), 84 | ), 85 | ), 86 | ), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/friends_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FriendsPage extends StatelessWidget { 4 | const FriendsPage({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/options_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutter_svg/flutter_svg.dart'; 5 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/theme_bloc.dart'; 6 | import 'package:flutterchallenges/modules/facebook_redesign/widgets/top_bar_app.dart'; 7 | import 'package:flutterchallenges/theme/app_theme.dart'; 8 | 9 | class OptionsPage extends StatelessWidget { 10 | const OptionsPage({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Column( 15 | children: const [ 16 | TopBarApp(), 17 | SizedBox(height: 20), 18 | _MenuSection(), 19 | ], 20 | ); 21 | } 22 | } 23 | 24 | class _MenuSection extends StatelessWidget { 25 | const _MenuSection(); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Expanded( 30 | child: Container( 31 | decoration: BoxDecoration( 32 | borderRadius: const BorderRadius.only( 33 | topLeft: Radius.circular(24), 34 | topRight: Radius.circular(24), 35 | ), 36 | color: Theme.of(context).primaryColor, 37 | ), 38 | padding: const EdgeInsets.only(top: 20), 39 | child: Column( 40 | children: [ 41 | const SizedBox(height: 12), 42 | const _MenuRow(), 43 | Expanded( 44 | child: NotificationListener( 45 | onNotification: (OverscrollIndicatorNotification overscroll) { 46 | overscroll.disallowIndicator(); 47 | return false; 48 | }, 49 | child: SingleChildScrollView( 50 | child: Column( 51 | children: [ 52 | const SizedBox(height: 28), 53 | const _ScrollSettingButtons(), 54 | const SizedBox(height: 27), 55 | const _ScrollSpecialCards(), 56 | const SizedBox(height: 25), 57 | Padding( 58 | padding: const EdgeInsets.symmetric(horizontal: 20), 59 | child: GridView.count( 60 | crossAxisCount: 2, 61 | shrinkWrap: true, 62 | childAspectRatio: 63 | (MediaQuery.of(context).size.width * .5 - 40.0) / 64 | (MediaQuery.of(context).size.width * .15), 65 | crossAxisSpacing: 20, 66 | mainAxisSpacing: 20, 67 | primary: false, 68 | children: const [ 69 | _SettingGridOption( 70 | icon: 'assets/facebook_redesign/youtube.svg', 71 | label: 'Videos en Watch', 72 | ), 73 | _SettingGridOption( 74 | icon: 75 | 'assets/facebook_redesign/shopping_cart.svg', 76 | label: 'Marketplace', 77 | ), 78 | _SettingGridOption( 79 | icon: 'assets/facebook_redesign/heart.svg', 80 | label: 'Parejas', 81 | ), 82 | _SettingGridOption( 83 | icon: 'assets/facebook_redesign/games.svg', 84 | label: 'Videojuegos', 85 | ), 86 | _SettingGridOption( 87 | icon: 'assets/facebook_redesign/shopping-bag.svg', 88 | label: 'Empleos', 89 | ), 90 | _SettingGridOption( 91 | icon: 'assets/facebook_redesign/bookmark.svg', 92 | label: 'Guardados', 93 | ), 94 | ], 95 | ), 96 | ), 97 | const SizedBox(height: 30), 98 | ], 99 | ), 100 | ), 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | 110 | class _SettingGridOption extends StatelessWidget { 111 | const _SettingGridOption({ 112 | required this.icon, 113 | required this.label, 114 | }); 115 | 116 | final String icon; 117 | final String label; 118 | 119 | @override 120 | Widget build(BuildContext context) { 121 | final theme = Theme.of(context); 122 | final size = MediaQuery.of(context).size; 123 | return Container( 124 | decoration: BoxDecoration( 125 | borderRadius: BorderRadius.circular(21), 126 | color: theme.colorScheme.primary, 127 | ), 128 | padding: EdgeInsets.all(size.width * .05), 129 | child: Row( 130 | children: [ 131 | SvgPicture.asset(icon, width: size.width * .06), 132 | SizedBox(width: size.width * .03), 133 | Expanded( 134 | child: FittedBox( 135 | fit: BoxFit.scaleDown, 136 | alignment: Alignment.centerLeft, 137 | child: Text( 138 | label, 139 | style: TextStyle( 140 | color: theme.textTheme.bodyText1?.color, 141 | fontSize: 13, 142 | height: 1.3, 143 | ), 144 | ), 145 | ), 146 | ) 147 | ], 148 | ), 149 | ); 150 | } 151 | } 152 | 153 | class _ScrollSpecialCards extends StatelessWidget { 154 | const _ScrollSpecialCards(); 155 | 156 | @override 157 | Widget build(BuildContext context) { 158 | final theme = Theme.of(context); 159 | final size = MediaQuery.of(context).size; 160 | return SizedBox( 161 | height: MediaQuery.of(context).size.height * .20, 162 | child: ListView( 163 | scrollDirection: Axis.horizontal, 164 | children: [ 165 | const SizedBox(width: 20), 166 | Container( 167 | height: size.height * .20, 168 | width: size.height * .35, 169 | decoration: BoxDecoration( 170 | image: const DecorationImage( 171 | fit: BoxFit.cover, 172 | image: AssetImage( 173 | 'assets/facebook_redesign/history_saved.png', 174 | ), 175 | ), 176 | borderRadius: BorderRadius.circular(25), 177 | color: Colors.red, 178 | ), 179 | child: Stack( 180 | children: [ 181 | Positioned( 182 | left: size.height * .015, 183 | top: size.height * .015, 184 | child: CircleAvatar( 185 | backgroundColor: theme.colorScheme.primary, 186 | radius: size.width * .04, 187 | child: SvgPicture.asset( 188 | 'assets/facebook_redesign/history.svg', 189 | width: size.width * .035, 190 | ), 191 | ), 192 | ), 193 | Positioned( 194 | right: size.height * .015, 195 | bottom: size.height * .015, 196 | child: Container( 197 | decoration: BoxDecoration( 198 | borderRadius: BorderRadius.circular(10), 199 | color: const Color(0xffEFF8FD), 200 | ), 201 | padding: 202 | const EdgeInsets.symmetric(horizontal: 12, vertical: 5), 203 | child: const Text( 204 | 'Hace 3 años', 205 | style: TextStyle(color: Color(0xff2D3F7B), fontSize: 10), 206 | ), 207 | ), 208 | ), 209 | ], 210 | ), 211 | ), 212 | const SizedBox(width: 10), 213 | Container( 214 | height: size.height * .20, 215 | width: size.height * .35, 216 | decoration: BoxDecoration( 217 | image: const DecorationImage( 218 | fit: BoxFit.cover, 219 | image: AssetImage( 220 | 'assets/facebook_redesign/covid_campaign.png', 221 | ), 222 | ), 223 | borderRadius: BorderRadius.circular(25), 224 | color: Colors.red, 225 | ), 226 | child: Stack( 227 | children: [ 228 | Positioned( 229 | left: size.height * .02, 230 | top: size.height * .02, 231 | child: const Text( 232 | 'Centro de información\nCOVID-19', 233 | style: TextStyle( 234 | color: Colors.white, 235 | fontSize: 15, 236 | fontWeight: FontWeight.bold, 237 | ), 238 | ), 239 | ), 240 | ], 241 | ), 242 | ), 243 | const SizedBox(width: 20), 244 | ], 245 | ), 246 | ); 247 | } 248 | } 249 | 250 | class _MenuRow extends StatelessWidget { 251 | const _MenuRow(); 252 | 253 | @override 254 | Widget build(BuildContext context) { 255 | final theme = Theme.of(context); 256 | return Padding( 257 | padding: const EdgeInsets.symmetric(horizontal: 20), 258 | child: Row( 259 | children: [ 260 | const SizedBox(width: 10), 261 | Text( 262 | 'Menú', 263 | style: TextStyle( 264 | color: theme.textTheme.bodyText1?.color, 265 | fontSize: 25, 266 | fontWeight: FontWeight.bold, 267 | ), 268 | ), 269 | const Spacer(), 270 | SvgPicture.asset( 271 | 'assets/facebook_redesign/dark_mode.svg', 272 | width: MediaQuery.of(context).size.width * .045, 273 | ), 274 | const SizedBox(width: 10), 275 | Text( 276 | 'Modo oscuro', 277 | style: TextStyle( 278 | color: theme.textTheme.bodyText1?.color, 279 | fontSize: 13, 280 | ), 281 | ), 282 | const _SwitchThemeMode(), 283 | ], 284 | ), 285 | ); 286 | } 287 | } 288 | 289 | class _ScrollSettingButtons extends StatelessWidget { 290 | const _ScrollSettingButtons(); 291 | 292 | @override 293 | Widget build(BuildContext context) { 294 | return Container( 295 | height: 30, 296 | padding: const EdgeInsets.symmetric(horizontal: 20), 297 | child: ListView( 298 | scrollDirection: Axis.horizontal, 299 | children: const [ 300 | _SettingButton( 301 | icon: 'assets/facebook_redesign/help.svg', 302 | label: 'Ayuda y soporte', 303 | ), 304 | SizedBox(width: 10), 305 | _SettingButton( 306 | icon: 'assets/facebook_redesign/settings.svg', 307 | label: 'Configuración y privacidad', 308 | ), 309 | SizedBox(width: 10), 310 | _SettingButton( 311 | icon: 'assets/facebook_redesign/camera.svg', 312 | label: 'Privacidad Multimedia', 313 | ), 314 | ], 315 | ), 316 | ); 317 | } 318 | } 319 | 320 | class _SettingButton extends StatelessWidget { 321 | const _SettingButton({ 322 | required this.icon, 323 | required this.label, 324 | }); 325 | 326 | final String icon; 327 | final String label; 328 | 329 | @override 330 | Widget build(BuildContext context) { 331 | final theme = Theme.of(context); 332 | final size = MediaQuery.of(context).size; 333 | return Container( 334 | decoration: BoxDecoration( 335 | borderRadius: BorderRadius.circular(7), 336 | color: theme.colorScheme.primary, 337 | ), 338 | alignment: Alignment.center, 339 | padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5), 340 | child: Row( 341 | mainAxisSize: MainAxisSize.min, 342 | mainAxisAlignment: MainAxisAlignment.center, 343 | children: [ 344 | SvgPicture.asset(icon, width: size.width * .04), 345 | const SizedBox(width: 10), 346 | Text( 347 | label, 348 | style: TextStyle( 349 | color: theme.textTheme.bodyText1?.color, 350 | fontSize: 12, 351 | height: 1.3, 352 | ), 353 | ) 354 | ], 355 | ), 356 | ); 357 | } 358 | } 359 | 360 | class _SwitchThemeMode extends StatefulWidget { 361 | const _SwitchThemeMode(); 362 | 363 | @override 364 | __SwitchThemeModeState createState() => __SwitchThemeModeState(); 365 | } 366 | 367 | class __SwitchThemeModeState extends State<_SwitchThemeMode> { 368 | bool currentStatus = false; 369 | 370 | void changeStatus({required bool status}) { 371 | setState(() { 372 | currentStatus = status; 373 | }); 374 | } 375 | 376 | @override 377 | Widget build(BuildContext context) { 378 | final themeBloc = context.read(); 379 | return Transform.scale( 380 | scale: 0.5, 381 | child: CupertinoSwitch( 382 | activeColor: const Color(0xff1977F4), 383 | value: currentStatus, 384 | onChanged: (status) { 385 | themeBloc.changeTheme(status ? AppTheme.dark : AppTheme.light); 386 | changeStatus(status: status); 387 | }, 388 | ), 389 | ); 390 | } 391 | } 392 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/widgets/avatar_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AvatarProfile extends StatelessWidget { 4 | const AvatarProfile({ 5 | super.key, 6 | required this.radius, 7 | required this.image, 8 | }); 9 | 10 | final double radius; 11 | final String image; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return CircleAvatar( 16 | radius: radius, 17 | backgroundImage: AssetImage(image), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/widgets/bottom_bar_app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | 4 | class BottomBarAppItem { 5 | const BottomBarAppItem({ 6 | required this.icon, 7 | this.hasNotification = false, 8 | }); 9 | 10 | final String icon; 11 | final bool hasNotification; 12 | } 13 | 14 | class BottomBarApp extends StatefulWidget { 15 | const BottomBarApp({ 16 | super.key, 17 | required this.items, 18 | this.height = 60.0, 19 | this.iconSize = 24.0, 20 | required this.backgroundColor, 21 | required this.color, 22 | required this.selectedColor, 23 | required this.onTabSelected, 24 | this.selectedIndex = 0, 25 | }); 26 | final List items; 27 | final double height; 28 | final double iconSize; 29 | final Color backgroundColor; 30 | final Color color; 31 | final Color selectedColor; 32 | final ValueChanged onTabSelected; 33 | final int selectedIndex; 34 | 35 | @override 36 | State createState() => BottomBarAppState(); 37 | } 38 | 39 | class BottomBarAppState extends State { 40 | @override 41 | Widget build(BuildContext context) { 42 | return ClipRRect( 43 | borderRadius: const BorderRadius.only( 44 | topRight: Radius.circular(24), 45 | topLeft: Radius.circular(24), 46 | ), 47 | child: BottomAppBar( 48 | elevation: 5, 49 | color: widget.backgroundColor, 50 | child: Container( 51 | height: 65, 52 | padding: const EdgeInsets.symmetric(horizontal: 20), 53 | child: Row( 54 | mainAxisAlignment: MainAxisAlignment.spaceAround, 55 | children: List.generate(widget.items.length, (int index) { 56 | return TabItemBottomBar( 57 | item: widget.items[index], 58 | index: index, 59 | color: widget.selectedIndex == index 60 | ? widget.selectedColor 61 | : widget.color, 62 | onPressed: (int index) => widget.onTabSelected(index), 63 | height: widget.height, 64 | ); 65 | }), 66 | ), 67 | ), 68 | ), 69 | ); 70 | } 71 | } 72 | 73 | class TabItemBottomBar extends StatelessWidget { 74 | const TabItemBottomBar({ 75 | super.key, 76 | required this.item, 77 | required this.index, 78 | required this.onPressed, 79 | required this.color, 80 | required this.height, 81 | }); 82 | 83 | final BottomBarAppItem item; 84 | final int index; 85 | final ValueChanged onPressed; 86 | final Color color; 87 | final double height; 88 | 89 | @override 90 | Widget build(BuildContext context) { 91 | final size = MediaQuery.of(context).size; 92 | return Expanded( 93 | child: SizedBox( 94 | height: height, 95 | child: Material( 96 | type: MaterialType.transparency, 97 | child: InkWell( 98 | onTap: () => onPressed(index), 99 | child: Stack( 100 | clipBehavior: Clip.none, 101 | alignment: Alignment.center, 102 | children: [ 103 | SvgPicture.asset( 104 | item.icon, 105 | height: 25, 106 | fit: BoxFit.cover, 107 | color: color, 108 | ), 109 | if (item.hasNotification) 110 | Positioned( 111 | right: size.width * .04, 112 | top: size.width * .035, 113 | child: Container( 114 | decoration: BoxDecoration( 115 | shape: BoxShape.circle, 116 | color: Theme.of(context).bottomAppBarColor, 117 | ), 118 | width: size.width * .035, 119 | height: size.width * .035, 120 | alignment: Alignment.center, 121 | child: Container( 122 | decoration: const BoxDecoration( 123 | shape: BoxShape.circle, 124 | color: Colors.red, 125 | ), 126 | width: size.width * .025, 127 | height: size.width * .025, 128 | ), 129 | ), 130 | ) 131 | ], 132 | ), 133 | ), 134 | ), 135 | ), 136 | ); 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /lib/modules/facebook_redesign/widgets/top_bar_app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutter_svg/flutter_svg.dart'; 5 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/theme_bloc.dart'; 6 | import 'package:flutterchallenges/modules/facebook_redesign/profile_page.dart'; 7 | import 'package:flutterchallenges/modules/facebook_redesign/widgets/avatar_profile.dart'; 8 | import 'package:flutterchallenges/theme/app_theme.dart'; 9 | 10 | class TopBarApp extends StatelessWidget { 11 | const TopBarApp({super.key}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final theme = Theme.of(context); 16 | return Container( 17 | decoration: BoxDecoration( 18 | borderRadius: const BorderRadius.only( 19 | bottomLeft: Radius.circular(16), 20 | bottomRight: Radius.circular(16), 21 | ), 22 | color: theme.primaryColor, 23 | ), 24 | padding: const EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 10), 25 | child: Column( 26 | children: [ 27 | const _AppBarCustom(), 28 | Divider( 29 | color: const Color(0xff707070).withOpacity(.2), 30 | thickness: 1, 31 | height: 30, 32 | ), 33 | const _CreatePostContainer(), 34 | ], 35 | ), 36 | ); 37 | } 38 | } 39 | 40 | class _CreatePostContainer extends StatelessWidget { 41 | const _CreatePostContainer(); 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | final theme = Theme.of(context); 46 | final size = MediaQuery.of(context).size; 47 | return Column( 48 | children: [ 49 | Row( 50 | children: [ 51 | AvatarProfile( 52 | radius: size.width * .042, 53 | image: 'assets/facebook_redesign/stories_1.png', 54 | ), 55 | Expanded( 56 | child: Padding( 57 | padding: const EdgeInsets.symmetric(horizontal: 15), 58 | child: Text( 59 | '¿Qué estas pensando, Mao?', 60 | style: TextStyle( 61 | color: theme.textTheme.bodyText2?.color, 62 | fontSize: 14, 63 | ), 64 | ), 65 | ), 66 | ), 67 | SvgPicture.asset( 68 | 'assets/facebook_redesign/smile.svg', 69 | width: size.width * .05, 70 | ) 71 | ], 72 | ), 73 | const SizedBox(height: 20), 74 | Row( 75 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 76 | children: const [ 77 | _PostTypeButton( 78 | icon: 'assets/facebook_redesign/camera.svg', 79 | label: 'Fotos', 80 | ), 81 | _PostTypeButton( 82 | icon: 'assets/facebook_redesign/video.svg', 83 | label: 'En vivo', 84 | ), 85 | _PostTypeButton( 86 | icon: 'assets/facebook_redesign/view.svg', 87 | label: 'Video corto', 88 | ), 89 | ], 90 | ) 91 | ], 92 | ); 93 | } 94 | } 95 | 96 | class _PostTypeButton extends StatelessWidget { 97 | const _PostTypeButton({ 98 | required this.icon, 99 | required this.label, 100 | }); 101 | 102 | final String icon; 103 | final String label; 104 | 105 | @override 106 | Widget build(BuildContext context) { 107 | final theme = Theme.of(context); 108 | final size = MediaQuery.of(context).size; 109 | return Container( 110 | width: size.width * .28, 111 | decoration: BoxDecoration( 112 | borderRadius: BorderRadius.circular(7), 113 | color: theme.colorScheme.primary, 114 | ), 115 | alignment: Alignment.center, 116 | padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 10), 117 | child: Row( 118 | mainAxisSize: MainAxisSize.min, 119 | mainAxisAlignment: MainAxisAlignment.center, 120 | children: [ 121 | SvgPicture.asset(icon, width: size.width * .04), 122 | const SizedBox(width: 10), 123 | Text( 124 | label, 125 | style: TextStyle( 126 | color: theme.textTheme.bodyText1?.color, 127 | fontSize: 12, 128 | height: 1.3, 129 | ), 130 | ) 131 | ], 132 | ), 133 | ); 134 | } 135 | } 136 | 137 | class _AppBarCustom extends StatelessWidget { 138 | const _AppBarCustom(); 139 | 140 | @override 141 | Widget build(BuildContext context) { 142 | return Row( 143 | children: [ 144 | SvgPicture.asset( 145 | 'assets/facebook_redesign/facebook_logo.svg', 146 | width: MediaQuery.of(context).size.width * .08, 147 | ), 148 | const Spacer(), 149 | const _ActionButton(icon: 'assets/facebook_redesign/search.svg'), 150 | const SizedBox(width: 12), 151 | const _ActionButton( 152 | icon: 'assets/facebook_redesign/notifications.svg', 153 | hasNotification: true, 154 | ), 155 | const SizedBox(width: 12), 156 | _ActionButton( 157 | icon: 'assets/facebook_redesign/messenger.svg', 158 | enableTheme: 159 | context.watch().state.appThemeType == AppTheme.dark, 160 | ), 161 | const SizedBox(width: 12), 162 | GestureDetector( 163 | onTap: () => Navigator.of(context).push( 164 | CupertinoPageRoute( 165 | builder: (BuildContext context) => const ProfilePage(), 166 | ), 167 | ), 168 | child: AvatarProfile( 169 | radius: MediaQuery.of(context).size.width * .042, 170 | image: 'assets/facebook_redesign/stories_1.png', 171 | ), 172 | ), 173 | ], 174 | ); 175 | } 176 | } 177 | 178 | class _ActionButton extends StatelessWidget { 179 | const _ActionButton({ 180 | required this.icon, 181 | this.enableTheme = true, 182 | this.hasNotification = false, 183 | }); 184 | 185 | final String icon; 186 | final bool enableTheme; 187 | final bool hasNotification; 188 | 189 | @override 190 | Widget build(BuildContext context) { 191 | final theme = Theme.of(context); 192 | final size = MediaQuery.of(context).size; 193 | return Stack( 194 | children: [ 195 | CircleAvatar( 196 | backgroundColor: theme.colorScheme.primary, 197 | child: SvgPicture.asset( 198 | icon, 199 | width: size.width * .04, 200 | color: enableTheme ? theme.colorScheme.secondary : null, 201 | ), 202 | ), 203 | if (hasNotification) 204 | Positioned( 205 | right: size.width * .01, 206 | child: Container( 207 | decoration: const BoxDecoration( 208 | shape: BoxShape.circle, 209 | color: Colors.red, 210 | ), 211 | width: size.width * .03, 212 | height: size.width * .03, 213 | ), 214 | ) 215 | ], 216 | ); 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /lib/modules/hidden_drawer_bottom_bar_fab/widgets/bottom_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BottomAppBarItem { 4 | BottomAppBarItem(this.icon, this.text); 5 | IconData icon; 6 | String text; 7 | } 8 | 9 | class BottomAppBarCustom extends StatefulWidget { 10 | const BottomAppBarCustom({ 11 | super.key, 12 | required this.items, 13 | this.height = 60.0, 14 | this.iconSize = 24.0, 15 | required this.backgroundColor, 16 | required this.color, 17 | required this.selectedColor, 18 | required this.notchedShape, 19 | required this.onTabSelected, 20 | this.selectedIndex = 0, 21 | }) : assert( 22 | items.length == 2 || items.length == 4, 23 | 'Length not equal to 2 or 4', 24 | ); 25 | 26 | final List items; 27 | final double height; 28 | final double iconSize; 29 | final Color backgroundColor; 30 | final Color color; 31 | final Color selectedColor; 32 | final NotchedShape notchedShape; 33 | final ValueChanged onTabSelected; 34 | final int selectedIndex; 35 | 36 | @override 37 | State createState() => BottomAppBarCustomState(); 38 | } 39 | 40 | class BottomAppBarCustomState extends State { 41 | @override 42 | Widget build(BuildContext context) { 43 | return BottomAppBar( 44 | shape: widget.notchedShape, 45 | elevation: 5, 46 | notchMargin: 10, 47 | color: widget.backgroundColor, 48 | child: SizedBox( 49 | height: 65, 50 | child: Row( 51 | mainAxisAlignment: MainAxisAlignment.spaceAround, 52 | children: List.generate(widget.items.length, (int index) { 53 | return TabItemBottomBar( 54 | item: widget.items[index], 55 | index: index, 56 | iconSize: widget.iconSize, 57 | color: widget.selectedIndex == index 58 | ? widget.selectedColor 59 | : widget.color, 60 | onPressed: (int index) => widget.onTabSelected(index), 61 | height: widget.height, 62 | ); 63 | }) 64 | ..insert( 65 | widget.items.length >> 1, 66 | _MiddleTabItem(height: widget.height), 67 | ), 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | 74 | class _MiddleTabItem extends StatelessWidget { 75 | const _MiddleTabItem({ 76 | required this.height, 77 | }); 78 | final double height; 79 | 80 | @override 81 | Widget build(BuildContext context) { 82 | return Expanded( 83 | child: SizedBox(height: height), 84 | ); 85 | } 86 | } 87 | 88 | class TabItemBottomBar extends StatelessWidget { 89 | const TabItemBottomBar({ 90 | super.key, 91 | required this.item, 92 | required this.index, 93 | required this.onPressed, 94 | required this.color, 95 | required this.height, 96 | required this.iconSize, 97 | }); 98 | 99 | final BottomAppBarItem item; 100 | final int index; 101 | final ValueChanged onPressed; 102 | final Color color; 103 | final double height; 104 | final double iconSize; 105 | 106 | @override 107 | Widget build(BuildContext context) { 108 | return Expanded( 109 | child: SizedBox( 110 | height: height, 111 | child: Material( 112 | type: MaterialType.transparency, 113 | child: InkWell( 114 | onTap: () => onPressed(index), 115 | child: Column( 116 | mainAxisSize: MainAxisSize.min, 117 | mainAxisAlignment: MainAxisAlignment.center, 118 | children: [ 119 | Icon(item.icon, size: iconSize, color: color), 120 | const SizedBox(height: 2), 121 | FittedBox( 122 | child: Text( 123 | item.text, 124 | style: TextStyle(color: color, fontSize: 12), 125 | ), 126 | ), 127 | ], 128 | ), 129 | ), 130 | ), 131 | ), 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/modules/hidden_drawer_bottom_bar_fab/widgets/multiple_fab.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutterchallenges/theme/pallete_color.dart'; 3 | 4 | class MultipleFAB extends StatefulWidget { 5 | const MultipleFAB({ 6 | super.key, 7 | required this.icons, 8 | required AnimationController controller, 9 | required this.backgroundColor, 10 | required this.actionFirstButton, 11 | }) : _controller = controller; 12 | 13 | final List icons; 14 | final AnimationController _controller; 15 | final Color backgroundColor; 16 | final VoidCallback actionFirstButton; 17 | 18 | @override 19 | State createState() => _MultipleFABState(); 20 | } 21 | 22 | class _MultipleFABState extends State { 23 | late AnimationController animationController; 24 | late Animation degOneTranslationAnimation; 25 | late Animation degTwoTranslationAnimation; 26 | late Animation degThreeTranslationAnimation; 27 | late Animation rotationAnimation; 28 | late Animation rotationAnimationPrincipalButton; 29 | 30 | @override 31 | void initState() { 32 | animationController = widget._controller; 33 | degOneTranslationAnimation = TweenSequence([ 34 | TweenSequenceItem( 35 | tween: Tween(begin: 0, end: 1), 36 | weight: 75, 37 | ), 38 | TweenSequenceItem( 39 | tween: Tween(begin: 1, end: 1), 40 | weight: 25, 41 | ), 42 | ]).animate(widget._controller); 43 | degTwoTranslationAnimation = TweenSequence([ 44 | TweenSequenceItem( 45 | tween: Tween(begin: 0, end: 1), 46 | weight: 55, 47 | ), 48 | TweenSequenceItem( 49 | tween: Tween(begin: 1, end: 1), 50 | weight: 45, 51 | ), 52 | ]).animate(widget._controller); 53 | rotationAnimation = Tween(begin: 180, end: 0).animate( 54 | CurvedAnimation(parent: animationController, curve: Curves.easeOut), 55 | ); 56 | rotationAnimationPrincipalButton = 57 | Tween(begin: 180, end: 45).animate( 58 | CurvedAnimation( 59 | parent: animationController, 60 | curve: Curves.easeOut, 61 | ), 62 | ); 63 | super.initState(); 64 | animationController.addListener(() { 65 | setState(() {}); 66 | }); 67 | } 68 | 69 | double getRadiansFromIndex(int index, {bool is3items = false}) { 70 | const unitRadian = 57.295779513; 71 | double degree; 72 | switch (index) { 73 | case 0: 74 | degree = is3items ? 270.0 : 247.0; 75 | break; 76 | case 1: 77 | degree = is3items ? 220.0 : 293.0; 78 | break; 79 | case 2: 80 | degree = is3items ? 320.0 : 200; 81 | break; 82 | case 3: 83 | degree = 340.0; 84 | break; 85 | default: 86 | degree = 245.0; 87 | } 88 | return degree / unitRadian; 89 | } 90 | 91 | double getRadiansFromDegree(double degree) { 92 | const unitRadian = 57.295779513; 93 | return degree / unitRadian; 94 | } 95 | 96 | @override 97 | Widget build(BuildContext context) { 98 | final is3Widgets = widget.icons.length == 3; 99 | return Stack( 100 | clipBehavior: Clip.none, 101 | fit: StackFit.passthrough, 102 | alignment: Alignment.center, 103 | children: [ 104 | IgnorePointer( 105 | child: Container( 106 | // color: Colors.black.withOpacity(0.4), 107 | color: Colors.transparent, 108 | width: 130, 109 | height: 130, 110 | ), 111 | ), 112 | ...List.generate(widget.icons.length, (int index) { 113 | final Widget child = SizedBox( 114 | width: 40, 115 | child: FloatingActionButton( 116 | heroTag: null, 117 | backgroundColor: widget.backgroundColor, 118 | onPressed: () {}, 119 | child: widget.icons[index], 120 | ), 121 | ); 122 | 123 | return Transform.translate( 124 | offset: Offset.fromDirection( 125 | getRadiansFromIndex(index, is3items: is3Widgets), 126 | degTwoTranslationAnimation.value * 60, 127 | ), 128 | child: Transform( 129 | transform: Matrix4.rotationZ( 130 | getRadiansFromDegree(rotationAnimation.value), 131 | )..scale(degTwoTranslationAnimation.value), 132 | alignment: Alignment.center, 133 | child: child, 134 | ), 135 | ); 136 | }).toList() 137 | ..add( 138 | Transform( 139 | transform: Matrix4.rotationZ( 140 | getRadiansFromDegree(rotationAnimationPrincipalButton.value), 141 | ), 142 | alignment: Alignment.center, 143 | child: FloatingActionButton( 144 | heroTag: null, 145 | backgroundColor: PalleteColor.actionButtonColor, 146 | onPressed: () { 147 | if (animationController.isDismissed) { 148 | animationController.forward(); 149 | } else { 150 | animationController.reverse(); 151 | } 152 | }, 153 | child: const Icon(Icons.add, size: 30), 154 | ), 155 | ), 156 | ) 157 | ], 158 | ); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/modules/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutterchallenges/global_widgets/action_button.dart'; 5 | import 'package:flutterchallenges/modules/facebook_redesign/blocs/theme_bloc.dart'; 6 | import 'package:flutterchallenges/navigation/routes.dart'; 7 | import 'package:flutterchallenges/theme/app_theme.dart'; 8 | import 'package:flutterchallenges/theme/pallete_color.dart'; 9 | 10 | class HomeScreen extends StatelessWidget { 11 | const HomeScreen({super.key}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return AnnotatedRegion( 16 | value: const SystemUiOverlayStyle( 17 | systemNavigationBarColor: Colors.white, 18 | systemNavigationBarIconBrightness: Brightness.dark, 19 | statusBarColor: PalleteColor.actionButtonColor, 20 | statusBarIconBrightness: Brightness.light, 21 | statusBarBrightness: Brightness.light, 22 | ), 23 | child: SafeArea( 24 | child: Scaffold( 25 | appBar: AppBar( 26 | backgroundColor: PalleteColor.actionButtonColor, 27 | title: const Text('Flutter Challenges'), 28 | centerTitle: true, 29 | systemOverlayStyle: SystemUiOverlayStyle.dark, 30 | ), 31 | body: Center( 32 | child: ListView( 33 | children: [ 34 | ActionButton( 35 | action: () { 36 | context.read().changeTheme(AppTheme.normal); 37 | Navigator.pushNamed( 38 | context, 39 | Routes.hiddenDrawerBottomBarFab, 40 | ); 41 | }, 42 | label: 'Hidden menu with FAB in bottom bar', 43 | ), 44 | ActionButton( 45 | action: () { 46 | context.read().changeTheme(AppTheme.normal); 47 | Navigator.pushNamed(context, Routes.spaceConceptOnboarding); 48 | }, 49 | label: 'Space Concept', 50 | ), 51 | ActionButton( 52 | action: () { 53 | context.read().changeTheme(AppTheme.normal); 54 | Navigator.pushNamed(context, Routes.travelApp); 55 | }, 56 | label: 'Travel App', 57 | ), 58 | ActionButton( 59 | action: () { 60 | context.read().changeTheme(AppTheme.light); 61 | Navigator.pushNamed( 62 | context, 63 | Routes.facebookPrincipalScreen, 64 | ); 65 | }, 66 | label: 'Facebook Redesign', 67 | ), 68 | ], 69 | ), 70 | ), 71 | ), 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/modules/space_concept/space_concept_explore_planet_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:flutterchallenges/modules/space_concept/widgets/bottom_bar.dart'; 5 | import 'package:flutterchallenges/modules/space_concept/widgets/pick_to_option.dart'; 6 | import 'package:flutterchallenges/modules/space_concept/widgets/top_bar.dart'; 7 | 8 | class SpaceConceptExplorePlanetScreen extends StatelessWidget { 9 | const SpaceConceptExplorePlanetScreen({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return const AnnotatedRegion( 14 | value: SystemUiOverlayStyle( 15 | systemNavigationBarColor: Color(0xff1B122E), 16 | systemNavigationBarIconBrightness: Brightness.dark, 17 | statusBarColor: Colors.transparent, 18 | statusBarIconBrightness: Brightness.light, 19 | statusBarBrightness: Brightness.light, 20 | ), 21 | child: Scaffold( 22 | backgroundColor: Color(0xff0A0A14), 23 | body: _ExploreBody(), 24 | bottomNavigationBar: BottomBar(), 25 | extendBody: true, 26 | ), 27 | ); 28 | } 29 | } 30 | 31 | class _ExploreBody extends StatelessWidget { 32 | const _ExploreBody(); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Container( 37 | alignment: Alignment.topCenter, 38 | decoration: const BoxDecoration( 39 | image: DecorationImage( 40 | image: 41 | AssetImage('assets/space_concept/explore_screen_background.png'), 42 | fit: BoxFit.fill, 43 | ), 44 | ), 45 | child: SafeArea( 46 | bottom: false, 47 | child: Column( 48 | crossAxisAlignment: CrossAxisAlignment.start, 49 | children: [ 50 | const TopBar(), 51 | const SizedBox(height: 10), 52 | GestureDetector( 53 | onTap: () => Navigator.of(context).pop(), 54 | child: Padding( 55 | padding: EdgeInsets.only( 56 | left: MediaQuery.of(context).size.width * .1, 57 | bottom: 30, 58 | ), 59 | child: SvgPicture.asset('assets/space_concept/arrow_back.svg'), 60 | ), 61 | ), 62 | Expanded( 63 | child: Stack( 64 | children: [ 65 | OverflowBox( 66 | maxHeight: MediaQuery.of(context).size.height * 1, 67 | child: Stack( 68 | clipBehavior: Clip.none, 69 | alignment: Alignment.bottomCenter, 70 | children: const [ 71 | _Atmosphere(), 72 | _PlanetMediaItem(), 73 | ], 74 | ), 75 | ), 76 | const _ExploreInformation(), 77 | ], 78 | ), 79 | ), 80 | ], 81 | ), 82 | ), 83 | ); 84 | } 85 | } 86 | 87 | class _ExploreInformation extends StatelessWidget { 88 | const _ExploreInformation(); 89 | 90 | @override 91 | Widget build(BuildContext context) { 92 | return Padding( 93 | padding: EdgeInsets.symmetric( 94 | horizontal: MediaQuery.of(context).size.width * .1, 95 | vertical: 10, 96 | ), 97 | child: Column( 98 | children: [ 99 | Row( 100 | crossAxisAlignment: CrossAxisAlignment.end, 101 | children: [ 102 | PickToExplore(number: 3, radius: 12, action: () {}), 103 | const SizedBox(width: 10), 104 | const Text( 105 | 'Earth', 106 | style: TextStyle( 107 | fontSize: 35, 108 | fontWeight: FontWeight.bold, 109 | fontFamily: 'Mark', 110 | color: Colors.white, 111 | height: 0.9, 112 | ), 113 | ), 114 | ], 115 | ), 116 | const SizedBox(height: 15), 117 | const Text( 118 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Habitant' 119 | ' sem ut sit fames in adipiscing. Ac magna donec egestas habitant.', 120 | style: TextStyle( 121 | fontSize: 12, 122 | fontFamily: 'Mark', 123 | color: Colors.white, 124 | ), 125 | ), 126 | ], 127 | ), 128 | ); 129 | } 130 | } 131 | 132 | class _Atmosphere extends StatelessWidget { 133 | const _Atmosphere(); 134 | 135 | @override 136 | Widget build(BuildContext context) { 137 | return OverflowBox( 138 | maxHeight: MediaQuery.of(context).size.height * 2, 139 | maxWidth: MediaQuery.of(context).size.width * 2, 140 | child: Container( 141 | margin: EdgeInsets.only(top: MediaQuery.of(context).size.height * .7), 142 | decoration: BoxDecoration( 143 | shape: BoxShape.circle, 144 | border: Border.all(color: Colors.white, width: .3), 145 | ), 146 | width: MediaQuery.of(context).size.width * 2, 147 | ), 148 | ); 149 | } 150 | } 151 | 152 | class _PlanetMediaItem extends StatelessWidget { 153 | const _PlanetMediaItem(); 154 | 155 | @override 156 | Widget build(BuildContext context) { 157 | return Hero( 158 | tag: 'earth', 159 | child: Image.asset( 160 | 'assets/space_concept/earth_planet_with_shadow_clip.png', 161 | fit: BoxFit.contain, 162 | width: MediaQuery.of(context).size.width, 163 | ), 164 | ); 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /lib/modules/space_concept/space_concept_intro_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:flutterchallenges/navigation/routes.dart'; 5 | 6 | class SpaceConceptIntroScreen extends StatelessWidget { 7 | const SpaceConceptIntroScreen({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return const AnnotatedRegion( 12 | value: SystemUiOverlayStyle( 13 | systemNavigationBarColor: Color(0xff052740), 14 | systemNavigationBarIconBrightness: Brightness.dark, 15 | statusBarColor: Color(0xff0A0A14), 16 | statusBarIconBrightness: Brightness.light, 17 | statusBarBrightness: Brightness.light, 18 | ), 19 | child: SafeArea( 20 | bottom: false, 21 | child: Scaffold( 22 | backgroundColor: Color(0xff0A0A14), 23 | body: _HomeBody(), 24 | ), 25 | ), 26 | ); 27 | } 28 | } 29 | 30 | class _HomeBody extends StatelessWidget { 31 | const _HomeBody(); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Stack( 36 | children: const [ 37 | _BackgroundPlanet(), 38 | _SpaceExplorationDescription(), 39 | ], 40 | ); 41 | } 42 | } 43 | 44 | class _SpaceExplorationDescription extends StatelessWidget { 45 | const _SpaceExplorationDescription(); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Padding( 50 | padding: EdgeInsets.symmetric( 51 | horizontal: MediaQuery.of(context).size.width * .1, 52 | ), 53 | child: Column( 54 | crossAxisAlignment: CrossAxisAlignment.start, 55 | children: const [ 56 | SizedBox(height: 20), 57 | _CloseButton(), 58 | SizedBox(height: 20), 59 | Text( 60 | 'Space', 61 | style: TextStyle( 62 | fontSize: 45, 63 | fontWeight: FontWeight.bold, 64 | fontFamily: 'Mark', 65 | color: Colors.white, 66 | ), 67 | ), 68 | Text( 69 | 'Exploration', 70 | style: TextStyle( 71 | fontSize: 45, 72 | fontFamily: 'Mark', 73 | color: Colors.white, 74 | ), 75 | ), 76 | SizedBox(height: 20), 77 | Text( 78 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Habitant ' 79 | 'sem ut sit fames in adipiscing. Ac magna donec egestas habitant.', 80 | style: TextStyle( 81 | fontSize: 12, 82 | fontFamily: 'Mark', 83 | color: Colors.white, 84 | ), 85 | ), 86 | SizedBox(height: 40), 87 | Text( 88 | 'View More', 89 | style: TextStyle( 90 | fontSize: 16, 91 | fontWeight: FontWeight.bold, 92 | fontFamily: 'Mark', 93 | color: Colors.white, 94 | ), 95 | ), 96 | ], 97 | ), 98 | ); 99 | } 100 | } 101 | 102 | class _BackgroundPlanet extends StatelessWidget { 103 | const _BackgroundPlanet(); 104 | 105 | @override 106 | Widget build(BuildContext context) { 107 | return Align( 108 | alignment: Alignment.bottomCenter, 109 | child: Stack( 110 | alignment: Alignment.bottomCenter, 111 | children: [ 112 | Container( 113 | alignment: const Alignment(0, 1.5), 114 | child: Image.asset( 115 | 'assets/space_concept/space_exploration_planet.png', 116 | fit: BoxFit.fitWidth, 117 | ), 118 | ), 119 | Positioned( 120 | bottom: 30, 121 | child: Row( 122 | mainAxisAlignment: MainAxisAlignment.center, 123 | children: const [ 124 | Text( 125 | 'Space', 126 | style: TextStyle( 127 | fontSize: 25, 128 | fontWeight: FontWeight.bold, 129 | fontFamily: 'Mark', 130 | color: Colors.white, 131 | ), 132 | ), 133 | Text( 134 | 'Element', 135 | style: TextStyle( 136 | fontSize: 25, 137 | fontFamily: 'Mark', 138 | color: Colors.white, 139 | ), 140 | ), 141 | ], 142 | ), 143 | ), 144 | ], 145 | ), 146 | ); 147 | } 148 | } 149 | 150 | class _CloseButton extends StatelessWidget { 151 | const _CloseButton(); 152 | 153 | @override 154 | Widget build(BuildContext context) { 155 | return Container( 156 | width: double.infinity, 157 | alignment: Alignment.centerRight, 158 | child: GestureDetector( 159 | onTap: () => 160 | Navigator.of(context).pushNamed(Routes.spaceConceptPrincipal), 161 | child: SvgPicture.asset( 162 | 'assets/space_concept/close.svg', 163 | ), 164 | ), 165 | ); 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /lib/modules/space_concept/space_concept_onboarding_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:flutterchallenges/navigation/routes.dart'; 5 | 6 | class SpaceConceptOnboardingScreen extends StatefulWidget { 7 | const SpaceConceptOnboardingScreen({super.key}); 8 | 9 | @override 10 | State createState() => 11 | _SpaceConceptOnboardingScreenState(); 12 | } 13 | 14 | class _SpaceConceptOnboardingScreenState 15 | extends State { 16 | @override 17 | void initState() { 18 | super.initState(); 19 | SystemChrome.setEnabledSystemUIMode( 20 | SystemUiMode.manual, 21 | overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom], 22 | ); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return const AnnotatedRegion( 28 | value: SystemUiOverlayStyle( 29 | systemNavigationBarColor: Colors.white, 30 | systemNavigationBarIconBrightness: Brightness.dark, 31 | statusBarColor: Colors.white, 32 | statusBarIconBrightness: Brightness.dark, 33 | statusBarBrightness: Brightness.dark, 34 | ), 35 | child: SafeArea( 36 | child: Scaffold( 37 | backgroundColor: Colors.white, 38 | body: _BodyOnboarding(), 39 | ), 40 | ), 41 | ); 42 | } 43 | } 44 | 45 | class _BodyOnboarding extends StatelessWidget { 46 | const _BodyOnboarding(); 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return Column( 51 | children: const [ 52 | _SpaceElementTitle(), 53 | _AstronauteIcon(), 54 | _IntroductionSlider(), 55 | ], 56 | ); 57 | } 58 | } 59 | 60 | class _IntroductionSlider extends StatefulWidget { 61 | const _IntroductionSlider(); 62 | 63 | @override 64 | __IntroductionSliderState createState() => __IntroductionSliderState(); 65 | } 66 | 67 | class __IntroductionSliderState extends State<_IntroductionSlider> { 68 | final PageController _pageController = PageController(); 69 | List stepWidget = []; 70 | bool isFinal = false; 71 | 72 | @override 73 | void initState() { 74 | super.initState(); 75 | stepWidget.addAll([ 76 | _FirstStep(updatePosition: updatePosition), 77 | _SecondStep(updatePosition: updatePosition), 78 | _ThirdStep(updatePosition: updatePosition), 79 | ]); 80 | _pageController.addListener(() { 81 | isFinal = _pageController.page!.toInt() == stepWidget.length - 1; 82 | setState(() {}); 83 | }); 84 | } 85 | 86 | Future updatePosition(int position) async { 87 | if (position < stepWidget.length) { 88 | await _pageController.animateToPage( 89 | position, 90 | duration: const Duration(milliseconds: 300), 91 | curve: Curves.decelerate, 92 | ); 93 | } 94 | } 95 | 96 | @override 97 | Widget build(BuildContext context) { 98 | return Expanded( 99 | child: Column( 100 | children: [ 101 | Expanded( 102 | child: PageView.builder( 103 | controller: _pageController, 104 | itemCount: stepWidget.length, 105 | itemBuilder: (context, index) => stepWidget[index], 106 | ), 107 | ), 108 | Padding( 109 | padding: EdgeInsets.symmetric( 110 | horizontal: MediaQuery.of(context).size.width * .1, 111 | vertical: MediaQuery.of(context).size.height * .03, 112 | ), 113 | child: Row( 114 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 115 | children: [ 116 | TextButton( 117 | onPressed: () => 118 | Navigator.of(context).pushNamed(Routes.spaceConceptIntro), 119 | child: const Text( 120 | 'Skip Step', 121 | style: TextStyle( 122 | color: Color(0xffBBBBBB), 123 | fontSize: 15, 124 | fontWeight: FontWeight.w400, 125 | fontFamily: 'Mark', 126 | ), 127 | ), 128 | ), 129 | ElevatedButton( 130 | style: ElevatedButton.styleFrom( 131 | backgroundColor: Colors.black, 132 | shape: RoundedRectangleBorder( 133 | borderRadius: BorderRadius.circular(5), 134 | ), 135 | minimumSize: const Size(105, 34), 136 | ), 137 | onPressed: () => isFinal 138 | ? Navigator.of(context) 139 | .pushNamed(Routes.spaceConceptIntro) 140 | : updatePosition(_pageController.page!.toInt() + 1), 141 | child: Text( 142 | isFinal ? 'Done' : 'Next', 143 | style: const TextStyle( 144 | color: Colors.white, 145 | fontSize: 15, 146 | fontWeight: FontWeight.w400, 147 | fontFamily: 'Mark', 148 | ), 149 | ), 150 | ), 151 | ], 152 | ), 153 | ), 154 | ], 155 | ), 156 | ); 157 | } 158 | } 159 | 160 | class _FirstStep extends StatelessWidget { 161 | const _FirstStep({ 162 | required this.updatePosition, 163 | }); 164 | 165 | final ValueSetter updatePosition; 166 | 167 | @override 168 | Widget build(BuildContext context) { 169 | return Padding( 170 | padding: EdgeInsets.symmetric( 171 | horizontal: MediaQuery.of(context).size.width * .1, 172 | ), 173 | child: Row( 174 | children: [ 175 | Expanded( 176 | flex: 3, 177 | child: Column( 178 | crossAxisAlignment: CrossAxisAlignment.start, 179 | mainAxisSize: MainAxisSize.min, 180 | children: const [ 181 | Text( 182 | 'Explore', 183 | style: TextStyle( 184 | fontSize: 40, 185 | fontWeight: FontWeight.bold, 186 | fontFamily: 'Mark', 187 | ), 188 | ), 189 | Text( 190 | 'Universe', 191 | style: TextStyle(fontSize: 40, fontFamily: 'Mark'), 192 | ), 193 | Text( 194 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' 195 | 'Habitant sem ut sit fames in adipiscing. Ac magna donec ' 196 | 'egestas habitant.', 197 | style: TextStyle(fontSize: 12, fontFamily: 'Mark'), 198 | ), 199 | ], 200 | ), 201 | ), 202 | Expanded( 203 | child: GestureDetector( 204 | behavior: HitTestBehavior.translucent, 205 | onTap: () => updatePosition(1), 206 | child: Container( 207 | alignment: Alignment.centerRight, 208 | child: SvgPicture.asset('assets/space_concept/right_arrow.svg'), 209 | ), 210 | ), 211 | ) 212 | ], 213 | ), 214 | ); 215 | } 216 | } 217 | 218 | class _SecondStep extends StatelessWidget { 219 | const _SecondStep({ 220 | required this.updatePosition, 221 | }); 222 | 223 | final ValueSetter updatePosition; 224 | 225 | @override 226 | Widget build(BuildContext context) { 227 | return Padding( 228 | padding: EdgeInsets.symmetric( 229 | horizontal: MediaQuery.of(context).size.width * .1, 230 | ), 231 | child: Row( 232 | children: [ 233 | Expanded( 234 | child: GestureDetector( 235 | behavior: HitTestBehavior.translucent, 236 | onTap: () => updatePosition(0), 237 | child: Container( 238 | alignment: Alignment.centerLeft, 239 | child: SvgPicture.asset( 240 | 'assets/space_concept/left_arrow.svg', 241 | ), 242 | ), 243 | ), 244 | ), 245 | Expanded( 246 | flex: 4, 247 | child: Column( 248 | crossAxisAlignment: CrossAxisAlignment.start, 249 | mainAxisSize: MainAxisSize.min, 250 | children: const [ 251 | Text( 252 | 'Explore', 253 | style: TextStyle( 254 | fontSize: 40, 255 | fontWeight: FontWeight.bold, 256 | fontFamily: 'Mark', 257 | ), 258 | ), 259 | Text( 260 | 'Universe', 261 | style: TextStyle(fontSize: 40, fontFamily: 'Mark'), 262 | ), 263 | Text( 264 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' 265 | 'Habitant sem ut sit fames in adipiscing. Ac magna donec ' 266 | 'egestas habitant.', 267 | style: TextStyle(fontSize: 12, fontFamily: 'Mark'), 268 | ), 269 | ], 270 | ), 271 | ), 272 | Expanded( 273 | child: GestureDetector( 274 | behavior: HitTestBehavior.translucent, 275 | onTap: () => updatePosition(2), 276 | child: Container( 277 | alignment: Alignment.centerRight, 278 | child: SvgPicture.asset('assets/space_concept/right_arrow.svg'), 279 | ), 280 | ), 281 | ) 282 | ], 283 | ), 284 | ); 285 | } 286 | } 287 | 288 | class _ThirdStep extends StatelessWidget { 289 | const _ThirdStep({ 290 | required this.updatePosition, 291 | }); 292 | 293 | final ValueSetter updatePosition; 294 | 295 | @override 296 | Widget build(BuildContext context) { 297 | return Padding( 298 | padding: EdgeInsets.symmetric( 299 | horizontal: MediaQuery.of(context).size.width * .1, 300 | ), 301 | child: Row( 302 | children: [ 303 | Expanded( 304 | child: GestureDetector( 305 | behavior: HitTestBehavior.translucent, 306 | onTap: () => updatePosition(1), 307 | child: Container( 308 | alignment: Alignment.centerLeft, 309 | child: SvgPicture.asset( 310 | 'assets/space_concept/left_arrow.svg', 311 | ), 312 | ), 313 | ), 314 | ), 315 | Expanded( 316 | flex: 4, 317 | child: Column( 318 | crossAxisAlignment: CrossAxisAlignment.start, 319 | mainAxisSize: MainAxisSize.min, 320 | children: const [ 321 | Text( 322 | 'Explore', 323 | style: TextStyle( 324 | fontSize: 40, 325 | fontWeight: FontWeight.bold, 326 | fontFamily: 'Mark', 327 | ), 328 | ), 329 | Text( 330 | 'Universe', 331 | style: TextStyle(fontSize: 40, fontFamily: 'Mark'), 332 | ), 333 | Text( 334 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' 335 | 'Habitant sem ut sit fames in adipiscing. Ac magna donec ' 336 | 'egestas habitant.', 337 | style: TextStyle(fontSize: 12, fontFamily: 'Mark'), 338 | ), 339 | ], 340 | ), 341 | ), 342 | ], 343 | ), 344 | ); 345 | } 346 | } 347 | 348 | class _AstronauteIcon extends StatelessWidget { 349 | const _AstronauteIcon(); 350 | 351 | @override 352 | Widget build(BuildContext context) { 353 | return SvgPicture.asset( 354 | 'assets/space_concept/onboarding.svg', 355 | fit: BoxFit.fitWidth, 356 | height: MediaQuery.of(context).size.height * .33, 357 | width: double.infinity, 358 | ); 359 | } 360 | } 361 | 362 | class _SpaceElementTitle extends StatelessWidget { 363 | const _SpaceElementTitle(); 364 | 365 | @override 366 | Widget build(BuildContext context) { 367 | return Padding( 368 | padding: EdgeInsets.only( 369 | top: MediaQuery.of(context).size.height * .08, 370 | bottom: 20, 371 | ), 372 | child: Row( 373 | mainAxisAlignment: MainAxisAlignment.center, 374 | children: const [ 375 | Text( 376 | 'Space', 377 | style: TextStyle( 378 | fontSize: 35, 379 | fontWeight: FontWeight.bold, 380 | fontFamily: 'Mark', 381 | ), 382 | ), 383 | Text( 384 | 'Element', 385 | style: TextStyle(fontSize: 35, fontFamily: 'Mark'), 386 | ), 387 | ], 388 | ), 389 | ); 390 | } 391 | } 392 | -------------------------------------------------------------------------------- /lib/modules/space_concept/space_concept_principal_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:flutterchallenges/modules/space_concept/widgets/bottom_bar.dart'; 5 | import 'package:flutterchallenges/modules/space_concept/widgets/pick_to_option.dart'; 6 | import 'package:flutterchallenges/modules/space_concept/widgets/top_bar.dart'; 7 | import 'package:flutterchallenges/navigation/routes.dart'; 8 | 9 | class SpaceConceptPrincipalScreen extends StatelessWidget { 10 | const SpaceConceptPrincipalScreen({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const AnnotatedRegion( 15 | value: SystemUiOverlayStyle( 16 | systemNavigationBarColor: Color(0xff1B122E), 17 | systemNavigationBarIconBrightness: Brightness.dark, 18 | statusBarColor: Colors.transparent, 19 | statusBarIconBrightness: Brightness.light, 20 | statusBarBrightness: Brightness.light, 21 | ), 22 | child: Scaffold( 23 | backgroundColor: Color(0xff0A0A14), 24 | body: _PrincipalBody(), 25 | bottomNavigationBar: BottomBar(), 26 | extendBody: true, 27 | ), 28 | ); 29 | } 30 | } 31 | 32 | class _PrincipalBody extends StatelessWidget { 33 | const _PrincipalBody(); 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Container( 38 | alignment: Alignment.topCenter, 39 | decoration: const BoxDecoration( 40 | image: DecorationImage( 41 | image: 42 | AssetImage('assets/space_concept/planet_screen_background.png'), 43 | fit: BoxFit.fill, 44 | ), 45 | ), 46 | child: SafeArea( 47 | child: Column( 48 | children: [ 49 | const TopBar(), 50 | const SizedBox(height: 10), 51 | const _SearchBar(), 52 | Expanded( 53 | child: Stack( 54 | clipBehavior: Clip.none, 55 | fit: StackFit.expand, 56 | children: const [ 57 | _PlanetMediaItem(), 58 | _PlanetInformation(), 59 | ], 60 | ), 61 | ), 62 | ], 63 | ), 64 | ), 65 | ); 66 | } 67 | } 68 | 69 | class _PlanetMediaItem extends StatelessWidget { 70 | const _PlanetMediaItem(); 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | return Align( 75 | alignment: Alignment.topCenter, 76 | child: Stack( 77 | alignment: Alignment.center, 78 | children: [ 79 | Container( 80 | height: MediaQuery.of(context).size.height * .4, 81 | decoration: BoxDecoration( 82 | shape: BoxShape.circle, 83 | border: Border.all(color: Colors.white, width: .3), 84 | ), 85 | ), 86 | Hero( 87 | tag: 'earth', 88 | child: Image.asset( 89 | 'assets/space_concept/planet_with_shadow.png', 90 | height: MediaQuery.of(context).size.height * .6, 91 | fit: BoxFit.contain, 92 | ), 93 | ), 94 | PickToExplore( 95 | number: 1, 96 | action: () {}, 97 | marginPosition: EdgeInsets.only( 98 | right: MediaQuery.of(context).size.height * .31, 99 | ), 100 | ), 101 | PickToExplore( 102 | number: 2, 103 | action: () {}, 104 | marginPosition: EdgeInsets.only( 105 | left: MediaQuery.of(context).size.height * .2, 106 | top: MediaQuery.of(context).size.height * .24, 107 | ), 108 | ), 109 | PickToExplore( 110 | number: 3, 111 | action: () => Navigator.of(context) 112 | .pushNamed(Routes.spaceConceptExplorePlanet), 113 | marginPosition: EdgeInsets.only( 114 | left: MediaQuery.of(context).size.height * .23, 115 | bottom: MediaQuery.of(context).size.height * .24, 116 | ), 117 | ), 118 | ], 119 | ), 120 | ); 121 | } 122 | } 123 | 124 | class _PlanetInformation extends StatelessWidget { 125 | const _PlanetInformation(); 126 | 127 | @override 128 | Widget build(BuildContext context) { 129 | return Align( 130 | alignment: Alignment.bottomLeft, 131 | child: Padding( 132 | padding: EdgeInsets.symmetric( 133 | horizontal: MediaQuery.of(context).size.width * .1, 134 | ), 135 | child: Column( 136 | mainAxisSize: MainAxisSize.min, 137 | crossAxisAlignment: CrossAxisAlignment.start, 138 | children: [ 139 | const Text( 140 | 'Earth', 141 | style: TextStyle( 142 | fontSize: 45, 143 | fontWeight: FontWeight.bold, 144 | fontFamily: 'Mark', 145 | color: Colors.white, 146 | ), 147 | ), 148 | const Text( 149 | 'Planet', 150 | style: TextStyle( 151 | fontSize: 45, 152 | fontFamily: 'Mark', 153 | color: Colors.white, 154 | ), 155 | ), 156 | const Text( 157 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' 158 | 'Habitant sem ut sit fames in adipiscing. Ac magna donec egestas ' 159 | 'habitant.', 160 | style: TextStyle( 161 | fontSize: 12, 162 | fontFamily: 'Mark', 163 | color: Colors.white, 164 | ), 165 | ), 166 | const SizedBox(height: 30), 167 | Row( 168 | children: [ 169 | const Text( 170 | 'View More', 171 | style: TextStyle( 172 | fontSize: 15, 173 | fontWeight: FontWeight.bold, 174 | fontFamily: 'Mark', 175 | color: Colors.white, 176 | ), 177 | ), 178 | const SizedBox(width: 15), 179 | SvgPicture.asset( 180 | 'assets/space_concept/right_arrow.svg', 181 | height: 10, 182 | color: Colors.white, 183 | ) 184 | ], 185 | ), 186 | const SizedBox(height: 20), 187 | ], 188 | ), 189 | ), 190 | ); 191 | } 192 | } 193 | 194 | class _SearchBar extends StatelessWidget { 195 | const _SearchBar(); 196 | 197 | @override 198 | Widget build(BuildContext context) { 199 | return Container( 200 | width: MediaQuery.of(context).size.width * .6, 201 | decoration: BoxDecoration( 202 | borderRadius: BorderRadius.circular(17.5), 203 | color: Colors.white.withOpacity(.2), 204 | ), 205 | padding: const EdgeInsets.symmetric(horizontal: 21, vertical: 5), 206 | child: Row( 207 | children: [ 208 | SvgPicture.asset('assets/space_concept/search.svg'), 209 | const SizedBox(width: 20), 210 | const Text( 211 | 'Search your favorite planet', 212 | style: TextStyle( 213 | fontSize: 10, 214 | fontFamily: 'Mark', 215 | color: Colors.white, 216 | ), 217 | ), 218 | ], 219 | ), 220 | ); 221 | } 222 | } 223 | -------------------------------------------------------------------------------- /lib/modules/space_concept/widgets/bottom_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | class BottomBar extends StatelessWidget { 5 | const BottomBar({ 6 | super.key, 7 | }); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | height: 70, 13 | color: const Color(0xff201E39).withOpacity(.5), 14 | child: Row( 15 | mainAxisAlignment: MainAxisAlignment.spaceAround, 16 | children: [ 17 | SvgPicture.asset('assets/space_concept/explore_icon.svg'), 18 | SvgPicture.asset('assets/space_concept/planet_icon.svg'), 19 | SvgPicture.asset('assets/space_concept/profile_icon.svg'), 20 | ], 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/modules/space_concept/widgets/pick_to_option.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PickToExplore extends StatelessWidget { 4 | const PickToExplore({ 5 | super.key, 6 | required this.number, 7 | required this.action, 8 | this.marginPosition, 9 | this.radius = 15.0, 10 | }); 11 | final int number; 12 | final VoidCallback action; 13 | final EdgeInsets? marginPosition; 14 | final double radius; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Container( 19 | margin: marginPosition, 20 | child: GestureDetector( 21 | onTap: action, 22 | child: Hero( 23 | tag: '$number', 24 | child: CircleAvatar( 25 | backgroundColor: const Color(0xffB1B0DF).withOpacity(.8), 26 | radius: radius, 27 | child: Text( 28 | '$number', 29 | style: const TextStyle( 30 | fontSize: 16, 31 | fontFamily: 'Mark', 32 | color: Colors.white, 33 | fontWeight: FontWeight.bold, 34 | ), 35 | ), 36 | ), 37 | ), 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/modules/space_concept/widgets/top_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | class TopBar extends StatelessWidget { 5 | const TopBar({ 6 | super.key, 7 | }); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Stack( 12 | children: [ 13 | Align( 14 | alignment: Alignment.centerLeft, 15 | child: Padding( 16 | padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20), 17 | child: SvgPicture.asset('assets/space_concept/menu.svg'), 18 | ), 19 | ), 20 | Padding( 21 | padding: const EdgeInsets.symmetric(vertical: 18), 22 | child: Row( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: const [ 25 | Text( 26 | 'Space', 27 | style: TextStyle( 28 | fontSize: 25, 29 | fontWeight: FontWeight.bold, 30 | fontFamily: 'Mark', 31 | color: Colors.white, 32 | ), 33 | ), 34 | Text( 35 | 'Element', 36 | style: TextStyle( 37 | fontSize: 25, 38 | fontFamily: 'Mark', 39 | color: Colors.white, 40 | ), 41 | ), 42 | ], 43 | ), 44 | ), 45 | ], 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/modules/travel_app/country.dart: -------------------------------------------------------------------------------- 1 | class Country { 2 | const Country({ 3 | required this.name, 4 | required this.image, 5 | required this.reviewer, 6 | required this.reviewerPhoto, 7 | required this.reviewDetail, 8 | this.read = false, 9 | }); 10 | final String name; 11 | final String image; 12 | final String reviewer; 13 | final String reviewerPhoto; 14 | final bool read; 15 | final ReviewDetail reviewDetail; 16 | 17 | Country copyWith({ 18 | String? name, 19 | String? image, 20 | String? reviewer, 21 | String? reviewerPhoto, 22 | bool? read, 23 | ReviewDetail? turismDetail, 24 | bool? isSelected, 25 | }) { 26 | return Country( 27 | name: name ?? this.name, 28 | image: image ?? this.image, 29 | reviewer: reviewer ?? this.reviewer, 30 | reviewerPhoto: reviewerPhoto ?? this.reviewerPhoto, 31 | read: read ?? this.read, 32 | reviewDetail: turismDetail ?? reviewDetail, 33 | ); 34 | } 35 | } 36 | 37 | class ReviewDetail { 38 | const ReviewDetail({ 39 | required this.title, 40 | required this.description, 41 | required this.likes, 42 | required this.location, 43 | required this.views, 44 | required this.reviewSubtitle, 45 | required this.reviewContentSubtitle, 46 | required this.hotels, 47 | }); 48 | final String title; 49 | final String description; 50 | final int likes; 51 | final String location; 52 | final int views; 53 | final String reviewSubtitle; 54 | final String reviewContentSubtitle; 55 | final List hotels; 56 | } 57 | 58 | class Hotel { 59 | const Hotel({ 60 | required this.title, 61 | required this.price, 62 | required this.image, 63 | }); 64 | final String title; 65 | final double price; 66 | final String image; 67 | } 68 | 69 | List countriesData = [ 70 | const Country( 71 | name: 'Japon', 72 | image: 'assets/travel_app/card_left.png', 73 | reviewer: 'Leslie Alexander', 74 | reviewerPhoto: 'assets/travel_app/avatar.jpg', 75 | reviewDetail: ReviewDetail( 76 | title: 'Travel to Japon', 77 | description: 78 | 'My trip to Japon started in Beijing, where I stayed in a beautiful ' 79 | 'hotel called...', 80 | likes: 2200, 81 | location: 'Japon', 82 | views: 1123, 83 | reviewSubtitle: 'At First', 84 | reviewContentSubtitle: 85 | "Let's figure out how much I spendt on this trip of money and time, " 86 | 'and then the story begins', 87 | hotels: [ 88 | Hotel( 89 | title: 'Crown 5', 90 | price: 12.99, 91 | image: 'assets/travel_app/crown_5.png', 92 | ), 93 | Hotel( 94 | title: 'Hotel Green', 95 | price: 12.99, 96 | image: 'assets/travel_app/west_asia.png', 97 | ), 98 | Hotel( 99 | title: 'Crown 5', 100 | price: 12.99, 101 | image: 'assets/travel_app/motel.png', 102 | ), 103 | ], 104 | ), 105 | ), 106 | const Country( 107 | name: 'Africa', 108 | image: 'assets/travel_app/card_central.png', 109 | reviewer: 'Leslie Alexander', 110 | reviewerPhoto: 'assets/travel_app/avatar.jpg', 111 | reviewDetail: ReviewDetail( 112 | title: 'Travel to Africa', 113 | description: 114 | 'My trip to Africa started in Beijing, where I stayed in a beautiful ' 115 | 'hotel called...', 116 | likes: 2200, 117 | location: 'Africa', 118 | views: 1123, 119 | reviewSubtitle: 'At First', 120 | reviewContentSubtitle: 121 | "Let's figure out how much I spendt on this trip of money and time, " 122 | 'and then the story begins', 123 | hotels: [ 124 | Hotel( 125 | title: 'Crown 5', 126 | price: 12.99, 127 | image: 'assets/travel_app/crown_5.png', 128 | ), 129 | Hotel( 130 | title: 'Hotel Green', 131 | price: 12.99, 132 | image: 'assets/travel_app/west_asia.png', 133 | ), 134 | Hotel( 135 | title: 'Crown 5', 136 | price: 12.99, 137 | image: 'assets/travel_app/motel.png', 138 | ), 139 | ], 140 | ), 141 | ), 142 | const Country( 143 | name: 'Turkey', 144 | image: 'assets/travel_app/card_right.png', 145 | reviewer: 'Leslie Alexander', 146 | reviewerPhoto: 'assets/travel_app/avatar.jpg', 147 | reviewDetail: ReviewDetail( 148 | title: 'Travel to Turkey', 149 | description: 150 | 'My trip to Africa started in Beijing, where I stayed in a beautiful ' 151 | 'hotel called...', 152 | likes: 2200, 153 | location: 'Turkey', 154 | views: 1123, 155 | reviewSubtitle: 'At First', 156 | reviewContentSubtitle: 157 | "Let's figure out how much I spendt on this trip of money and time, " 158 | 'and then the story begins', 159 | hotels: [ 160 | Hotel( 161 | title: 'Crown 2', 162 | price: 12.99, 163 | image: 'assets/travel_app/crown_5.png', 164 | ), 165 | Hotel( 166 | title: 'Hotel Green', 167 | price: 12.99, 168 | image: 'assets/travel_app/west_asia.png', 169 | ), 170 | Hotel( 171 | title: 'Motel', 172 | price: 12.99, 173 | image: 'assets/travel_app/motel.png', 174 | ), 175 | ], 176 | ), 177 | ), 178 | const Country( 179 | name: 'Italy', 180 | image: 'assets/travel_app/italy.png', 181 | reviewer: 'Leslie Alexander', 182 | reviewerPhoto: 'assets/travel_app/avatar.jpg', 183 | reviewDetail: ReviewDetail( 184 | title: 'Travel to Italy', 185 | description: 186 | 'My trip to Italy started in Beijing, where I stayed in a beautiful ' 187 | 'hotel called...', 188 | likes: 2200, 189 | location: 'Italy', 190 | views: 1123, 191 | reviewSubtitle: 'At First', 192 | reviewContentSubtitle: 193 | "Let's figure out how much I spendt on this trip of money and time, " 194 | 'and then the story begins', 195 | hotels: [ 196 | Hotel( 197 | title: 'Crown 2', 198 | price: 12.99, 199 | image: 'assets/travel_app/crown_5.png', 200 | ), 201 | Hotel( 202 | title: 'Hotel Tusl', 203 | price: 12.99, 204 | image: 'assets/travel_app/west_asia.png', 205 | ), 206 | Hotel( 207 | title: 'Motel', 208 | price: 12.99, 209 | image: 'assets/travel_app/motel.png', 210 | ), 211 | ], 212 | ), 213 | ), 214 | const Country( 215 | name: 'West', 216 | image: 'assets/travel_app/west_asia.png', 217 | reviewer: 'Leslie Alexander', 218 | reviewerPhoto: 'assets/travel_app/avatar.jpg', 219 | reviewDetail: ReviewDetail( 220 | title: 'Travel to West Asia', 221 | description: 222 | 'My trip to West Asia started in Beijing, where I stayed in a ' 223 | 'beautiful hotel called...', 224 | likes: 2200, 225 | location: 'West Asia', 226 | views: 1123, 227 | reviewSubtitle: 'At First', 228 | reviewContentSubtitle: 229 | "Let's figure out how much I spendt on this trip of money and time, " 230 | 'and then the story begins', 231 | hotels: [ 232 | Hotel( 233 | title: 'Crown 2', 234 | price: 12.99, 235 | image: 'assets/travel_app/crown_5.png', 236 | ), 237 | Hotel( 238 | title: 'Hotel Green', 239 | price: 12.99, 240 | image: 'assets/travel_app/west_asia.png', 241 | ), 242 | Hotel( 243 | title: 'Motel', 244 | price: 12.99, 245 | image: 'assets/travel_app/motel.png', 246 | ), 247 | ], 248 | ), 249 | ), 250 | ]; 251 | 252 | const categories = [ 253 | 'All', 254 | 'Overview', 255 | 'Hotels', 256 | 'Food', 257 | 'Memes', 258 | 'Restaurants' 259 | ]; 260 | -------------------------------------------------------------------------------- /lib/modules/travel_app/travel_app_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutterchallenges/modules/travel_app/country.dart'; 4 | 5 | class TravelAppBloc extends Cubit { 6 | TravelAppBloc() : super(TravelAppBlocInitialState()) { 7 | countries = countriesData; 8 | selectedCountry = countries.first; 9 | } 10 | late List countries; 11 | late Country selectedCountry; 12 | bool enableChangeTopScrollPosition = true; 13 | 14 | void changeCountry(Country country, {bool isCarousel = false}) { 15 | if (enableChangeTopScrollPosition) { 16 | enableChangeTopScrollPosition = false; 17 | selectedCountry = country; 18 | final indexCountry = countries 19 | .indexWhere((element) => element.name == selectedCountry.name); 20 | if (isCarousel) { 21 | emit(TravelAppUpdateTopScrollPositionState(position: indexCountry)); 22 | } else { 23 | emit( 24 | TravelAppUpdateCarouselScrollPositionState(position: indexCountry), 25 | ); 26 | } 27 | emit(TravelAppChangeCountryState(selectedCountry: selectedCountry)); 28 | } 29 | } 30 | 31 | void finishUpdateCountry() { 32 | enableChangeTopScrollPosition = true; 33 | } 34 | } 35 | 36 | abstract class TravelAppState extends Equatable { 37 | const TravelAppState(); 38 | 39 | @override 40 | List get props => []; 41 | } 42 | 43 | class TravelAppBlocInitialState extends TravelAppState {} 44 | 45 | class TravelAppChangeCountryState extends TravelAppState { 46 | const TravelAppChangeCountryState({required this.selectedCountry}); 47 | final Country selectedCountry; 48 | 49 | @override 50 | List get props => [selectedCountry]; 51 | } 52 | 53 | class TravelAppUpdateTopScrollPositionState extends TravelAppState { 54 | const TravelAppUpdateTopScrollPositionState({required this.position}); 55 | final int position; 56 | 57 | @override 58 | List get props => [position]; 59 | } 60 | 61 | class TravelAppUpdateCarouselScrollPositionState extends TravelAppState { 62 | const TravelAppUpdateCarouselScrollPositionState({required this.position}); 63 | final int position; 64 | 65 | @override 66 | List get props => [position]; 67 | } 68 | -------------------------------------------------------------------------------- /lib/navigation/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutterchallenges/modules/facebook_redesign/facebook_principal_screen.dart'; 4 | import 'package:flutterchallenges/modules/hidden_drawer_bottom_bar_fab/hidden_drawer_bottom_bar_fab_screen.dart'; 5 | import 'package:flutterchallenges/modules/home_screen.dart'; 6 | import 'package:flutterchallenges/modules/space_concept/space_concept_explore_planet_screen.dart'; 7 | import 'package:flutterchallenges/modules/space_concept/space_concept_intro_screen.dart'; 8 | import 'package:flutterchallenges/modules/space_concept/space_concept_onboarding_screen.dart'; 9 | import 'package:flutterchallenges/modules/space_concept/space_concept_principal_screen.dart'; 10 | import 'package:flutterchallenges/modules/travel_app/country.dart'; 11 | import 'package:flutterchallenges/modules/travel_app/travel_country_details_screen.dart'; 12 | import 'package:flutterchallenges/modules/travel_app/travel_home_screen.dart'; 13 | 14 | class Routes { 15 | static const initial = '/'; 16 | static const hiddenDrawerBottomBarFab = '/hiddenDrawerBottomBarFab'; 17 | static const spaceConceptOnboarding = '/spaceConceptOnboarding'; 18 | static const spaceConceptIntro = '/spaceConceptIntro'; 19 | static const spaceConceptPrincipal = '/spaceConceptPrincipal'; 20 | static const spaceConceptExplorePlanet = '/spaceConceptExplorePlanet'; 21 | static const travelApp = '/travelApp'; 22 | static const travelCountryDetails = '/travelCountryDetails'; 23 | static const facebookPrincipalScreen = '/facebookPrincipalScreen'; 24 | 25 | static PageRouteBuilder routes(RouteSettings routeSettings) { 26 | print('Route name: ${routeSettings.name}'); 27 | final args = routeSettings.arguments; 28 | 29 | switch (routeSettings.name) { 30 | case initial: 31 | return _buildRoute(const HomeScreen()); 32 | case hiddenDrawerBottomBarFab: 33 | return _buildRoute(const HiddenMenuBottomBarFab()); 34 | case spaceConceptOnboarding: 35 | return _buildRoute(const SpaceConceptOnboardingScreen()); 36 | case spaceConceptIntro: 37 | return _buildRoute(const SpaceConceptIntroScreen()); 38 | case spaceConceptPrincipal: 39 | return _buildRoute(const SpaceConceptPrincipalScreen()); 40 | case spaceConceptExplorePlanet: 41 | return _buildRoute(const SpaceConceptExplorePlanetScreen()); 42 | case travelApp: 43 | return _buildRoute(const TravelHomeScreen()); 44 | case travelCountryDetails: 45 | if (args == null) break; 46 | return _buildRoute(TravelCountryDetails(country: args as Country)); 47 | case facebookPrincipalScreen: 48 | return _buildRoute(const FacebookPrincipalScreen()); 49 | default: 50 | } 51 | 52 | throw PlatformException( 53 | code: 'ROUTE_ERROR', 54 | message: 'Route does not exists', 55 | ); 56 | } 57 | 58 | static PageRouteBuilder _buildRoute(Widget screen) { 59 | return PageRouteBuilder( 60 | pageBuilder: (context, _, __) => screen, 61 | transitionsBuilder: (_, Animation animation, __, Widget child) => 62 | FadeTransition(opacity: animation, child: child), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/theme/app_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum AppTheme { 4 | normal, 5 | light, 6 | dark, 7 | } 8 | 9 | final appThemeData = { 10 | AppTheme.normal: ThemeData( 11 | primarySwatch: Colors.blue, 12 | visualDensity: VisualDensity.adaptivePlatformDensity, 13 | ), 14 | AppTheme.light: ThemeData( 15 | fontFamily: 'Hybi11-Amigo', 16 | primaryColor: const Color(0xffffffff), 17 | backgroundColor: const Color(0xffF6F8FA), 18 | bottomAppBarColor: Colors.white, 19 | highlightColor: const Color(0xff1977F3), 20 | hoverColor: const Color(0xff2D3F7B), 21 | textTheme: const TextTheme( 22 | bodyText1: TextStyle(color: Color(0xff444D6E)), 23 | bodyText2: TextStyle(color: Color(0xff8E97B7)), 24 | headline1: TextStyle(color: Color(0xff19295C)), 25 | headline6: TextStyle(color: Color(0xffBABDC9)), 26 | ), 27 | colorScheme: ColorScheme.fromSwatch().copyWith( 28 | primary: const Color(0xffF8F9FA), 29 | secondary: const Color(0xff2D3F7B), 30 | ), 31 | ), 32 | AppTheme.dark: ThemeData( 33 | fontFamily: 'Hybi11-Amigo', 34 | primaryColor: const Color(0xff232935), 35 | backgroundColor: const Color(0xff080E1D), 36 | bottomAppBarColor: const Color(0xff080E1D), 37 | highlightColor: Colors.white, 38 | hoverColor: const Color(0xff282E39), 39 | textTheme: const TextTheme( 40 | bodyText1: TextStyle(color: Colors.white), 41 | bodyText2: TextStyle(color: Colors.white), 42 | headline1: TextStyle(color: Colors.white), 43 | headline6: TextStyle(color: Color(0xffBABDC9)), 44 | ), 45 | colorScheme: ColorScheme.fromSwatch().copyWith( 46 | primary: const Color(0xff2A303B), 47 | secondary: Colors.white, 48 | ), 49 | ), 50 | }; 51 | -------------------------------------------------------------------------------- /lib/theme/pallete_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PalleteColor { 4 | PalleteColor._(); 5 | 6 | static const Color actionButtonColor = Color(0xFF303F9F); 7 | static const Color backgroundColor = Color(0xfff5f8fb); 8 | static const Color backgroundMenuDrawerColor = Color(0xFF303F9F); 9 | } 10 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.9.0" 11 | bloc: 12 | dependency: transitive 13 | description: 14 | name: bloc 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "8.1.0" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0" 25 | characters: 26 | dependency: transitive 27 | description: 28 | name: characters 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.1" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.16.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.2" 53 | equatable: 54 | dependency: "direct main" 55 | description: 56 | name: equatable 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.0.5" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.3.1" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_bloc: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_bloc 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "8.1.1" 79 | flutter_svg: 80 | dependency: "direct main" 81 | description: 82 | name: flutter_svg 83 | url: "https://pub.dartlang.org" 84 | source: hosted 85 | version: "1.1.6" 86 | flutter_test: 87 | dependency: "direct dev" 88 | description: flutter 89 | source: sdk 90 | version: "0.0.0" 91 | matcher: 92 | dependency: transitive 93 | description: 94 | name: matcher 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.12.12" 98 | material_color_utilities: 99 | dependency: transitive 100 | description: 101 | name: material_color_utilities 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.1.5" 105 | meta: 106 | dependency: transitive 107 | description: 108 | name: meta 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.8.0" 112 | nested: 113 | dependency: transitive 114 | description: 115 | name: nested 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.0.0" 119 | path: 120 | dependency: transitive 121 | description: 122 | name: path 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.8.2" 126 | path_drawing: 127 | dependency: transitive 128 | description: 129 | name: path_drawing 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.0.1" 133 | path_parsing: 134 | dependency: transitive 135 | description: 136 | name: path_parsing 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "1.0.1" 140 | petitparser: 141 | dependency: transitive 142 | description: 143 | name: petitparser 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "5.1.0" 147 | provider: 148 | dependency: transitive 149 | description: 150 | name: provider 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "6.0.4" 154 | sky_engine: 155 | dependency: transitive 156 | description: flutter 157 | source: sdk 158 | version: "0.0.99" 159 | source_span: 160 | dependency: transitive 161 | description: 162 | name: source_span 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.9.0" 166 | stack_trace: 167 | dependency: transitive 168 | description: 169 | name: stack_trace 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.10.0" 173 | stream_channel: 174 | dependency: transitive 175 | description: 176 | name: stream_channel 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "2.1.0" 180 | string_scanner: 181 | dependency: transitive 182 | description: 183 | name: string_scanner 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.1.1" 187 | term_glyph: 188 | dependency: transitive 189 | description: 190 | name: term_glyph 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.2.1" 194 | test_api: 195 | dependency: transitive 196 | description: 197 | name: test_api 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.4.12" 201 | vector_math: 202 | dependency: transitive 203 | description: 204 | name: vector_math 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.1.2" 208 | very_good_analysis: 209 | dependency: "direct dev" 210 | description: 211 | name: very_good_analysis 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "3.1.0" 215 | xml: 216 | dependency: transitive 217 | description: 218 | name: xml 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "6.1.0" 222 | sdks: 223 | dart: ">=2.18.4 <3.0.0" 224 | flutter: ">=2.11.0-0.1.pre" 225 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutterchallenges 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' 5 | 6 | version: 1.1.0+1 7 | 8 | environment: 9 | sdk: ">=2.18.4 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | cupertino_icons: ^1.0.2 15 | flutter_svg: ^1.1.6 16 | flutter_bloc: ^8.1.1 17 | equatable: ^2.0.5 18 | 19 | dev_dependencies: 20 | flutter_test: 21 | sdk: flutter 22 | very_good_analysis: ^3.1.0 23 | 24 | flutter: 25 | 26 | uses-material-design: true 27 | assets: 28 | - assets/space_concept/ 29 | - assets/travel_app/ 30 | - assets/facebook_redesign/ 31 | 32 | fonts: 33 | - family: Mark 34 | fonts: 35 | - asset: fonts/mark/Mark-Regular.otf 36 | - asset: fonts/mark/Mark-Bold.otf 37 | weight: 700 38 | - asset: fonts/mark/Mark-Medium.otf 39 | weight: 600 40 | - asset: fonts/mark/Mark-Light.otf 41 | weight: 500 42 | - asset: fonts/mark/Mark-Thin.otf 43 | weight: 400 44 | 45 | - family: SF-Pro-Display 46 | fonts: 47 | - asset: fonts/sf_pro_display/SF-Pro-Display-Regular.otf 48 | - asset: fonts/sf_pro_display/SF-Pro-Display-Bold.otf 49 | weight: 800 50 | - asset: fonts/sf_pro_display/SF-Pro-Display-Semibold.otf 51 | weight: 700 52 | - asset: fonts/sf_pro_display/SF-Pro-Display-Medium.otf 53 | weight: 600 54 | - asset: fonts/sf_pro_display/SF-Pro-Display-Light.otf 55 | weight: 500 56 | 57 | - family: SF-Pro-Text 58 | fonts: 59 | - asset: fonts/sf_pro_text/SF-Pro-Text-Regular.otf 60 | - asset: fonts/sf_pro_text/SF-Pro-Text-Bold.otf 61 | weight: 800 62 | - asset: fonts/sf_pro_text/SF-Pro-Text-Semibold.otf 63 | weight: 700 64 | - asset: fonts/sf_pro_text/SF-Pro-Text-Medium.otf 65 | weight: 600 66 | - asset: fonts/sf_pro_text/SF-Pro-Text-Light.otf 67 | weight: 500 68 | 69 | - family: Hybi11-Amigo 70 | fonts: 71 | - asset: fonts/hybi11_amigo/Hybi11-Amigo-Regular.ttf 72 | - asset: fonts/hybi11_amigo/Hybi11-Amigo-Bold.ttf 73 | weight: 800 74 | - asset: fonts/hybi11_amigo/Hybi11-Amigo-SemiBold.ttf 75 | weight: 700 76 | - asset: fonts/hybi11_amigo/Hybi11-Amigo-Light.ttf 77 | weight: 500 78 | -------------------------------------------------------------------------------- /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 | import 'package:flutterchallenges/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(const MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | --------------------------------------------------------------------------------