├── .github └── workflows │ └── deploy.yaml ├── .gitignore ├── .metadata ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── awesome_flutter_layouts │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── 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-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── clock_demo │ ├── bell.png │ ├── clock_dark.png │ ├── clock_dark_pink.png │ ├── clock_home.png │ ├── minimal_black.png │ ├── minimal_pink.png │ └── search.jpg ├── images │ └── profile_pic.png └── shaders │ └── shader.frag ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── 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 ├── CustomListView.dart ├── EndDrawer.dart ├── UserProfile.dart ├── blast_effect.dart ├── bloc │ ├── bloc.dart │ └── userbloc.dart ├── clipmagic.dart ├── const │ ├── colors.dart │ ├── const.dart │ └── strings.dart ├── darkmode.dart ├── demos │ └── clock │ │ ├── constants │ │ ├── colors.dart │ │ ├── const.dart │ │ ├── constants.dart │ │ └── strings.dart │ │ ├── pages │ │ ├── cart.dart │ │ ├── detail.dart │ │ ├── home_main.dart │ │ └── navigation │ │ │ ├── cart.dart │ │ │ ├── favourate.dart │ │ │ ├── home.dart │ │ │ └── profile.dart │ │ └── widgets │ │ ├── appbar.dart │ │ ├── carousel_indicator.dart │ │ ├── gridtile.dart │ │ ├── new_header.dart │ │ ├── search.dart │ │ ├── tabbar.dart │ │ └── widgets.dart ├── extensions.dart ├── main.dart ├── models │ └── usermodel.dart ├── multi_column_picker.dart ├── search.dart ├── ultra_gradient.dart └── widgets │ └── picker_widget.dart ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html └── manifest.json /.github/workflows/deploy.yaml: -------------------------------------------------------------------------------- 1 | name: Deploy to netlify on merge 2 | "on": 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build_and_deploy: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - uses: subosito/flutter-action@v2 12 | with: 13 | # flutter-version: '3.3.10' 14 | channel: "stable" 15 | - run: flutter clean 16 | - run: flutter pub get 17 | # - run: flutter pub run build_runner build --delete-conflicting-outputs 18 | - run: flutter build web --wasm 19 | - name: Deploy to Netlify 20 | uses: nwtgck/actions-netlify@v1.1 21 | with: 22 | publish-dir: "./build/web" 23 | production-branch: master 24 | github-token: ${{ secrets.GITHUB_TOKEN }} 25 | deploy-message: "Deploy from GitHub Actions" 26 | enable-pull-request-comment: false 27 | enable-commit-comment: true 28 | overwrites-pull-request-comment: true 29 | env: 30 | NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 31 | NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} 32 | timeout-minutes: 1 -------------------------------------------------------------------------------- /.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 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | pubspec.lock 27 | .pub-cache/ 28 | .pub/ 29 | /build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/Flutter/flutter_export_environment.sh 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /.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: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 17 | base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 18 | - platform: web 19 | create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 20 | base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | ### Contributor 4 | We are glad that you took time to contribute to this repo,This repo contains collection of some cool Flutter Layouts from the community. 5 | Before you start contributing please go through the following guidelines which we consider are important to maintain this repository and can 6 | help new contributers to open source. 7 | 8 | - Any Layout you submit should be your own work. 9 | - Your work will be distributed under MIT License once your pull request is merged 10 | - You submitted work fulfils or mostly fulfils our styles and standards 11 | - You can also submit any applications clone you love . 12 | - prefer to keep a separate file for each UI. 13 | - prefer to do custom implementations than using third party libraries (optional) 14 | - feel free to create Custom Widgets 15 | - Please refer the [readme of this repo](https://github.com/maheshmnj/flutter-Testing) for the folder structure to be followed 16 | - Follow the [dart best practices](https://dart.dev/guides/language/effective-dart) to maintain the quality of code 17 | 18 | Contribution 19 | We appreciate any contribution, from fixing a grammar mistake in a comment to Improving existing UI, or updating readme, and writing proper tests are also highly welcome. 20 | 21 | 1. Fork This repo 22 | 2. Create a new branch 23 | 3. create your Awesome UI on the new branch 24 | 4. In lib/const/const.dart import your file 25 | 5. add your class name in a list layout_list (In const.dart) 26 | 6. Voila! your layout is connected,submit a pull request 27 | 28 | # Some Resources to help you contribute 29 | 30 | How to Write a Good commit Message: https://dev.to/chrissiemhrk/git-commit-message-5e21 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Mahesh Jamdade 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 | # Awesome_Flutter_Layouts 2 | 3 |

4 | 5 | 6 | 7 |

8 | 9 |

10 | 11 | 12 | 13 |

14 |

15 | 16 | 17 | 18 | 19 | 20 |

21 |

22 | 23 | ### Demos 24 | 25 |

26 | 27 |

28 | 29 | ### Design Credits: 30 | 31 | https://www.instagram.com/p/CQc6q-1LRqO/ 32 | 33 |

34 | 35 | ## Contributing 36 | 37 | Please refer the [Contribution guidelines](https://github.com/maheshmnj/Awesome-Flutter-Layouts/blob/master/CONTRIBUTING.md) before you start. 38 | 39 | In case you need help feel free to ping me on twitter @maheshmnj, I am excited to see what you build :) 40 | 41 | > Tip: To link images/gifs upload the images to github cdn (Go to Issues of any git repo-->new issue --->drop the images in box and you can use that url as a link to your images/gifs )** 42 | 43 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # Specify analysis options. 2 | # 3 | # Until there are meta linter rules, each desired lint must be explicitly enabled. 4 | # See: https://github.com/dart-lang/linter/issues/288 5 | # 6 | # For a list of lints, see: http://dart-lang.github.io/linter/lints/ 7 | # See the configuration guide for more 8 | # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer 9 | # 10 | # There are other similar analysis options files in the flutter repos, 11 | # which should be kept in sync with this file: 12 | # 13 | # - analysis_options.yaml (this file) 14 | # - packages/flutter/lib/analysis_options_user.yaml 15 | # - https://github.com/flutter/plugins/blob/master/analysis_options.yaml 16 | # - https://github.com/flutter/engine/blob/master/analysis_options.yaml 17 | # 18 | # This file contains the analysis options used by Flutter tools, such as IntelliJ, 19 | # Android Studio, and the `flutter analyze` command. 20 | 21 | analyzer: 22 | # strong-mode: 23 | # implicit-casts: false 24 | # implicit-dynamic: false 25 | errors: 26 | # treat missing required parameters as a warning (not a hint) 27 | missing_required_param: warning 28 | # treat missing returns as a warning (not a hint) 29 | missing_return: warning 30 | # allow having TODOs in the code 31 | todo: ignore 32 | # allow self-reference to deprecated members (we do this because otherwise we have 33 | # to annotate every member in every test, assert, etc, when we deprecate something) 34 | deprecated_member_use_from_same_package: ignore 35 | # Ignore analyzer hints for updating pubspecs when using Future or 36 | # Stream and not importing dart:async 37 | # Please see https://github.com/flutter/flutter/pull/24528 for details. 38 | exclude: 39 | - "bin/cache/**" 40 | # the following two are relative to the stocks example and the flutter package respectively 41 | # see https://github.com/dart-lang/sdk/issues/28463 42 | - "lib/i18n/messages_*.dart" 43 | - "lib/src/http/**" 44 | 45 | linter: 46 | rules: 47 | # these rules are documented on and in the same order as 48 | # the Dart Lint rules page to make maintenance easier 49 | # https://github.com/dart-lang/linter/blob/master/example/all.yaml 50 | - always_declare_return_types 51 | - always_put_control_body_on_new_line 52 | - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 53 | - always_require_non_null_named_parameters 54 | # - always_specify_types 55 | - annotate_overrides 56 | - avoid_bool_literals_in_conditional_expressions 57 | - avoid_classes_with_only_static_members 58 | - avoid_empty_else 59 | - avoid_equals_and_hash_code_on_mutable_classes 60 | - avoid_field_initializers_in_const_classes 61 | - avoid_function_literals_in_foreach_calls 62 | - avoid_init_to_null 63 | - avoid_null_checks_in_equality_operators 64 | - avoid_print # not yet tested 65 | - avoid_relative_lib_imports 66 | - avoid_renaming_method_parameters 67 | - avoid_return_types_on_setters 68 | - avoid_returning_null_for_void 69 | - avoid_single_cascade_in_expression_statements 70 | - avoid_slow_async_io 71 | - avoid_types_as_parameter_names 72 | - avoid_unused_constructor_parameters 73 | - avoid_void_async 74 | - await_only_futures 75 | - camel_case_extensions 76 | - camel_case_types 77 | - cancel_subscriptions 78 | - control_flow_in_finally 79 | - directives_ordering 80 | - empty_catches 81 | - empty_constructor_bodies 82 | - empty_statements 83 | - flutter_style_todos 84 | - hash_and_equals 85 | - implementation_imports 86 | - iterable_contains_unrelated_type 87 | - list_remove_unrelated_type 88 | - no_adjacent_strings_in_list 89 | - no_duplicate_case_values 90 | - non_constant_identifier_names 91 | - overridden_fields 92 | - package_api_docs 93 | - package_names 94 | - package_prefixed_library_names 95 | - parameter_assignments # we do this commonly 96 | - prefer_adjacent_string_concatenation 97 | - prefer_asserts_in_initializer_lists 98 | - prefer_collection_literals 99 | - prefer_conditional_assignment 100 | - prefer_const_constructors 101 | - prefer_const_constructors_in_immutables 102 | - prefer_const_declarations 103 | - prefer_const_literals_to_create_immutables 104 | - prefer_contains 105 | - prefer_equal_for_default_values 106 | - prefer_final_fields 107 | - prefer_final_in_for_each 108 | - prefer_final_locals 109 | - prefer_for_elements_to_map_fromIterable 110 | - prefer_foreach 111 | - prefer_generic_function_type_aliases 112 | - prefer_if_elements_to_conditional_expressions 113 | - prefer_if_null_operators 114 | - prefer_initializing_formals 115 | - prefer_inlined_adds 116 | - prefer_is_empty 117 | - prefer_is_not_empty 118 | - prefer_is_not_operator 119 | - prefer_iterable_whereType 120 | - prefer_single_quotes 121 | - prefer_spread_collections 122 | - prefer_typing_uninitialized_variables 123 | - prefer_void_to_null 124 | - recursive_getters 125 | - slash_for_doc_comments 126 | - sort_constructors_first 127 | - sort_pub_dependencies 128 | - sort_unnamed_constructors_first 129 | - test_types_in_equals 130 | - throw_in_finally 131 | - type_init_formals 132 | - unnecessary_brace_in_string_interps 133 | - unnecessary_const 134 | - unnecessary_new 135 | - unnecessary_null_aware_assignments 136 | - unnecessary_null_in_if_null_operators 137 | - unnecessary_overrides 138 | - unnecessary_parenthesis 139 | - unnecessary_statements 140 | - unnecessary_string_interpolations 141 | - unnecessary_this 142 | - unrelated_type_equality_checks 143 | - use_full_hex_values_for_flutter_colors 144 | - use_rethrow_when_possible 145 | - valid_regexps 146 | - void_checks 147 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/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 | namespace "com.example.awesome_flutter_layouts" 30 | compileSdkVersion flutter.compileSdkVersion 31 | ndkVersion flutter.ndkVersion 32 | 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | 38 | kotlinOptions { 39 | jvmTarget = '1.8' 40 | } 41 | 42 | sourceSets { 43 | main.java.srcDirs += 'src/main/kotlin' 44 | } 45 | 46 | defaultConfig { 47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 48 | applicationId "com.example.awesome_flutter_layouts" 49 | // You can update the following values to match your application needs. 50 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 51 | minSdkVersion flutter.minSdkVersion 52 | targetSdkVersion flutter.targetSdkVersion 53 | versionCode flutterVersionCode.toInteger() 54 | versionName flutterVersionName 55 | } 56 | 57 | buildTypes { 58 | release { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.debug 62 | } 63 | } 64 | } 65 | 66 | flutter { 67 | source '../..' 68 | } 69 | 70 | dependencies { 71 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 72 | } 73 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/awesome_flutter_layouts/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.awesome_flutter_layouts 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /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/clock_demo/bell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/bell.png -------------------------------------------------------------------------------- /assets/clock_demo/clock_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/clock_dark.png -------------------------------------------------------------------------------- /assets/clock_demo/clock_dark_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/clock_dark_pink.png -------------------------------------------------------------------------------- /assets/clock_demo/clock_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/clock_home.png -------------------------------------------------------------------------------- /assets/clock_demo/minimal_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/minimal_black.png -------------------------------------------------------------------------------- /assets/clock_demo/minimal_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/minimal_pink.png -------------------------------------------------------------------------------- /assets/clock_demo/search.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/clock_demo/search.jpg -------------------------------------------------------------------------------- /assets/images/profile_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/assets/images/profile_pic.png -------------------------------------------------------------------------------- /assets/shaders/shader.frag: -------------------------------------------------------------------------------- 1 | #version 460 core 2 | #include 3 | 4 | out vec4 fragColor; 5 | 6 | uniform vec2 resolution; 7 | 8 | // Additional uniform variables for animation and shape rendering 9 | uniform float time; 10 | 11 | void main() { 12 | vec2 pos = FlutterFragCoord().xy / resolution; 13 | 14 | // Use time and pos.xy as necessary for animation effects 15 | float animationFactor = sin(time); // Example animation based on time 16 | pos.xy *= animationFactor; // Modify position based on animation 17 | 18 | // Add your logic for shape rendering here 19 | vec3 shapeColor = vec3(1.0, 0.0, 0.0); // Example shape color (red) 20 | if (pos.x > 0.25 && pos.x < 0.75 && pos.y > 0.25 && pos.y < 0.75) { 21 | shapeColor = vec3(0.0, 1.0, 0.0); // Change color inside a specific region 22 | } 23 | 24 | fragColor = vec4(shapeColor, 1.0); // Set fragment color based on shape logic 25 | } 26 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - path_provider_ios (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | path_provider_ios: 14 | :path: ".symlinks/plugins/path_provider_ios/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 18 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 19 | 20 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 21 | 22 | COCOAPODS: 1.10.2 23 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 1F0B8181639738EF86669E0B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6E436F7824216730ACE6DC0 /* Pods_Runner.framework */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 27FC4393E01C457ABCB37D00 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 36 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 37 | 511F68A38CD1CD4B2B8B193E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 99683C26B78C5409672C6FBA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 49 | F6E436F7824216730ACE6DC0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 1F0B8181639738EF86669E0B /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 2A27F679CD3AF996E56FA347 /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | F6E436F7824216730ACE6DC0 /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 9740EEB11CF90186004384FC /* Flutter */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | D09C7F81BC5634BF13E8C0A6 /* Pods */, 90 | 2A27F679CD3AF996E56FA347 /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 110 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 111 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 112 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 113 | ); 114 | path = Runner; 115 | sourceTree = ""; 116 | }; 117 | D09C7F81BC5634BF13E8C0A6 /* Pods */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 99683C26B78C5409672C6FBA /* Pods-Runner.debug.xcconfig */, 121 | 27FC4393E01C457ABCB37D00 /* Pods-Runner.release.xcconfig */, 122 | 511F68A38CD1CD4B2B8B193E /* Pods-Runner.profile.xcconfig */, 123 | ); 124 | name = Pods; 125 | path = Pods; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 97C146ED1CF9000F007C117D /* Runner */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 134 | buildPhases = ( 135 | 90C419BEC1ECD343262E244F /* [CP] Check Pods Manifest.lock */, 136 | 9740EEB61CF901F6004384FC /* Run Script */, 137 | 97C146EA1CF9000F007C117D /* Sources */, 138 | 97C146EB1CF9000F007C117D /* Frameworks */, 139 | 97C146EC1CF9000F007C117D /* Resources */, 140 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 142 | 497D8384B997FDEAC616D4DD /* [CP] Embed Pods Frameworks */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 1300; 160 | ORGANIZATIONNAME = ""; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | LastSwiftMigration = 1100; 165 | }; 166 | }; 167 | }; 168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 169 | compatibilityVersion = "Xcode 9.3"; 170 | developmentRegion = en; 171 | hasScannedForEncodings = 0; 172 | knownRegions = ( 173 | en, 174 | Base, 175 | ); 176 | mainGroup = 97C146E51CF9000F007C117D; 177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 97C146ED1CF9000F007C117D /* Runner */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 97C146EC1CF9000F007C117D /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "Thin Binary"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 214 | }; 215 | 497D8384B997FDEAC616D4DD /* [CP] Embed Pods Frameworks */ = { 216 | isa = PBXShellScriptBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | inputFileListPaths = ( 221 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 222 | ); 223 | name = "[CP] Embed Pods Frameworks"; 224 | outputFileListPaths = ( 225 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 230 | showEnvVarsInLog = 0; 231 | }; 232 | 90C419BEC1ECD343262E244F /* [CP] Check Pods Manifest.lock */ = { 233 | isa = PBXShellScriptBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | inputFileListPaths = ( 238 | ); 239 | inputPaths = ( 240 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 241 | "${PODS_ROOT}/Manifest.lock", 242 | ); 243 | name = "[CP] Check Pods Manifest.lock"; 244 | outputFileListPaths = ( 245 | ); 246 | outputPaths = ( 247 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 252 | showEnvVarsInLog = 0; 253 | }; 254 | 9740EEB61CF901F6004384FC /* Run Script */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | ); 261 | name = "Run Script"; 262 | outputPaths = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 267 | }; 268 | /* End PBXShellScriptBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | 97C146EA1CF9000F007C117D /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXSourcesBuildPhase section */ 281 | 282 | /* Begin PBXVariantGroup section */ 283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | 97C146FB1CF9000F007C117D /* Base */, 287 | ); 288 | name = Main.storyboard; 289 | sourceTree = ""; 290 | }; 291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | 97C147001CF9000F007C117D /* Base */, 295 | ); 296 | name = LaunchScreen.storyboard; 297 | sourceTree = ""; 298 | }; 299 | /* End PBXVariantGroup section */ 300 | 301 | /* Begin XCBuildConfiguration section */ 302 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 333 | ENABLE_NS_ASSERTIONS = NO; 334 | ENABLE_STRICT_OBJC_MSGSEND = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_NO_COMMON_BLOCKS = YES; 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 344 | MTL_ENABLE_DEBUG_INFO = NO; 345 | SDKROOT = iphoneos; 346 | SUPPORTED_PLATFORMS = iphoneos; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Profile; 351 | }; 352 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 353 | isa = XCBuildConfiguration; 354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 355 | buildSettings = { 356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 357 | CLANG_ENABLE_MODULES = YES; 358 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 359 | ENABLE_BITCODE = NO; 360 | INFOPLIST_FILE = Runner/Info.plist; 361 | LD_RUNPATH_SEARCH_PATHS = ( 362 | "$(inherited)", 363 | "@executable_path/Frameworks", 364 | ); 365 | PRODUCT_BUNDLE_IDENTIFIER = com.example.awesomeFlutterLayouts; 366 | PRODUCT_NAME = "$(TARGET_NAME)"; 367 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 368 | SWIFT_VERSION = 5.0; 369 | VERSIONING_SYSTEM = "apple-generic"; 370 | }; 371 | name = Profile; 372 | }; 373 | 97C147031CF9000F007C117D /* Debug */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ALWAYS_SEARCH_USER_PATHS = NO; 377 | CLANG_ANALYZER_NONNULL = YES; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = dwarf; 404 | ENABLE_STRICT_OBJC_MSGSEND = YES; 405 | ENABLE_TESTABILITY = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu99; 407 | GCC_DYNAMIC_NO_PIC = NO; 408 | GCC_NO_COMMON_BLOCKS = YES; 409 | GCC_OPTIMIZATION_LEVEL = 0; 410 | GCC_PREPROCESSOR_DEFINITIONS = ( 411 | "DEBUG=1", 412 | "$(inherited)", 413 | ); 414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 416 | GCC_WARN_UNDECLARED_SELECTOR = YES; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 418 | GCC_WARN_UNUSED_FUNCTION = YES; 419 | GCC_WARN_UNUSED_VARIABLE = YES; 420 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 421 | MTL_ENABLE_DEBUG_INFO = YES; 422 | ONLY_ACTIVE_ARCH = YES; 423 | SDKROOT = iphoneos; 424 | TARGETED_DEVICE_FAMILY = "1,2"; 425 | }; 426 | name = Debug; 427 | }; 428 | 97C147041CF9000F007C117D /* Release */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ALWAYS_SEARCH_USER_PATHS = NO; 432 | CLANG_ANALYZER_NONNULL = YES; 433 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 434 | CLANG_CXX_LIBRARY = "libc++"; 435 | CLANG_ENABLE_MODULES = YES; 436 | CLANG_ENABLE_OBJC_ARC = YES; 437 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 438 | CLANG_WARN_BOOL_CONVERSION = YES; 439 | CLANG_WARN_COMMA = YES; 440 | CLANG_WARN_CONSTANT_CONVERSION = YES; 441 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 442 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 443 | CLANG_WARN_EMPTY_BODY = YES; 444 | CLANG_WARN_ENUM_CONVERSION = YES; 445 | CLANG_WARN_INFINITE_RECURSION = YES; 446 | CLANG_WARN_INT_CONVERSION = YES; 447 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 448 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 449 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 450 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 451 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 452 | CLANG_WARN_STRICT_PROTOTYPES = YES; 453 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 454 | CLANG_WARN_UNREACHABLE_CODE = YES; 455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 456 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 457 | COPY_PHASE_STRIP = NO; 458 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 459 | ENABLE_NS_ASSERTIONS = NO; 460 | ENABLE_STRICT_OBJC_MSGSEND = YES; 461 | GCC_C_LANGUAGE_STANDARD = gnu99; 462 | GCC_NO_COMMON_BLOCKS = YES; 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 465 | GCC_WARN_UNDECLARED_SELECTOR = YES; 466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 467 | GCC_WARN_UNUSED_FUNCTION = YES; 468 | GCC_WARN_UNUSED_VARIABLE = YES; 469 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 470 | MTL_ENABLE_DEBUG_INFO = NO; 471 | SDKROOT = iphoneos; 472 | SUPPORTED_PLATFORMS = iphoneos; 473 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 474 | TARGETED_DEVICE_FAMILY = "1,2"; 475 | VALIDATE_PRODUCT = YES; 476 | }; 477 | name = Release; 478 | }; 479 | 97C147061CF9000F007C117D /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 482 | buildSettings = { 483 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 484 | CLANG_ENABLE_MODULES = YES; 485 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 486 | ENABLE_BITCODE = NO; 487 | INFOPLIST_FILE = Runner/Info.plist; 488 | LD_RUNPATH_SEARCH_PATHS = ( 489 | "$(inherited)", 490 | "@executable_path/Frameworks", 491 | ); 492 | PRODUCT_BUNDLE_IDENTIFIER = com.example.awesomeFlutterLayouts; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 495 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 496 | SWIFT_VERSION = 5.0; 497 | VERSIONING_SYSTEM = "apple-generic"; 498 | }; 499 | name = Debug; 500 | }; 501 | 97C147071CF9000F007C117D /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 504 | buildSettings = { 505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 506 | CLANG_ENABLE_MODULES = YES; 507 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 508 | ENABLE_BITCODE = NO; 509 | INFOPLIST_FILE = Runner/Info.plist; 510 | LD_RUNPATH_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "@executable_path/Frameworks", 513 | ); 514 | PRODUCT_BUNDLE_IDENTIFIER = com.example.awesomeFlutterLayouts; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 517 | SWIFT_VERSION = 5.0; 518 | VERSIONING_SYSTEM = "apple-generic"; 519 | }; 520 | name = Release; 521 | }; 522 | /* End XCBuildConfiguration section */ 523 | 524 | /* Begin XCConfigurationList section */ 525 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 97C147031CF9000F007C117D /* Debug */, 529 | 97C147041CF9000F007C117D /* Release */, 530 | 249021D3217E4FDB00AE95B9 /* Profile */, 531 | ); 532 | defaultConfigurationIsVisible = 0; 533 | defaultConfigurationName = Release; 534 | }; 535 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 536 | isa = XCConfigurationList; 537 | buildConfigurations = ( 538 | 97C147061CF9000F007C117D /* Debug */, 539 | 97C147071CF9000F007C117D /* Release */, 540 | 249021D4217E4FDB00AE95B9 /* Profile */, 541 | ); 542 | defaultConfigurationIsVisible = 0; 543 | defaultConfigurationName = Release; 544 | }; 545 | /* End XCConfigurationList section */ 546 | }; 547 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 548 | } 549 | -------------------------------------------------------------------------------- /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 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/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 | awesome_flutter_layouts 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/CustomListView.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:awesome_flutter_layouts/const/const.dart'; 4 | import 'package:awesome_flutter_layouts/const/strings.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:http/http.dart' as http; 7 | 8 | class CustomListView extends StatefulWidget { 9 | @override 10 | _CustomListViewState createState() => _CustomListViewState(); 11 | } 12 | 13 | class _CustomListViewState extends State { 14 | bool isLoading = true; 15 | var data; 16 | @override 17 | void initState() { 18 | fetchRandomData(); 19 | super.initState(); 20 | } 21 | 22 | Future fetchRandomData() async { 23 | final http.Response response = await http.get(Uri.parse(RANDOM_URL)); 24 | if (response.statusCode == 200) { 25 | final body = jsonDecode(response.body); 26 | data = body['results']; 27 | setState(() { 28 | isLoading = false; 29 | }); 30 | } 31 | } 32 | 33 | Widget designerTab() { 34 | return Container( 35 | padding: const EdgeInsets.only(left: 10, right: 10), 36 | child: isLoading == true 37 | ? const Center( 38 | child: CircularProgressIndicator(), 39 | ) 40 | : ListView.builder( 41 | itemCount: data.length, //total no of list items 42 | itemBuilder: (BuildContext context, int currentitem) { 43 | return GestureDetector( 44 | onTap: () {}, 45 | child: Container( 46 | decoration: BoxDecoration( 47 | gradient: LinearGradient( 48 | colors: colors[currentitem % colors.length]), 49 | borderRadius: BorderRadius.circular(20), 50 | boxShadow: const [ 51 | BoxShadow( 52 | color: Colors.black54, 53 | blurRadius: 3.5, 54 | offset: Offset(1.0, 2.0)), 55 | ], 56 | ), 57 | margin: const EdgeInsets.only( 58 | top: 10, left: 20, right: 20, bottom: 10), 59 | height: MediaQuery.of(context).size.height / 4.5, 60 | child: Row( 61 | children: [ 62 | Expanded( 63 | //left half image avtar of listitem 64 | flex: 4, 65 | child: Container( 66 | alignment: Alignment.topLeft, 67 | margin: const EdgeInsets.only(left: 20, top: 15), 68 | child: CircleAvatar( 69 | backgroundImage: NetworkImage( 70 | data[currentitem]['picture']['medium']), 71 | radius: 30, 72 | ), 73 | ), 74 | ), 75 | Expanded( 76 | //center of listitem 77 | flex: 9, 78 | child: Container( 79 | alignment: Alignment.center, 80 | margin: const EdgeInsets.all(5), 81 | padding: const EdgeInsets.only(top: 20, left: 5), 82 | child: Column( 83 | children: [ 84 | Expanded( 85 | flex: 4, 86 | child: Container( 87 | alignment: Alignment.centerLeft, 88 | child: Column( 89 | crossAxisAlignment: 90 | CrossAxisAlignment.start, 91 | children: [ 92 | Text( 93 | data[currentitem]['name']['first'] 94 | .toString() + 95 | ' ' + 96 | data[currentitem]['name'] 97 | ['last'] 98 | .toString(), 99 | style: 100 | const TextStyle(fontSize: 18), 101 | ), 102 | Text(data[currentitem]['phone'] 103 | .toString()) 104 | ], 105 | ), 106 | )), 107 | Expanded( 108 | flex: 3, 109 | child: Container( 110 | child: Row( 111 | children: [ 112 | Expanded( 113 | flex: 1, 114 | child: Container( 115 | child: Column( 116 | children: [ 117 | Text('$currentitem\43'), 118 | Text('Popularity', 119 | style: subHeadingTextStyle) 120 | ], 121 | )), 122 | ), 123 | Expanded( 124 | flex: 1, 125 | child: Container( 126 | child: Column( 127 | children: [ 128 | Text('$currentitem\433'), 129 | Text( 130 | 'Like', 131 | style: subHeadingTextStyle, 132 | ) 133 | ], 134 | )), 135 | ), 136 | Expanded( 137 | flex: 1, 138 | child: Container( 139 | child: Column( 140 | children: [ 141 | Text('$currentitem\4333'), 142 | Text( 143 | 'Followed', 144 | style: subHeadingTextStyle, 145 | ) 146 | ], 147 | )), 148 | ) 149 | ], 150 | ), 151 | ), 152 | ) 153 | ], 154 | ), 155 | ), 156 | ), 157 | Expanded( 158 | //right half of listitem 159 | flex: 3, 160 | child: Container( 161 | child: Column( 162 | children: [ 163 | IconButton( 164 | icon: const Icon(Icons.more_horiz), 165 | onPressed: () {}, 166 | ), 167 | Text( 168 | '$currentitem', 169 | style: const TextStyle(fontSize: 22), 170 | ), 171 | const Text('Ranking') 172 | ], 173 | ), 174 | ), 175 | ), 176 | ], 177 | ), 178 | ), 179 | ); 180 | }, 181 | ), 182 | ); 183 | } 184 | 185 | @override 186 | Widget build(BuildContext context) { 187 | return DefaultTabController( 188 | length: 3, 189 | child: Scaffold( 190 | body: Column( 191 | children: [ 192 | Container( 193 | height: 80, 194 | decoration: const BoxDecoration( 195 | gradient: LinearGradient( 196 | colors: [Colors.purpleAccent, Colors.purple], 197 | ), 198 | ), 199 | child: Container( 200 | padding: const EdgeInsets.only( 201 | left: 5, 202 | right: 5, 203 | ), 204 | child: Row( 205 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 206 | children: [ 207 | IconButton( 208 | icon: 209 | const Icon(Icons.arrow_back, color: Colors.white), 210 | onPressed: () { 211 | Navigator.pop(context); 212 | }, 213 | ), 214 | IconButton( 215 | icon: const Icon(Icons.menu, color: Colors.white), 216 | onPressed: () {}) 217 | ], 218 | ), 219 | )), 220 | Container( 221 | height: 50, 222 | decoration: const BoxDecoration( 223 | gradient: LinearGradient( 224 | colors: [Colors.purpleAccent, Colors.purple], 225 | ), 226 | ), 227 | child: TabBar( 228 | tabs: List.generate(tabBarTitle.length, (index) { 229 | return Tab( 230 | child: Text(tabBarTitle[index]), 231 | ); 232 | })), 233 | ), 234 | Expanded( 235 | child: TabBarView( 236 | children: [ 237 | designerTab(), 238 | Container( 239 | color: Colors.green, 240 | alignment: Alignment.center, 241 | child: const Text('Yet to Build'), 242 | ), 243 | Container( 244 | color: Colors.red, 245 | alignment: Alignment.center, 246 | child: const Text('Build something Awesome'), 247 | ), 248 | ], 249 | ), 250 | ) 251 | ], 252 | ), 253 | )); 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /lib/EndDrawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'const/const.dart'; 3 | 4 | class AwesomeEndDrawer extends StatefulWidget { 5 | @override 6 | _AwesomeEndDrawerState createState() => _AwesomeEndDrawerState(); 7 | } 8 | 9 | class _AwesomeEndDrawerState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | endDrawer: Container( 14 | width: (MediaQuery.of(context).size.width / 100) * 80, 15 | child: Stack( 16 | children: [ 17 | // background of the drawer 18 | Align( 19 | alignment: Alignment.topRight, 20 | child: Container( 21 | width: (MediaQuery.of(context).size.width / 100) * 75, 22 | decoration: BoxDecoration( 23 | gradient: LinearGradient( 24 | begin: Alignment.topCenter, 25 | end: Alignment.bottomCenter, 26 | colors: [Colors.black87, Colors.grey.shade800], 27 | ), 28 | ), 29 | ), 30 | ), 31 | 32 | Positioned( 33 | left: 0, 34 | right: 0, 35 | top: (MediaQuery.of(context).size.height / 100) * 10, 36 | bottom: 0, 37 | child: Container( 38 | // color: Colors.red, 39 | child: ListView( 40 | children: List.generate(30, (x) { 41 | return Container( 42 | //color: Colors.green, 43 | child: Row( 44 | children: [ 45 | Expanded( 46 | flex: 1, 47 | child: Stack( 48 | children: [ 49 | Container( 50 | height: 50, 51 | width: 50, 52 | margin: const EdgeInsets.only( 53 | top: 40, 54 | ), 55 | decoration: const BoxDecoration( 56 | shape: BoxShape.circle, 57 | color: Colors.white), 58 | padding: const EdgeInsets.all(5), 59 | child: CircleAvatar( 60 | backgroundImage: 61 | NetworkImage('${imageurl[0]}'), 62 | radius: 40, 63 | backgroundColor: Colors.grey, 64 | ), 65 | ), 66 | ], 67 | )), 68 | Expanded( 69 | flex: 5, 70 | child: Container( 71 | height: 130, 72 | width: 150, 73 | margin: const EdgeInsets.symmetric( 74 | horizontal: 10, vertical: 10), 75 | decoration: BoxDecoration( 76 | boxShadow: [ 77 | BoxShadow( 78 | offset: const Offset(0, 5.0), 79 | blurRadius: 2.0, 80 | color: colors[0][0], 81 | ) 82 | ], 83 | color: colors[0][0], 84 | borderRadius: BorderRadius.circular(10)), 85 | child: Column( 86 | children: [ 87 | Expanded( 88 | flex: 2, 89 | child: Row( 90 | mainAxisAlignment: 91 | MainAxisAlignment.spaceBetween, 92 | children: [ 93 | Container( 94 | padding: const EdgeInsets.all(10), 95 | child: const Text( 96 | 'John Doe', 97 | style: TextStyle(color: Colors.white), 98 | ), 99 | ), 100 | Container( 101 | padding: const EdgeInsets.all(10), 102 | child: const Text( 103 | '18:50', 104 | style: TextStyle(color: Colors.white), 105 | ), 106 | ), 107 | ], 108 | ), 109 | ), 110 | Expanded( 111 | flex: 4, 112 | child: Container( 113 | padding: const EdgeInsets.all(10), 114 | child: const Text( 115 | SOMETEXT, 116 | style: TextStyle(color: Colors.white), 117 | ), 118 | ), 119 | ) 120 | ], 121 | ), 122 | ), 123 | ) 124 | ], 125 | ), 126 | ); 127 | })), 128 | ), 129 | ), 130 | Align( 131 | alignment: Alignment.topRight, 132 | child: Row( 133 | mainAxisAlignment: MainAxisAlignment.end, 134 | children: [ 135 | Container( 136 | width: (MediaQuery.of(context).size.width / 100) * 75, 137 | height: (MediaQuery.of(context).size.height / 100) * 10, 138 | color: Colors.transparent, 139 | alignment: Alignment.center, 140 | child: Padding( 141 | padding: EdgeInsets.only( 142 | top: (MediaQuery.of(context).size.height / 100) * 3), 143 | child: const Text( 144 | 'TITLE', 145 | style: TextStyle(color: Colors.white), 146 | ), 147 | ), 148 | ), 149 | ], 150 | ), 151 | ), 152 | ], 153 | ), 154 | ), 155 | appBar: AppBar( 156 | actions: [ 157 | Builder( 158 | builder: (context) => IconButton( 159 | icon: const Icon(Icons.menu), 160 | onPressed: () => Scaffold.of(context).openEndDrawer(), 161 | tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip, 162 | ), 163 | ), 164 | ], 165 | leading: const BackButton(), 166 | automaticallyImplyLeading: true, 167 | ), 168 | body: Container( 169 | child: const Center( 170 | child: Text('Tap the Menu on Top Right'), 171 | ), 172 | ), 173 | ); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /lib/UserProfile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class UserProfile extends StatefulWidget { 4 | @override 5 | _UserProfileState createState() => _UserProfileState(); 6 | } 7 | 8 | class _UserProfileState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar( 13 | backgroundColor: Colors.white, 14 | elevation: 1.5, 15 | leading: Builder( 16 | builder: (context) => IconButton( 17 | icon: Icon( 18 | Icons.arrow_back_ios, 19 | color: Colors.orange[600], 20 | ), 21 | onPressed: () => Navigator.of(context).pop()), 22 | ), 23 | ), 24 | body: Column( 25 | children: [ 26 | Expanded( 27 | flex: 1, 28 | child: Container( 29 | width: double.infinity, 30 | padding: const EdgeInsets.all(10), 31 | child: Card( 32 | elevation: 1.5, 33 | child: Column( 34 | children: [ 35 | Expanded( 36 | flex: 3, 37 | child: Container( 38 | height: 150, 39 | width: 150, 40 | margin: const EdgeInsets.only(top: 10), 41 | decoration: const BoxDecoration( 42 | shape: BoxShape.circle, 43 | color: Colors.orangeAccent), 44 | padding: const EdgeInsets.all(5), 45 | child: CircleAvatar( 46 | minRadius: 18, 47 | backgroundColor: Colors.white, 48 | child: Image.asset( 49 | 'assets/images/profile_pic.png', 50 | fit: BoxFit.fill, 51 | ), 52 | ), 53 | ), 54 | ), 55 | Expanded( 56 | flex: 1, 57 | child: Container( 58 | alignment: Alignment.center, 59 | child: const Text( 60 | 'Mr Hudson', 61 | style: TextStyle(fontSize: 20), 62 | ), 63 | ), 64 | ), 65 | Expanded( 66 | flex: 5, 67 | child: Container( 68 | padding: const EdgeInsets.all(10), 69 | child: Row( 70 | children: [ 71 | Expanded( 72 | flex: 1, 73 | child: Container( 74 | child: Column( 75 | children: [ 76 | Expanded( 77 | flex: 1, 78 | child: Container( 79 | alignment: Alignment.center, 80 | child: Icon( 81 | Icons.calendar_today, 82 | color: Colors.orange[600]), 83 | ), 84 | ), 85 | Expanded( 86 | flex: 1, 87 | child: Container( 88 | alignment: Alignment.center, 89 | child: Icon(Icons.store, 90 | color: Colors.orange[600]), 91 | ), 92 | ), 93 | Expanded( 94 | flex: 1, 95 | child: Container( 96 | alignment: Alignment.center, 97 | child: Icon( 98 | Icons.location_city, 99 | color: Colors.orange[600], 100 | ), 101 | ), 102 | ), 103 | Expanded( 104 | flex: 1, 105 | child: Container(), 106 | ) 107 | ], 108 | ), 109 | ), 110 | ), 111 | Expanded( 112 | flex: 3, 113 | child: Column( 114 | children: [ 115 | Expanded( 116 | flex: 1, 117 | child: Container( 118 | alignment: Alignment.centerLeft, 119 | child: const Text( 120 | 'Date Of Birth:', 121 | style: TextStyle(fontSize: 16), 122 | ), 123 | ), 124 | ), 125 | Expanded( 126 | flex: 1, 127 | child: Container( 128 | alignment: Alignment.centerLeft, 129 | child: const Text( 130 | 'Shop Name:', 131 | style: TextStyle( 132 | fontSize: 16, 133 | ), 134 | ), 135 | ), 136 | ), 137 | Expanded( 138 | flex: 1, 139 | child: Container( 140 | alignment: Alignment.centerLeft, 141 | child: const Text( 142 | 'Address:', 143 | style: TextStyle(fontSize: 16), 144 | ), 145 | ), 146 | ), 147 | Expanded( 148 | flex: 1, 149 | child: Container(), 150 | ) 151 | ], 152 | ), 153 | ), 154 | Expanded( 155 | flex: 4, 156 | child: Container( 157 | child: Column( 158 | children: [ 159 | Expanded( 160 | flex: 1, 161 | child: Container( 162 | alignment: Alignment.center, 163 | child: const Text( 164 | '26/01/1980', 165 | style: 166 | TextStyle(fontSize: 14), 167 | textAlign: TextAlign.justify, 168 | ), 169 | ), 170 | ), 171 | Expanded( 172 | flex: 1, 173 | child: Container( 174 | alignment: Alignment.center, 175 | child: const Text( 176 | "Hudson's Store", 177 | style: 178 | TextStyle(fontSize: 14), 179 | textAlign: TextAlign.justify, 180 | ), 181 | ), 182 | ), 183 | Expanded( 184 | flex: 1, 185 | child: Container( 186 | alignment: Alignment.center, 187 | child: const Text( 188 | 'West NewBerry Massachussets 1234', 189 | style: 190 | TextStyle(fontSize: 14), 191 | ), 192 | ), 193 | ), 194 | Expanded( 195 | flex: 1, 196 | child: Container(), 197 | ) 198 | ], 199 | ), 200 | ), 201 | ) 202 | ], 203 | )), 204 | ) 205 | ], 206 | )), 207 | )), 208 | Container( 209 | padding: const EdgeInsets.only( 210 | left: 20, right: 20, top: 10, bottom: 10), 211 | width: double.infinity, 212 | height: 70, 213 | child: MaterialButton( 214 | child: const Text('Edit Profile'), 215 | color: Colors.orangeAccent, 216 | onPressed: () {}, 217 | ), 218 | ) 219 | ], 220 | )); 221 | } 222 | } 223 | -------------------------------------------------------------------------------- /lib/blast_effect.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/scheduler.dart'; 5 | import 'package:provider/provider.dart'; 6 | 7 | class Particle { 8 | double x; 9 | double y; 10 | double size; 11 | Color color; 12 | double speedX; 13 | double speedY; 14 | double alpha; 15 | 16 | Particle({ 17 | required this.x, 18 | required this.y, 19 | required this.size, 20 | required this.color, 21 | required this.speedX, 22 | required this.speedY, 23 | required this.alpha, 24 | }); 25 | } 26 | 27 | class ParticleData extends ChangeNotifier { 28 | List particles = []; 29 | 30 | void createParticles(double x, double y) { 31 | const numberOfParticles = 50; 32 | for (int i = 0; i < numberOfParticles; i++) { 33 | final size = Random().nextDouble() * 5 + 2; 34 | final color = Color.fromRGBO( 35 | Random().nextInt(256), 36 | Random().nextInt(256), 37 | Random().nextInt(256), 38 | 1, 39 | ); 40 | final speedX = Random().nextDouble() * 4 - 2; 41 | final speedY = Random().nextDouble() * 4 - 2; 42 | particles.add( 43 | Particle( 44 | x: x, 45 | y: y, 46 | size: size, 47 | color: color, 48 | speedX: speedX, 49 | speedY: speedY, 50 | alpha: 1, 51 | ), 52 | ); 53 | } 54 | notifyListeners(); 55 | } 56 | 57 | void updateParticles() { 58 | for (int i = 0; i < particles.length; i++) { 59 | particles[i].x += particles[i].speedX; 60 | particles[i].y += particles[i].speedY; 61 | particles[i].alpha -= 0.02; 62 | 63 | if (particles[i].alpha <= 0) { 64 | particles.removeAt(i); 65 | i--; // Adjust index after removal 66 | } 67 | } 68 | notifyListeners(); 69 | } 70 | } 71 | 72 | class ParticleAnimationPage extends StatefulWidget { 73 | const ParticleAnimationPage({super.key}); 74 | 75 | @override 76 | State createState() => _ParticleAnimationPageState(); 77 | } 78 | 79 | class _ParticleAnimationPageState extends State 80 | with TickerProviderStateMixin { 81 | late Ticker _ticker; 82 | 83 | @override 84 | void initState() { 85 | super.initState(); 86 | _ticker = createTicker((elapsed) { 87 | Provider.of(context, listen: false).updateParticles(); 88 | }); 89 | _ticker.start(); 90 | } 91 | 92 | @override 93 | void dispose() { 94 | _ticker.dispose(); 95 | super.dispose(); 96 | } 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | return Scaffold( 101 | body: GestureDetector( 102 | onTapDown: (details) { 103 | Provider.of( 104 | context, 105 | listen: false, 106 | ).createParticles(details.localPosition.dx, details.localPosition.dy); 107 | }, 108 | child: Container( 109 | width: double.infinity, 110 | height: double.infinity, 111 | color: Colors.black, 112 | child: CustomPaint( 113 | painter: ParticlePainter( 114 | particles: Provider.of(context).particles, 115 | ), 116 | ), 117 | ), 118 | ), 119 | ); 120 | } 121 | } 122 | 123 | class ParticlePainter extends CustomPainter { 124 | final List particles; 125 | 126 | ParticlePainter({required this.particles}); 127 | 128 | @override 129 | void paint(Canvas canvas, Size size) { 130 | for (var particle in particles) { 131 | final paint = 132 | Paint() 133 | ..color = particle.color.withOpacity(particle.alpha) 134 | ..style = PaintingStyle.fill; 135 | canvas.drawCircle(Offset(particle.x, particle.y), particle.size, paint); 136 | } 137 | } 138 | 139 | @override 140 | bool shouldRepaint(covariant ParticlePainter oldDelegate) { 141 | return true; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /lib/bloc/bloc.dart: -------------------------------------------------------------------------------- 1 | abstract class Bloc { 2 | void dispose(); 3 | } 4 | -------------------------------------------------------------------------------- /lib/bloc/userbloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:awesome_flutter_layouts/bloc/bloc.dart'; 4 | import 'package:awesome_flutter_layouts/models/usermodel.dart'; 5 | 6 | class UserBloc extends Bloc { 7 | final userController = StreamController?>.broadcast(); 8 | 9 | @override 10 | void dispose() { 11 | userController.close(); 12 | } 13 | } 14 | 15 | UserBloc userBloc = UserBloc(); 16 | -------------------------------------------------------------------------------- /lib/clipmagic.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ClipPathTorchEffect extends StatefulWidget { 4 | const ClipPathTorchEffect({Key? key, this.title = 'Flutter Torch Effect'}) 5 | : super(key: key); 6 | final String title; 7 | 8 | @override 9 | _ClipPathTorchEffectState createState() => _ClipPathTorchEffectState(); 10 | } 11 | 12 | class _ClipPathTorchEffectState extends State { 13 | void _updateLocation(PointerEvent details) { 14 | _offsetNotifier.value = Offset(details.position.dx, details.position.dy); 15 | } 16 | 17 | final _offsetNotifier = ValueNotifier(const Offset(100, 100)); 18 | 19 | @override 20 | void dispose() { 21 | _offsetNotifier.dispose(); 22 | super.dispose(); 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | backgroundColor: Colors.black.withOpacity(0.9), 29 | body: ValueListenableBuilder( 30 | valueListenable: _offsetNotifier, 31 | builder: ( 32 | BuildContext context, 33 | Offset offset, 34 | Widget? child, 35 | ) { 36 | return MouseRegion( 37 | cursor: SystemMouseCursors.click, 38 | onHover: _updateLocation, 39 | child: Stack( 40 | alignment: Alignment.center, 41 | fit: StackFit.expand, 42 | children: [ 43 | Opacity(opacity: 0.5, child: ImageWidget()), 44 | ClipPath( 45 | clipper: CircleClipper( 46 | center: Offset(offset.dx, offset.dy), 47 | radius: 100, 48 | ), 49 | child: const CounterApp()), 50 | ], 51 | )); 52 | })); 53 | } 54 | } 55 | 56 | class ImageWidget extends StatelessWidget { 57 | ImageWidget({Key? key}) : super(key: key); 58 | final String image2 = 59 | 'https://images.unsplash.com/photo-1593642634402-b0eb5e2eebc9?ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2938&q=80'; 60 | 61 | @override 62 | Widget build(BuildContext context) { 63 | return Image.network( 64 | image2, 65 | fit: BoxFit.fitHeight, 66 | ); 67 | } 68 | } 69 | 70 | class CounterApp extends StatefulWidget { 71 | const CounterApp({Key? key}) : super(key: key); 72 | 73 | @override 74 | State createState() => _CounterAppState(); 75 | } 76 | 77 | class _CounterAppState extends State { 78 | int counter = 0; 79 | @override 80 | Widget build(BuildContext context) { 81 | return Scaffold( 82 | appBar: AppBar( 83 | title: const Text('Counter App'), 84 | ), 85 | body: Center( 86 | child: Column( 87 | mainAxisAlignment: MainAxisAlignment.center, 88 | children: [ 89 | const Text( 90 | 'You have pushed the button this many times:', 91 | ), 92 | Text( 93 | '$counter', 94 | style: Theme.of(context).textTheme.headlineMedium, 95 | ), 96 | ], 97 | ), 98 | ), 99 | floatingActionButton: FloatingActionButton( 100 | heroTag: 'Clip Magic', 101 | onPressed: () { 102 | setState(() { 103 | counter += 1; 104 | }); 105 | }, 106 | tooltip: 'Increment', 107 | child: const Icon(Icons.add), 108 | ), 109 | ); 110 | } 111 | } 112 | 113 | class CircleClipper extends CustomClipper { 114 | CircleClipper({required this.center, required this.radius}); 115 | final Offset center; 116 | final double radius; 117 | 118 | @override 119 | Path getClip(Size size) { 120 | return Path()..addOval(Rect.fromCircle(radius: radius, center: center)); 121 | } 122 | 123 | @override 124 | bool shouldReclip(covariant CustomClipper oldClipper) { 125 | return true; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/const/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const MaterialColor beachRed = MaterialColor( 4 | 0xfffe4a49, 5 | { 6 | 50: Color(0xfffe4a49), 7 | 100: Color(0xfffe4a49), 8 | 200: Color(0xfffe4a49), 9 | 300: Color(0xfffe4a49), 10 | 400: Color(0xfffe4a49), 11 | 500: Color(0xfffe4a49), 12 | 600: Color(0xfffe4a49), 13 | 700: Color(0xfffe4a49), 14 | 800: Color(0xfffe4a49), 15 | 900: Color(0xfffe4a49), 16 | }, 17 | ); 18 | 19 | Color white = Colors.white; 20 | -------------------------------------------------------------------------------- /lib/const/const.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/EndDrawer.dart'; 2 | import 'package:awesome_flutter_layouts/UserProfile.dart'; 3 | import 'package:awesome_flutter_layouts/blast_effect.dart'; 4 | import 'package:awesome_flutter_layouts/clipmagic.dart'; 5 | import 'package:awesome_flutter_layouts/darkmode.dart'; 6 | import 'package:awesome_flutter_layouts/demos/clock/pages/home_main.dart'; 7 | import 'package:awesome_flutter_layouts/search.dart'; 8 | import 'package:awesome_flutter_layouts/ultra_gradient.dart'; 9 | import 'package:flutter/material.dart'; 10 | 11 | import '../CustomListView.dart'; 12 | import '../multi_column_picker.dart'; 13 | 14 | // import your file here 15 | 16 | // Used for CustomListview 17 | 18 | List> colors = >[ 19 | [Colors.redAccent, Colors.red.shade200], 20 | [Colors.pinkAccent, Colors.pink.shade200], 21 | [Colors.orangeAccent, Colors.orange.shade200], 22 | [Colors.purpleAccent, Colors.purple.shade200], 23 | [Colors.cyanAccent, Colors.cyan.shade200], 24 | [Colors.yellowAccent, Colors.yellow.shade200], 25 | ]; 26 | 27 | List materialColors = [ 28 | Colors.amberAccent[100], 29 | const Color(0xffe6ee9c), 30 | Colors.green[300], 31 | Colors.teal[100], 32 | Colors.indigo[100], 33 | Colors.purple[100], 34 | Colors.pink[100], 35 | Colors.brown[100], 36 | Colors.orange[100], 37 | Colors.blueGrey[100], 38 | ]; 39 | TextStyle subHeadingTextStyle = const TextStyle( 40 | fontSize: 12, 41 | fontWeight: FontWeight.w500, 42 | ); 43 | // add your class name in this list 44 | 45 | List layoutList = [ 46 | CustomListView(), 47 | UserProfile(), 48 | AwesomeEndDrawer(), 49 | Search(), 50 | const BottomSheetApp(), 51 | const ClipPathTorchEffect(), 52 | const DarkBuilder(), 53 | const MyHomePage(), 54 | const UltraGradientDemo(title: 'Ultra Gradient'), 55 | const ParticleAnimationPage(), 56 | ]; 57 | 58 | // add a title to your awesome layout as an identity this will appear in the list View in main.dart 59 | 60 | const List layout_title = [ 61 | 'CustomListView', 62 | 'User Profile Page', 63 | 'Awesome end Drawer', 64 | 'Search As You Type', 65 | 'BottomSheets', 66 | 'ClipPath torch effect', 67 | 'Dark Transition', 68 | 'Clock Store', 69 | 'Ultra Gradient', 70 | 'Particle Blast Effect', 71 | ]; 72 | // getting Random user data 73 | const String RANDOM_URL = 'https://randomuser.me/api/?results=100'; 74 | 75 | // Used for AwesomeDrawer 76 | 77 | List imagetitle = ['Elon Musk']; 78 | List imageurl = [ 79 | 'https://everipedia-storage.s3-accelerate.amazonaws.com/ProfilePics/6969909036-1492880896.jpeg', 80 | 'https://i2.wp.com/allcelebrityprofile.com/wp-content/uploads/2015/01/rs_634x768-140902042341-634.Charlize-Theron-Modern-Luxury-JR4-90214-e1531525845675.jpg?fit=622%2C426&ssl=1', 81 | 'https://www.desicomments.com/wp-content/uploads/Smiling-Aditya-Roy-Kapur-236-5.jpg', 82 | ]; 83 | 84 | const SOMETEXT = 85 | 'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'; 86 | -------------------------------------------------------------------------------- /lib/const/strings.dart: -------------------------------------------------------------------------------- 1 | const List tabBarTitle = ['Designer', 'Category', 'Attention']; 2 | -------------------------------------------------------------------------------- /lib/darkmode.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class DarkBuilder extends StatefulWidget { 6 | const DarkBuilder({Key? key, this.title = 'DarkTransition'}) 7 | : super(key: key); 8 | 9 | final String title; 10 | 11 | @override 12 | _DarkBuilderState createState() => _DarkBuilderState(); 13 | } 14 | 15 | class _DarkBuilderState extends State { 16 | bool isDark = false; 17 | // void _updateCoOrdinates() { 18 | // final RenderBox box = key.currentContext?.findRenderObject() as RenderBox; 19 | // position = box.localToGlobal(Offset.zero); 20 | // setState(() {}); 21 | // } 22 | 23 | GlobalKey key = GlobalKey(); 24 | Offset position = Offset.zero; 25 | @override 26 | Widget build(BuildContext context) { 27 | final mediaQuery = MediaQuery.of(context); 28 | return DarkTransition( 29 | isDark: isDark, 30 | offset: Offset(mediaQuery.size.width - 20, mediaQuery.size.height - 20), 31 | duration: const Duration(milliseconds: 800), 32 | childBuilder: (context, int index) { 33 | return Scaffold( 34 | appBar: AppBar( 35 | title: Text(widget.title), 36 | ), 37 | floatingActionButton: FloatingActionButton( 38 | heroTag: 'item $index', 39 | onPressed: () { 40 | setState(() { 41 | isDark = !isDark; 42 | }); 43 | }, 44 | child: const Icon(Icons.add), 45 | ), 46 | body: Center( 47 | child: Column( 48 | mainAxisAlignment: MainAxisAlignment.center, 49 | children: [ 50 | const Text( 51 | 'You have pushed the button this many times:', 52 | ), 53 | Text( 54 | isDark ? 'DarkMode' : 'LightMode', 55 | style: const TextStyle(fontSize: 30), 56 | ), 57 | ], 58 | ), 59 | ), 60 | ); 61 | }); 62 | } 63 | } 64 | 65 | /// a widget that will transition between two widgets 66 | /// with the telegram effect 67 | class DarkTransition extends StatefulWidget { 68 | const DarkTransition( 69 | {required this.childBuilder, 70 | Key? key, 71 | this.offset = Offset.zero, 72 | this.themeController, 73 | this.radius, 74 | this.duration = const Duration(milliseconds: 400), 75 | this.isDark = false}) 76 | : super(key: key); 77 | 78 | /// Deinfe the widget that will be transitioned 79 | /// int index is either 1 or 2 to identify widgets, 2 is the top widget 80 | final Widget Function(BuildContext, int) childBuilder; 81 | 82 | /// the current state of the theme 83 | final bool isDark; 84 | 85 | /// optional animation controller to controll the animation 86 | final AnimationController? themeController; 87 | 88 | /// centeral point of the circular transition 89 | final Offset offset; 90 | 91 | /// optional radius of the circle defaults to [max(height,width)*1.5]) 92 | final double? radius; 93 | 94 | /// duration of animation defaults to 400ms 95 | final Duration? duration; 96 | 97 | @override 98 | _DarkTransitionState createState() => _DarkTransitionState(); 99 | } 100 | 101 | class _DarkTransitionState extends State 102 | with SingleTickerProviderStateMixin { 103 | @override 104 | void dispose() { 105 | _darkNotifier.dispose(); 106 | super.dispose(); 107 | } 108 | 109 | final _darkNotifier = ValueNotifier(false); 110 | 111 | @override 112 | void initState() { 113 | super.initState(); 114 | if (widget.themeController == null) { 115 | _animationController = 116 | AnimationController(vsync: this, duration: widget.duration); 117 | } else { 118 | _animationController = widget.themeController!; 119 | } 120 | } 121 | 122 | double _radius(Size size) { 123 | final maxVal = max(size.width, size.height); 124 | return maxVal * 1.5; 125 | } 126 | 127 | late AnimationController _animationController; 128 | double x = 0; 129 | double y = 0; 130 | bool isDark = false; 131 | // bool isBottomThemeDark = true; 132 | bool isDarkVisible = false; 133 | late double radius; 134 | Offset position = Offset.zero; 135 | 136 | ThemeData getTheme(bool dark) { 137 | if (dark) 138 | return ThemeData.dark(); 139 | else 140 | return ThemeData.light(); 141 | } 142 | 143 | @override 144 | void didUpdateWidget(DarkTransition oldWidget) { 145 | super.didUpdateWidget(oldWidget); 146 | _darkNotifier.value = widget.isDark; 147 | if (widget.isDark != oldWidget.isDark) { 148 | if (isDark) { 149 | _animationController.reverse(); 150 | _darkNotifier.value = false; 151 | } else { 152 | _animationController.reset(); 153 | _animationController.forward(); 154 | _darkNotifier.value = true; 155 | } 156 | position = widget.offset; 157 | } 158 | if (widget.radius != oldWidget.radius) { 159 | _updateRadius(); 160 | } 161 | if (widget.duration != oldWidget.duration) { 162 | _animationController.duration = widget.duration; 163 | } 164 | } 165 | 166 | @override 167 | void didChangeDependencies() { 168 | super.didChangeDependencies(); 169 | _updateRadius(); 170 | } 171 | 172 | void _updateRadius() { 173 | final size = MediaQuery.of(context).size; 174 | if (widget.radius == null) 175 | radius = _radius(size); 176 | else 177 | radius = widget.radius!; 178 | } 179 | 180 | @override 181 | Widget build(BuildContext context) { 182 | isDark = _darkNotifier.value; 183 | Widget _body(int index) { 184 | return ValueListenableBuilder( 185 | valueListenable: _darkNotifier, 186 | builder: (BuildContext context, bool isDark, Widget? child) { 187 | return Theme( 188 | data: index == 2 189 | ? getTheme(!isDarkVisible) 190 | : getTheme(isDarkVisible), 191 | child: widget.childBuilder(context, index)); 192 | }); 193 | } 194 | 195 | return AnimatedBuilder( 196 | animation: _animationController, 197 | builder: (BuildContext context, Widget? child) { 198 | return Stack( 199 | children: [ 200 | _body(1), 201 | ClipPath( 202 | clipper: CircularClipper( 203 | _animationController.value * radius, position), 204 | child: _body(2)), 205 | ], 206 | ); 207 | }); 208 | } 209 | } 210 | 211 | class CircularClipper extends CustomClipper { 212 | const CircularClipper(this.radius, this.center); 213 | final double radius; 214 | final Offset center; 215 | 216 | @override 217 | Path getClip(Size size) { 218 | final Path path = Path(); 219 | path.addOval(Rect.fromCircle(radius: radius, center: center)); 220 | return path; 221 | } 222 | 223 | @override 224 | bool shouldReclip(covariant CustomClipper oldClipper) { 225 | return true; 226 | } 227 | } 228 | -------------------------------------------------------------------------------- /lib/demos/clock/constants/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const Color pink = Color(0xffF39396); 4 | const Color lightPink = Color(0xffFDEDED); 5 | const Color black = Color(0xff101221); 6 | const Color clockGrey = Color(0XFFFAFAFA); 7 | const Color grey = Color.fromARGB(255, 248, 243, 243); 8 | const Color ratingsYellow = Color(0XFFFFC107); 9 | const Color lightGrey = Color(0XFF101221); 10 | -------------------------------------------------------------------------------- /lib/demos/clock/constants/const.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/pages/detail.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | const double size_sm_4 = 4.0; 6 | const double size_md_6 = 6.0; 7 | const double size_lg_14 = 14.0; 8 | const double size_ex_lg_24 = 24.0; 9 | const double circle_radius = 12.0; 10 | 11 | BoxShadow shadowLight = const BoxShadow( 12 | color: grey, blurRadius: 5, spreadRadius: 1, offset: Offset(0, 1)); 13 | 14 | BoxShadow searchShadow = BoxShadow( 15 | color: Colors.black.withOpacity(0.1), 16 | blurRadius: size_ex_lg_24, 17 | spreadRadius: 0, 18 | offset: const Offset(0, 6)); 19 | 20 | BorderRadius defaultRadius = BorderRadius.circular(circle_radius); 21 | 22 | /// sample data for clocks 23 | List clocks = [ 24 | ClockModel( 25 | 'Digital Clock', 26 | description, 27 | price: 200, 28 | rating: 2, 29 | material: ClockMaterial.metal, 30 | image: '$assetsPath/clock_dark.png', 31 | type: Type.digital, 32 | ), 33 | ClockModel( 34 | 'Analog Clock', 35 | description, 36 | rating: 1, 37 | price: 200, 38 | type: Type.analog, 39 | ), 40 | ClockModel( 41 | 'Digital Clock', 42 | description, 43 | price: 200, 44 | rating: 3, 45 | image: '$assetsPath/minimal_pink.png', 46 | type: Type.digital, 47 | ), 48 | ClockModel( 49 | 'Analog Clock', 50 | description, 51 | price: 200, 52 | rating: 4, 53 | material: ClockMaterial.metal, 54 | image: '$assetsPath/clock_dark_pink.png', 55 | type: Type.analog, 56 | ), 57 | ClockModel( 58 | 'Digital Clock', 59 | description, 60 | price: 200, 61 | rating: 5, 62 | image: '$assetsPath/clock_dark_pink.png', 63 | type: Type.digital, 64 | ), 65 | ClockModel( 66 | 'Analog Clock', 67 | description, 68 | price: 200, 69 | rating: 3, 70 | image: '$assetsPath/clock_dark_pink.png', 71 | type: Type.analog, 72 | ), 73 | ]; 74 | -------------------------------------------------------------------------------- /lib/demos/clock/constants/constants.dart: -------------------------------------------------------------------------------- 1 | library constants; 2 | 3 | export 'colors.dart'; 4 | export 'const.dart'; 5 | export 'strings.dart'; 6 | -------------------------------------------------------------------------------- /lib/demos/clock/constants/strings.dart: -------------------------------------------------------------------------------- 1 | const String assetsPath = 'assets/clock_demo'; 2 | 3 | final List tabs = [ 4 | 'Clocks', 5 | 'Watches', 6 | 'Jewelry', 7 | 'Lamps', 8 | 'Paintings' 9 | ]; 10 | 11 | const String description = 12 | 'A classically designed analog clock that would add to the decor of your house. Analog clock has hour, minutes and seconds hands.'; 13 | -------------------------------------------------------------------------------- /lib/demos/clock/pages/cart.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/lib/demos/clock/pages/cart.dart -------------------------------------------------------------------------------- /lib/demos/clock/pages/detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/widgets/appbar.dart'; 3 | import 'package:awesome_flutter_layouts/demos/clock/widgets/carousel_indicator.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class ClockDetail extends StatefulWidget { 8 | const ClockDetail({required this.heroTag, required this.clock, Key? key}) 9 | : super(key: key); 10 | final String heroTag; 11 | final ClockModel clock; 12 | 13 | @override 14 | ClockDetailState createState() => ClockDetailState(); 15 | } 16 | 17 | class ClockDetailState extends State { 18 | int carouselIndex = 0; 19 | int carouselCount = 3; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | final size = MediaQuery.of(context).size; 24 | return Material( 25 | child: SingleChildScrollView( 26 | child: Column( 27 | children: [ 28 | SizedBox( 29 | height: size.height * 0.5, 30 | child: Stack( 31 | children: [ 32 | Hero( 33 | tag: widget.heroTag, 34 | child: PageView( 35 | onPageChanged: (x) { 36 | setState(() { 37 | carouselIndex = x; 38 | }); 39 | }, 40 | children: [ 41 | for (int i = 0; i < carouselCount; i++) 42 | Container( 43 | margin: const EdgeInsets.all(size_md_6), 44 | height: size.height * 0.5, 45 | decoration: BoxDecoration( 46 | image: const DecorationImage( 47 | image: AssetImage( 48 | '$assetsPath/clock_home.png'), 49 | fit: BoxFit.cover), 50 | borderRadius: 51 | BorderRadius.circular(circle_radius * 4)), 52 | ), 53 | ], 54 | ), 55 | ), 56 | Column( 57 | children: [ 58 | const SizedBox( 59 | height: size_md_6 * 4, 60 | ), 61 | Padding( 62 | padding: const EdgeInsets.symmetric( 63 | vertical: size_lg_14, horizontal: size_md_6 * 3), 64 | child: ClockBar( 65 | leading: const BackButton( 66 | color: Colors.white, 67 | ), 68 | trailing: Icon(CupertinoIcons.heart_fill, 69 | color: Colors.white.withOpacity(0.69)), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ], 75 | ), 76 | ), 77 | const SizedBox( 78 | height: size_md_6, 79 | ), 80 | CarouselIndicator( 81 | count: 3, 82 | currentIndex: carouselIndex, 83 | ), 84 | Padding( 85 | padding: const EdgeInsets.all(size_ex_lg_24), 86 | child: Row( 87 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 88 | children: [ 89 | Text( 90 | widget.clock.title, 91 | style: Theme.of(context).textTheme.displaySmall, 92 | ), 93 | Text( 94 | '\$${widget.clock.price}', 95 | style: Theme.of(context) 96 | .textTheme 97 | .headlineSmall! 98 | .copyWith(color: pink), 99 | ) 100 | ], 101 | ), 102 | ), 103 | Padding( 104 | padding: const EdgeInsets.symmetric(horizontal: size_ex_lg_24), 105 | child: RatingsIndicator( 106 | rating: widget.clock.rating, 107 | )), 108 | Padding( 109 | padding: const EdgeInsets.symmetric( 110 | vertical: size_md_6 * 2, horizontal: size_ex_lg_24), 111 | child: Text( 112 | widget.clock.description, 113 | style: const TextStyle(height: 2), 114 | ), 115 | ), 116 | Padding( 117 | padding: const EdgeInsets.symmetric( 118 | horizontal: size_ex_lg_24, vertical: size_lg_14), 119 | child: Row( 120 | children: [ 121 | KChip( 122 | label: widget.clock.type.name, 123 | category: 'Type', 124 | ), 125 | KChip( 126 | label: widget.clock.material.name, 127 | category: 'Material', 128 | ), 129 | ], 130 | ), 131 | ), 132 | KButton(onTap: () {}, label: 'Add to cart') 133 | ], 134 | ), 135 | ), 136 | ); 137 | } 138 | } 139 | 140 | class KButton extends StatefulWidget { 141 | 142 | const KButton( 143 | {required this.onTap, required this.label, Key? key, 144 | this.height = size_ex_lg_24 * 3, 145 | this.width = 350}) 146 | : super(key: key); 147 | final Function onTap; 148 | final String label; 149 | final double? width; 150 | final double? height; 151 | 152 | @override 153 | _KButtonState createState() => _KButtonState(); 154 | } 155 | 156 | class _KButtonState extends State { 157 | @override 158 | Widget build(BuildContext context) { 159 | return SizedBox( 160 | height: widget.height, 161 | width: widget.width, 162 | child: ElevatedButton( 163 | style: ButtonStyle( 164 | shape: WidgetStateProperty.all( 165 | RoundedRectangleBorder( 166 | borderRadius: BorderRadius.circular(size_ex_lg_24), 167 | )), 168 | elevation: WidgetStateProperty.all(0), 169 | backgroundColor: WidgetStateProperty.all(Colors.black)), 170 | onPressed: () => widget.onTap(), 171 | child: Text( 172 | widget.label, 173 | style: Theme.of(context) 174 | .textTheme 175 | .headlineMedium! 176 | .copyWith(color: Colors.white), 177 | ), 178 | ), 179 | ); 180 | } 181 | } 182 | 183 | class RatingsIndicator extends StatelessWidget { 184 | const RatingsIndicator( 185 | {required this.rating, Key? key, this.totalRatings = 10}) 186 | : super(key: key); 187 | final int rating; 188 | final int totalRatings; 189 | 190 | @override 191 | Widget build(BuildContext context) { 192 | return Row( 193 | children: [ 194 | for (int i = 0; i < 5; i++) 195 | Icon(Icons.star_sharp, 196 | size: 14, color: rating > i ? ratingsYellow : Colors.grey), 197 | const SizedBox(width: size_md_6), 198 | Text('$rating/5'), 199 | Text('($totalRatings)'), 200 | ], 201 | ); 202 | } 203 | } 204 | 205 | enum Type { digital, analog } 206 | enum ClockMaterial { plastic, metal } 207 | 208 | class ClockModel { 209 | 210 | ClockModel(this.title, this.description, 211 | {required this.rating, this.price = 200, 212 | this.material = ClockMaterial.plastic, 213 | this.image = '$assetsPath/clock_dark_pink.png', 214 | this.type = Type.analog}); 215 | final String title; 216 | final String description; 217 | final String image; 218 | final int price; 219 | final Type type; 220 | final ClockMaterial material; 221 | final int rating; 222 | } 223 | 224 | class KChip extends StatelessWidget { 225 | const KChip({required this.label, required this.category, Key? key}) 226 | : super(key: key); 227 | final String label; 228 | final String category; 229 | 230 | @override 231 | Widget build(BuildContext context) { 232 | return Column( 233 | crossAxisAlignment: CrossAxisAlignment.start, 234 | children: [ 235 | Text( 236 | category, 237 | style: Theme.of(context) 238 | .textTheme 239 | .headlineMedium! 240 | .copyWith(fontSize: 14, color: lightGrey), 241 | ), 242 | Chip( 243 | backgroundColor: lightPink, 244 | label: Text( 245 | label, 246 | style: const TextStyle(color: pink), 247 | )) 248 | ], 249 | ); 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /lib/demos/clock/pages/home_main.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/pages/navigation/cart.dart'; 3 | import 'package:awesome_flutter_layouts/demos/clock/pages/navigation/home.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | 7 | class MyHomePage extends StatefulWidget { 8 | const MyHomePage({Key? key}) : super(key: key); 9 | 10 | @override 11 | MyHomePageState createState() => MyHomePageState(); 12 | } 13 | 14 | class MyHomePageState extends State { 15 | int index = 0; 16 | final Color selectedColor = pink; 17 | @override 18 | Widget build(BuildContext context) { 19 | final List _items = [ 20 | BottomNavBarItem( 21 | child: 22 | Icon(Icons.home, color: index == 0 ? selectedColor : Colors.white), 23 | ), 24 | BottomNavBarItem( 25 | child: Icon(Icons.favorite, 26 | color: index == 1 ? selectedColor : Colors.white), 27 | ), 28 | BottomNavBarItem( 29 | child: Icon(Icons.shopping_basket_rounded, 30 | color: index == 2 ? selectedColor : Colors.white), 31 | ), 32 | BottomNavBarItem( 33 | child: Icon(Icons.person, 34 | color: index == 3 ? selectedColor : Colors.white), 35 | ), 36 | ]; 37 | return Theme( 38 | data: ThemeData( 39 | iconTheme: 40 | const IconThemeData(color: black, size: size_ex_lg_24 * 1.2), 41 | inputDecorationTheme: const InputDecorationTheme(iconColor: black), 42 | colorScheme: Theme.of(context).colorScheme.copyWith( 43 | primary: pink, 44 | ), 45 | textTheme: TextTheme( 46 | displayMedium: GoogleFonts.montserrat( 47 | fontSize: 34, fontWeight: FontWeight.bold, color: Colors.white), 48 | displaySmall: GoogleFonts.dmSans( 49 | fontSize: 24, fontWeight: FontWeight.w700, color: Colors.black), 50 | headlineMedium: GoogleFonts.dmSans( 51 | fontSize: 18, fontWeight: FontWeight.bold, color: black), 52 | headlineSmall: GoogleFonts.dmSans( 53 | fontSize: 16, fontWeight: FontWeight.w500, color: pink), 54 | )), 55 | child: Material( 56 | child: Stack( 57 | children: [ 58 | IndexedStack( 59 | index: index, 60 | children: [ 61 | const Home(), 62 | Container( 63 | alignment: Alignment.center, 64 | color: Colors.accents[index], 65 | child: const Text('Favourate'), 66 | ), 67 | const Cart(), 68 | Container( 69 | alignment: Alignment.center, 70 | color: Colors.accents[index], 71 | child: const Text('Profile'), 72 | ), 73 | ], 74 | ), 75 | Positioned( 76 | bottom: 20, 77 | left: 0, 78 | right: 0, 79 | child: KBottomNavigation( 80 | hasLabel: false, 81 | index: index, 82 | onChange: (x) { 83 | setState(() { 84 | index = x; 85 | }); 86 | }, 87 | children: _items), 88 | ) 89 | ], 90 | )), 91 | ); 92 | } 93 | } 94 | 95 | class KBottomNavigation extends StatefulWidget { 96 | 97 | const KBottomNavigation( 98 | {required this.children, required this.index, Key? key, 99 | this.onChange, 100 | this.hasLabel = false, 101 | this.backgroundColor = black}) 102 | : super(key: key); 103 | final List children; 104 | final Function(int)? onChange; 105 | final bool hasLabel; 106 | final Color backgroundColor; 107 | 108 | /// selected index; 109 | final int index; 110 | 111 | @override 112 | _KBottomNavigationState createState() => _KBottomNavigationState(); 113 | } 114 | 115 | class _KBottomNavigationState extends State { 116 | @override 117 | Widget build(BuildContext context) { 118 | return Container( 119 | margin: const EdgeInsets.symmetric(horizontal: 12), 120 | height: 70, 121 | decoration: BoxDecoration( 122 | borderRadius: defaultRadius * 2, color: widget.backgroundColor), 123 | child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ 124 | for (int i = 0; i < widget.children.length; i++) 125 | GestureDetector( 126 | onTap: () { 127 | widget.onChange?.call(i); 128 | }, 129 | child: Transform.scale( 130 | scale: i == widget.index ? 1.2 : 1, 131 | child: widget.children[i].child, 132 | ), 133 | ) 134 | ]), 135 | ); 136 | } 137 | } 138 | 139 | class BottomNavBarItem extends StatelessWidget { 140 | 141 | const BottomNavBarItem( 142 | {required this.child, Key? key, this.label, this.isSelected = false}) 143 | : super(key: key); 144 | final String? label; 145 | final Widget child; 146 | final bool isSelected; 147 | 148 | @override 149 | Widget build(BuildContext context) { 150 | return Column( 151 | children: [ 152 | child, 153 | if (label != null) 154 | Text( 155 | label!, 156 | style: Theme.of(context).textTheme.bodyLarge!.copyWith( 157 | color: isSelected ? Colors.white : Colors.white, 158 | ), 159 | ), 160 | ], 161 | ); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /lib/demos/clock/pages/navigation/cart.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/pages/detail.dart'; 3 | import 'package:awesome_flutter_layouts/demos/clock/widgets/appbar.dart'; 4 | import 'package:awesome_flutter_layouts/demos/clock/widgets/widgets.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class Cart extends StatefulWidget { 8 | const Cart({Key? key}) : super(key: key); 9 | 10 | @override 11 | _CartState createState() => _CartState(); 12 | } 13 | 14 | class _CartState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Material( 18 | child: Padding( 19 | padding: const EdgeInsets.symmetric(horizontal: size_md_6 * 3), 20 | child: Column( 21 | children: [ 22 | const SizedBox( 23 | height: size_md_6 * 8, 24 | ), 25 | Padding( 26 | padding: const EdgeInsets.symmetric(vertical: size_md_6), 27 | child: ClockBar( 28 | title: Text( 29 | 'Cart', 30 | style: Theme.of(context) 31 | .textTheme 32 | .headlineMedium! 33 | .copyWith(fontSize: 20), 34 | ), 35 | ), 36 | ), 37 | Expanded( 38 | flex: 3, 39 | child: ListView.builder( 40 | padding: EdgeInsets.zero, 41 | itemCount: clocks.length, 42 | itemBuilder: (_, index) { 43 | return Padding( 44 | padding: const EdgeInsets.symmetric( 45 | horizontal: size_sm_4, vertical: size_md_6 * 2), 46 | child: CartListTile( 47 | clock: clocks[index], 48 | ), 49 | ); 50 | })), 51 | const Padding( 52 | padding: EdgeInsets.symmetric(vertical: 8.0), 53 | child: Divider(), 54 | ), 55 | Expanded( 56 | flex: 2, 57 | child: Column( 58 | children: [ 59 | Padding( 60 | padding: const EdgeInsets.all(size_ex_lg_24), 61 | child: Row( 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | Text( 65 | 'Total', 66 | style: Theme.of(context).textTheme.headlineMedium, 67 | ), 68 | Text( 69 | '\$1072', 70 | style: Theme.of(context) 71 | .textTheme 72 | .headlineSmall! 73 | .copyWith( 74 | color: pink, 75 | fontWeight: FontWeight.w700, 76 | fontSize: 20), 77 | ) 78 | ], 79 | ), 80 | ), 81 | KButton( 82 | width: 200, 83 | onTap: () {}, 84 | label: 'Checkout', 85 | ), 86 | ], 87 | ), 88 | ) 89 | ], 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | 96 | class CartListTile extends StatelessWidget { 97 | const CartListTile({required this.clock, Key? key}) : super(key: key); 98 | final ClockModel clock; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | return Container( 103 | height: 120, 104 | decoration: BoxDecoration( 105 | borderRadius: BorderRadius.circular(size_ex_lg_24), 106 | color: Colors.white, 107 | boxShadow: [shadowLight]), 108 | child: Row( 109 | crossAxisAlignment: CrossAxisAlignment.center, 110 | children: [ 111 | Container( 112 | height: size_ex_lg_24 * 3, 113 | width: size_ex_lg_24 * 3, 114 | margin: const EdgeInsets.all(size_md_6 * 2), 115 | padding: const EdgeInsets.all(size_md_6 * 2), 116 | decoration: BoxDecoration( 117 | color: clockGrey, 118 | borderRadius: BorderRadius.circular(size_ex_lg_24 * 0.5)), 119 | child: Image.asset(clock.image)), 120 | Expanded( 121 | child: Row( 122 | crossAxisAlignment: CrossAxisAlignment.center, 123 | children: [ 124 | Expanded( 125 | child: Column( 126 | mainAxisAlignment: MainAxisAlignment.center, 127 | crossAxisAlignment: CrossAxisAlignment.start, 128 | children: [ 129 | RichText( 130 | text: TextSpan( 131 | style: Theme.of(context) 132 | .textTheme 133 | .headlineSmall! 134 | .copyWith(color: black), 135 | children: [ 136 | TextSpan(text: clock.title), 137 | TextSpan( 138 | text: ' 1x', 139 | style: Theme.of(context) 140 | .textTheme 141 | .headlineSmall! 142 | .copyWith(color: Colors.grey)) 143 | ]), 144 | ), 145 | const SizedBox( 146 | height: 2, 147 | ), 148 | Text('\$${clock.price}', 149 | style: Theme.of(context).textTheme.headlineSmall!.copyWith( 150 | color: pink, 151 | fontWeight: FontWeight.w700, 152 | )), 153 | ], 154 | ), 155 | ), 156 | SizedBox( 157 | height: 50, 158 | width: 50, 159 | child: KIcon( 160 | const Icon(Icons.delete, size: 20, color: Colors.grey), 161 | onTap: () {})) 162 | ], 163 | )), 164 | const SizedBox( 165 | width: 10, 166 | ) 167 | ], 168 | ), 169 | ); 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /lib/demos/clock/pages/navigation/favourate.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/lib/demos/clock/pages/navigation/favourate.dart -------------------------------------------------------------------------------- /lib/demos/clock/pages/navigation/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/pages/detail.dart'; 3 | import 'package:awesome_flutter_layouts/demos/clock/widgets/appbar.dart'; 4 | import 'package:awesome_flutter_layouts/demos/clock/widgets/gridtile.dart'; 5 | import 'package:awesome_flutter_layouts/demos/clock/widgets/new_header.dart'; 6 | import 'package:awesome_flutter_layouts/demos/clock/widgets/search.dart'; 7 | import 'package:awesome_flutter_layouts/demos/clock/widgets/tabbar.dart'; 8 | import 'package:awesome_flutter_layouts/demos/clock/widgets/widgets.dart'; 9 | import 'package:flutter/material.dart'; 10 | 11 | class Home extends StatefulWidget { 12 | const Home({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _HomeState(); 16 | } 17 | 18 | class _HomeState extends State { 19 | late String selected; 20 | @override 21 | void initState() { 22 | selected = tabs[0]; 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return GestureDetector( 28 | onTap: () => FocusScope.of(context).unfocus(), 29 | child: Material( 30 | child: SingleChildScrollView( 31 | child: Column( 32 | children: [ 33 | const SizedBox( 34 | height: size_md_6 * 4, 35 | ), 36 | Padding( 37 | padding: const EdgeInsets.symmetric( 38 | vertical: size_lg_14, horizontal: size_md_6 * 3), 39 | child: ClockBar( 40 | leading: const LeadingIconBuilder(), 41 | trailing: KIcon( 42 | Image.asset( 43 | '$assetsPath/bell.png', 44 | height: size_md_6 * 4, 45 | ), 46 | onTap: () {}, 47 | label: '24', 48 | ), 49 | ), 50 | ), 51 | SearchBuilder( 52 | hint: 'Search product', 53 | leadingIcon: IconButton( 54 | onPressed: () {}, 55 | icon: Image.asset( 56 | '$assetsPath/search.jpg', 57 | height: size_sm_4 * 8, 58 | )), 59 | trailingIcon: Container( 60 | width: size_md_6 * 1.2, 61 | height: size_md_6 * 1.2, 62 | margin: const EdgeInsets.all(size_md_6), 63 | decoration: BoxDecoration( 64 | color: pink, 65 | borderRadius: BorderRadius.circular(size_sm_4 * 3), 66 | ), 67 | alignment: Alignment.center, 68 | child: IconButton( 69 | onPressed: () {}, 70 | icon: const Icon( 71 | Icons.tune, 72 | color: Colors.white, 73 | )), 74 | ), 75 | ), 76 | Padding( 77 | padding: const EdgeInsets.symmetric(vertical: size_lg_14 * 2), 78 | child: HorizontalTabBuilder( 79 | tabs: tabs, 80 | selected: selected, 81 | onChange: (x) { 82 | setState(() { 83 | selected = x; 84 | }); 85 | }, 86 | ), 87 | ), 88 | NewArrivalsHeader( 89 | onTap: () {}, 90 | ), 91 | Padding( 92 | padding: const EdgeInsets.all(size_ex_lg_24), 93 | child: Row( 94 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 95 | children: [ 96 | Text( 97 | 'Popular Products 🔥', 98 | style: Theme.of(context).textTheme.headlineMedium, 99 | ), 100 | Text( 101 | 'See All', 102 | style: Theme.of(context) 103 | .textTheme 104 | .headlineSmall! 105 | .copyWith(color: pink), 106 | ) 107 | ], 108 | ), 109 | ), 110 | GridView.builder( 111 | shrinkWrap: true, 112 | itemCount: clocks.length, 113 | physics: const NeverScrollableScrollPhysics(), 114 | padding: const EdgeInsets.symmetric( 115 | horizontal: size_ex_lg_24, vertical: size_ex_lg_24) + 116 | const EdgeInsets.only( 117 | bottom: kBottomNavigationBarHeight * 1.5), 118 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 119 | childAspectRatio: 160 / 218, 120 | crossAxisCount: 2, 121 | mainAxisSpacing: 8, 122 | crossAxisSpacing: 6), 123 | itemBuilder: (_, index) { 124 | return Hero( 125 | tag: 'item $index', 126 | child: KGridTile( 127 | clock: clocks[index], 128 | onTap: () { 129 | Navigator.of(context).push(MaterialPageRoute( 130 | builder: (_) => ClockDetail( 131 | heroTag: 'item $index', 132 | clock: clocks[index], 133 | ))); 134 | }, 135 | ), 136 | ); 137 | }) 138 | ], 139 | ), 140 | )), 141 | ); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /lib/demos/clock/pages/navigation/profile.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/lib/demos/clock/pages/navigation/profile.dart -------------------------------------------------------------------------------- /lib/demos/clock/widgets/appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ClockBar extends StatefulWidget { 4 | const ClockBar({Key? key, this.title, this.leading, this.trailing}) 5 | : super(key: key); 6 | final Widget? title; 7 | final Widget? leading; 8 | final Widget? trailing; 9 | 10 | @override 11 | ClockBarState createState() => ClockBarState(); 12 | } 13 | 14 | class ClockBarState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Row( 18 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 19 | children: [ 20 | widget.leading ?? const SizedBox(), 21 | widget.title ?? const SizedBox(), 22 | widget.trailing ?? const SizedBox(), 23 | ], 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/demos/clock/widgets/carousel_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CarouselIndicator extends StatefulWidget { 5 | const CarouselIndicator( 6 | {required this.count, required this.currentIndex, Key? key, 7 | this.width = 20, 8 | this.height = 4}) 9 | : super(key: key); 10 | 11 | final double width; 12 | final double height; 13 | final int count; 14 | final int currentIndex; 15 | 16 | @override 17 | _CarouselIndicatorState createState() => _CarouselIndicatorState(); 18 | } 19 | 20 | class _CarouselIndicatorState extends State { 21 | @override 22 | Widget build(BuildContext context) { 23 | return Row( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | for (int i = 0; i < widget.count; i++) 27 | AnimatedContainer( 28 | duration: const Duration(milliseconds: 400), 29 | height: widget.height, 30 | margin: const EdgeInsets.symmetric(horizontal: size_sm_4), 31 | width: i == widget.currentIndex ? widget.width * 1.5 : widget.width, 32 | decoration: BoxDecoration( 33 | borderRadius: BorderRadius.circular(size_md_6), 34 | color: i == widget.currentIndex ? pink : Colors.grey, 35 | ), 36 | ) 37 | ], 38 | ); 39 | } 40 | } -------------------------------------------------------------------------------- /lib/demos/clock/widgets/gridtile.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/colors.dart'; 2 | import 'package:awesome_flutter_layouts/demos/clock/constants/const.dart'; 3 | import 'package:awesome_flutter_layouts/demos/clock/pages/detail.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class KGridTile extends StatelessWidget { 7 | const KGridTile( 8 | {required this.clock, Key? key, 9 | this.onTap, 10 | this.onAddToCart}) 11 | : super(key: key); 12 | 13 | final ClockModel clock; 14 | final Function? onTap; 15 | final Function(String)? onAddToCart; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return GestureDetector( 20 | onTap: () => onTap!(), 21 | child: Container( 22 | decoration: BoxDecoration( 23 | boxShadow: [shadowLight], 24 | color: Colors.white, 25 | borderRadius: defaultRadius), 26 | child: Column( 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | Expanded( 30 | child: Container( 31 | alignment: Alignment.center, 32 | margin: const EdgeInsets.all(2), 33 | child: Image.asset(clock.image), 34 | decoration: BoxDecoration( 35 | borderRadius: defaultRadius.copyWith( 36 | bottomLeft: Radius.zero, 37 | bottomRight: Radius.zero, 38 | ), 39 | color: clockGrey, 40 | ), 41 | ), 42 | ), 43 | Row( 44 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 45 | children: [ 46 | Column( 47 | crossAxisAlignment: CrossAxisAlignment.start, 48 | children: [ 49 | Padding( 50 | padding: const EdgeInsets.symmetric( 51 | horizontal: 10, vertical: 12), 52 | child: Text( 53 | clock.title, 54 | style: Theme.of(context) 55 | .textTheme 56 | .headlineMedium! 57 | .copyWith(fontSize: 14), 58 | ), 59 | ), 60 | Padding( 61 | padding: const EdgeInsets.symmetric( 62 | horizontal: 10, 63 | ) + 64 | const EdgeInsets.only(bottom: 10), 65 | child: Text( 66 | '\$${clock.price}', 67 | style: Theme.of(context).textTheme.headlineSmall, 68 | ), 69 | ) 70 | ], 71 | ), 72 | Container( 73 | width: 34, 74 | height: 34, 75 | decoration: BoxDecoration( 76 | color: Colors.black, 77 | borderRadius: BorderRadius.circular(6)), 78 | margin: const EdgeInsets.all(8), 79 | child: const Icon( 80 | Icons.add, 81 | color: Colors.white, 82 | ), 83 | ) 84 | ], 85 | ) 86 | ], 87 | ), 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/demos/clock/widgets/new_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class NewArrivalsHeader extends StatefulWidget { 5 | const NewArrivalsHeader({Key? key, this.onTap}) : super(key: key); 6 | final Function? onTap; 7 | 8 | @override 9 | _NewArrivalsHeaderState createState() => _NewArrivalsHeaderState(); 10 | } 11 | 12 | class _NewArrivalsHeaderState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return GestureDetector( 16 | onTap: () => widget.onTap!.call(), 17 | child: Stack( 18 | children: [ 19 | Padding( 20 | padding: const EdgeInsets.symmetric( 21 | vertical: size_md_6 * 3, 22 | ), 23 | child: Container( 24 | height: 160, 25 | margin: const EdgeInsets.symmetric(horizontal: size_ex_lg_24), 26 | decoration: BoxDecoration( 27 | color: pink, 28 | borderRadius: BorderRadius.circular(size_sm_4 * 8), 29 | ), 30 | ), 31 | ), 32 | Positioned( 33 | top: 60, 34 | left: size_ex_lg_24 * 2, 35 | child: Text('New\nArrivals', 36 | textAlign: TextAlign.center, 37 | style: Theme.of(context).textTheme.displayMedium), 38 | ), 39 | Positioned( 40 | top: 0, 41 | right: size_md_6 * 4, 42 | child: Image.asset( 43 | '$assetsPath/clock_dark.png', 44 | height: 160, 45 | )) 46 | ], 47 | )); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/demos/clock/widgets/search.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SearchBuilder extends StatefulWidget { 5 | 6 | const SearchBuilder( 7 | {Key? key, 8 | this.leadingIcon, 9 | this.trailingIcon, 10 | this.hint = 'Search', 11 | this.onChange, 12 | this.controller}) 13 | : super(key: key); 14 | final Widget? leadingIcon; 15 | final Widget? trailingIcon; 16 | final String hint; 17 | final TextEditingController? controller; 18 | final Function(String)? onChange; 19 | 20 | @override 21 | _SearchBuilderState createState() => _SearchBuilderState(); 22 | } 23 | 24 | class _SearchBuilderState extends State { 25 | @override 26 | void initState() { 27 | super.initState(); 28 | if (widget.controller == null) { 29 | controller = TextEditingController(); 30 | } else { 31 | controller = widget.controller!; 32 | } 33 | } 34 | 35 | late TextEditingController controller; 36 | @override 37 | Widget build(BuildContext context) { 38 | return Container( 39 | alignment: Alignment.center, 40 | padding: const EdgeInsets.all(size_md_6), 41 | margin: const EdgeInsets.symmetric(horizontal: size_ex_lg_24), 42 | decoration: BoxDecoration( 43 | color: Colors.white, 44 | boxShadow: [searchShadow], 45 | borderRadius: BorderRadius.circular(circle_radius * 1.6)), 46 | child: TextField( 47 | controller: controller, 48 | onChanged: (x) => 49 | widget.onChange != null ? widget.onChange!(x) : null, 50 | textAlignVertical: TextAlignVertical.center, 51 | decoration: InputDecoration( 52 | border: InputBorder.none, 53 | hintText: widget.hint, 54 | prefixIcon: widget.leadingIcon, 55 | suffixIcon: widget.trailingIcon)), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/demos/clock/widgets/tabbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class HorizontalTabBuilder extends StatefulWidget { 5 | HorizontalTabBuilder( 6 | {required this.tabs, required this.selected, Key? key, 7 | this.onChange, 8 | this.controller}) 9 | : assert(tabs.isNotEmpty), 10 | assert(tabs.contains(selected), 'selected not present in tabs'), 11 | super(key: key); 12 | final List tabs; 13 | final String selected; 14 | final TabController? controller; 15 | 16 | final Function(String)? onChange; 17 | 18 | @override 19 | _HorizontalTabBuilderState createState() => _HorizontalTabBuilderState(); 20 | } 21 | 22 | class _HorizontalTabBuilderState extends State 23 | with SingleTickerProviderStateMixin { 24 | late final TabController controller; 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | controller = widget.controller ?? 30 | TabController(length: widget.tabs.length, vsync: this); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Theme( 36 | data: ThemeData( 37 | highlightColor: Colors.transparent, 38 | splashColor: Colors.transparent, 39 | ), 40 | child: DefaultTabController( 41 | initialIndex: 1, 42 | length: widget.tabs.length, 43 | animationDuration: const Duration(milliseconds: 500), 44 | child: TabBar( 45 | controller: controller, 46 | isScrollable: true, 47 | labelPadding: const EdgeInsets.symmetric(horizontal: size_md_6), 48 | indicatorSize: TabBarIndicatorSize.label, 49 | indicator: const UnderlineTabIndicator(), 50 | onTap: (x) { 51 | // print(widget.tabs[x]); 52 | if (widget.onChange != null) { 53 | widget.onChange!(widget.tabs[x]); 54 | } 55 | }, 56 | tabs: widget.tabs.map((e) { 57 | final bool isSelected = widget.selected == e; 58 | return Container( 59 | margin: 60 | EdgeInsets.only(left: e == 'Clocks' ? size_ex_lg_24 : 0), 61 | padding: const EdgeInsets.symmetric( 62 | horizontal: size_md_6 * 2, vertical: size_md_6 * 2), 63 | decoration: BoxDecoration( 64 | boxShadow: [shadowLight], 65 | color: isSelected ? black : Colors.white, 66 | borderRadius: BorderRadius.circular(circle_radius), 67 | ), 68 | child: Text( 69 | e, 70 | style: TextStyle( 71 | color: isSelected ? Colors.white : Colors.grey), 72 | )); 73 | }).toList()), 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/demos/clock/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/demos/clock/constants/constants.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Circle extends StatelessWidget { 5 | 6 | const Circle(this.size, {Key? key, this.color = black}) : super(key: key); 7 | final double size; 8 | final Color color; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | height: size, 14 | width: size, 15 | decoration: BoxDecoration( 16 | shape: BoxShape.circle, 17 | color: color, 18 | ), 19 | ); 20 | } 21 | } 22 | 23 | class LeadingIconBuilder extends StatelessWidget { 24 | 25 | const LeadingIconBuilder({Key? key, this.onTap}) : super(key: key); 26 | final Function? onTap; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return GestureDetector( 31 | onTap: () => onTap!.call(), 32 | child: const Column( 33 | children: [ 34 | Row( 35 | children: [ 36 | Circle(circle_radius), 37 | SizedBox(width: size_sm_4), 38 | Circle(circle_radius, color: pink), 39 | ], 40 | ), 41 | SizedBox(height: size_sm_4), 42 | Row( 43 | children: [ 44 | Circle(circle_radius), 45 | SizedBox(width: size_sm_4), 46 | Circle(circle_radius), 47 | ], 48 | ) 49 | ], 50 | ), 51 | ); 52 | } 53 | } 54 | 55 | class KIcon extends StatelessWidget { 56 | 57 | const KIcon(this.icon, 58 | {Key? key, 59 | this.label, 60 | this.onTap, 61 | this.size, 62 | this.labelColor = black, 63 | this.color = Colors.white}) 64 | : super(key: key); 65 | final Widget icon; 66 | final String? label; 67 | final Color labelColor; 68 | final Color color; 69 | final Function? onTap; 70 | final double? size; 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | return InkWell( 75 | onTap: () => onTap!(), 76 | child: Stack( 77 | children: [ 78 | Padding( 79 | padding: const EdgeInsets.all(8.0), 80 | child: Container( 81 | height: size, 82 | width: size, 83 | alignment: Alignment.center, 84 | decoration: BoxDecoration( 85 | color: color, 86 | boxShadow: [shadowLight], 87 | borderRadius: BorderRadius.circular(size_sm_4 * 2)), 88 | padding: const EdgeInsets.all(size_sm_4 * 2), 89 | child: icon, 90 | ), 91 | ), 92 | if (label == null) const SizedBox() else Positioned( 93 | left: size_md_6 * 5, 94 | top: size_sm_4, 95 | child: Container( 96 | alignment: Alignment.center, 97 | height: size_md_6 * 3, 98 | width: size_md_6 * 3, 99 | decoration: BoxDecoration( 100 | color: labelColor, shape: BoxShape.circle), 101 | child: Text( 102 | label!, 103 | style: const TextStyle( 104 | color: Colors.white, fontSize: size_md_6 * 1.8), 105 | )), 106 | ), 107 | ], 108 | ), 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension ColorToString on Color { 4 | String toColorString() { 5 | if (this == Colors.blue) { 6 | return 'blue'; 7 | } 8 | if (this == Colors.red) { 9 | return 'red'; 10 | } 11 | if (this == Colors.green) { 12 | return 'green'; 13 | } 14 | if (this == Colors.purple) { 15 | return 'purple'; 16 | } 17 | if (this == Colors.orange) { 18 | return 'orange'; 19 | } 20 | if (this == Colors.teal) { 21 | return 'teal'; 22 | } 23 | if (this == Colors.pink) { 24 | return 'pink'; 25 | } 26 | if (this == Colors.indigo) { 27 | return 'indigo'; 28 | } 29 | if (this == Colors.brown) { 30 | return 'brown'; 31 | } 32 | if (this == Colors.cyan) { 33 | return 'cyan'; 34 | } 35 | if (this == Colors.deepOrange) { 36 | return 'deepOrange'; 37 | } 38 | if (this == Colors.deepPurple) { 39 | return 'deepPurple'; 40 | } 41 | if (this == Colors.lime) { 42 | return 'lime'; 43 | } 44 | if (this == Colors.amber) { 45 | return 'amber'; 46 | } 47 | if (this == Colors.lightBlue) { 48 | return 'lightBlue'; 49 | } 50 | if (this == Colors.lightGreen) { 51 | return 'lightGreen'; 52 | } 53 | if (this == Colors.yellow) { 54 | return 'yellow'; 55 | } 56 | if (this == Colors.grey) { 57 | return 'grey'; 58 | } 59 | return 'unknown'; // If color is not one of the predefined colors 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:awesome_flutter_layouts/blast_effect.dart'; 4 | import 'package:awesome_flutter_layouts/extensions.dart'; 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | import 'const/const.dart'; 10 | 11 | Future main() async { 12 | fragmentProgram = await FragmentProgram.fromAsset( 13 | 'assets/shaders/shader.frag', 14 | ); 15 | runApp( 16 | ChangeNotifierProvider(create: (context) => ParticleData(), child: MyApp()), 17 | ); 18 | } 19 | 20 | late FragmentProgram fragmentProgram; 21 | 22 | class MyApp extends StatelessWidget { 23 | @override 24 | Widget build(BuildContext context) { 25 | return AnimatedBuilder( 26 | animation: appSetting, 27 | builder: (BuildContext context, Widget? child) { 28 | return MaterialApp( 29 | title: 'Awesome Flutter Layouts', 30 | debugShowCheckedModeBanner: kDebugMode, 31 | themeMode: appSetting.isDarkMode ? ThemeMode.dark : ThemeMode.light, 32 | darkTheme: ThemeData.dark(useMaterial3: true).copyWith( 33 | colorScheme: ColorScheme.fromSeed( 34 | seedColor: appSetting.themeSeed, 35 | brightness: Brightness.dark, 36 | ), 37 | ), 38 | theme: ThemeData( 39 | useMaterial3: true, 40 | primaryColorDark: appSetting.themeSeed, 41 | colorScheme: ColorScheme.fromSeed(seedColor: appSetting.themeSeed), 42 | ), 43 | home: const MyHomePage(title: 'Awesome Flutter Layouts'), 44 | ); 45 | }, 46 | ); 47 | } 48 | } 49 | 50 | AppSetting appSetting = AppSetting(); 51 | final List themeColorSeed = [ 52 | Colors.blue, 53 | Colors.red, 54 | Colors.green, 55 | Colors.purple, 56 | Colors.orange, 57 | Colors.teal, 58 | Colors.pink, 59 | Colors.indigo, 60 | Colors.brown, 61 | Colors.cyan, 62 | Colors.deepOrange, 63 | Colors.deepPurple, 64 | Colors.lime, 65 | Colors.amber, 66 | Colors.lightBlue, 67 | Colors.lightGreen, 68 | Colors.yellow, 69 | Colors.grey, 70 | ]; 71 | 72 | class AppSetting extends ChangeNotifier { 73 | AppSetting({this.isDarkMode = false}); 74 | bool isDarkMode; 75 | Color themeSeed = Colors.blue; 76 | 77 | void changeThemeSeed(Color color) { 78 | themeSeed = color; 79 | notifyListeners(); 80 | } 81 | 82 | void toggleTheme() { 83 | isDarkMode = !isDarkMode; 84 | notifyListeners(); 85 | } 86 | } 87 | 88 | class MyHomePage extends StatefulWidget { 89 | const MyHomePage({required this.title, Key? key}) : super(key: key); 90 | 91 | final String title; 92 | 93 | @override 94 | _MyHomePageState createState() => _MyHomePageState(); 95 | } 96 | 97 | class _MyHomePageState extends State { 98 | Future _push(Widget child) async { 99 | Navigator.push(context, MaterialPageRoute(builder: (context) => child)); 100 | } 101 | 102 | double index = 0; 103 | bool isDark = false; 104 | @override 105 | Widget build(BuildContext context) { 106 | return Scaffold( 107 | appBar: AppBar( 108 | title: Text(widget.title), 109 | actions: [ 110 | IconButton( 111 | icon: 112 | isDark 113 | ? const Icon(Icons.wb_sunny) 114 | : const Icon(Icons.brightness_2), 115 | onPressed: () { 116 | setState(() { 117 | isDark = !isDark; 118 | }); 119 | }, 120 | ), 121 | ], 122 | ), 123 | body: Column( 124 | children: [ 125 | ElevatedButton( 126 | onPressed: () { 127 | setState(() { 128 | index = (index + 1) % themeColorSeed.length; 129 | }); 130 | appSetting.changeThemeSeed(themeColorSeed[index.toInt()]); 131 | }, 132 | child: SizedBox( 133 | width: 80, 134 | child: Center( 135 | child: Text('${themeColorSeed[index.toInt()].toColorString()}'), 136 | ), 137 | ), 138 | ), 139 | Expanded( 140 | child: ListView.separated( 141 | itemCount: layout_title.length, 142 | separatorBuilder: (BuildContext context, int currentitem) { 143 | return Container( 144 | width: double.infinity, 145 | height: 0.1, 146 | color: Colors.black, 147 | ); 148 | }, 149 | itemBuilder: (BuildContext context, int currentitem) { 150 | return ListTile( 151 | onTap: () { 152 | final Widget child = 153 | layoutList[currentitem % layoutList.length]; 154 | _push(child); 155 | }, 156 | title: Text(layout_title[currentitem % layout_title.length]), 157 | ); 158 | }, 159 | ), 160 | ), 161 | ], 162 | ), 163 | ); 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /lib/models/usermodel.dart: -------------------------------------------------------------------------------- 1 | class RandomUserModel { 2 | 3 | RandomUserModel.fromJson(Map json) 4 | : gender = json['gender'], 5 | title = json['name']['title'], 6 | first = json['name']['first'], 7 | last = json['name']['last'], 8 | city = json['location']['city'], 9 | state = json['location']['state'], 10 | country = json['location']['country'], 11 | postcode = 'SD6 1453', 12 | 13 | /// API has some data int and some string 14 | picture = json['picture']['large'], 15 | phone = json['phone']; 16 | final String gender; 17 | final String title; 18 | final String first; 19 | final String last; 20 | final String city; 21 | final String state; 22 | final String country; 23 | final String postcode; 24 | final String picture; 25 | final String phone; 26 | } 27 | -------------------------------------------------------------------------------- /lib/multi_column_picker.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/const/colors.dart'; 2 | import 'package:awesome_flutter_layouts/widgets/picker_widget.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class BottomSheetApp extends StatefulWidget { 6 | const BottomSheetApp({Key? key, this.title = 'Custom Bottom sheet example'}) 7 | : super(key: key); 8 | 9 | final String title; 10 | 11 | @override 12 | _BottomSheetAppState createState() => _BottomSheetAppState(); 13 | } 14 | 15 | class _BottomSheetAppState extends State { 16 | void _showCustomTimePicker() { 17 | showModalBottomSheet( 18 | backgroundColor: beachRed[50], 19 | shape: const RoundedRectangleBorder( 20 | borderRadius: BorderRadius.all(Radius.circular(15.0)), 21 | ), 22 | context: context, 23 | builder: (context) => TimePickerWidget( 24 | onChange: (newTime) => time = newTime, 25 | )).whenComplete(() { 26 | setState(() {}); 27 | }); 28 | } 29 | 30 | String time = ''; 31 | @override 32 | Widget build(BuildContext context) { 33 | return Scaffold( 34 | appBar: AppBar( 35 | title: Text(widget.title), 36 | ), 37 | body: Center( 38 | child: Column( 39 | mainAxisAlignment: MainAxisAlignment.center, 40 | children: [ 41 | const Text( 42 | 'Push the Button to View the bottom Sheet:', 43 | ), 44 | Text( 45 | time, 46 | style: Theme.of(context).textTheme.headlineMedium, 47 | ), 48 | ], 49 | ), 50 | ), 51 | floatingActionButton: FloatingActionButton( 52 | heroTag: 'Column-Picker', 53 | onPressed: _showCustomTimePicker, 54 | tooltip: 'Increment', 55 | child: const Icon(Icons.add), 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/search.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:math'; 3 | 4 | import 'package:awesome_flutter_layouts/bloc/userbloc.dart'; 5 | import 'package:awesome_flutter_layouts/const/const.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:http/http.dart' as http; 8 | 9 | import 'models/usermodel.dart'; 10 | 11 | class Search extends StatefulWidget { 12 | @override 13 | _SearchState createState() => _SearchState(); 14 | } 15 | 16 | class _SearchState extends State { 17 | List tabBarTitle = [ 18 | 'Friends', 19 | 'Random Users', 20 | 'Acquaintance', 21 | 'Colleagues' 22 | ]; 23 | 24 | int selectedTab = 2; 25 | 26 | final ScrollController _controller = ScrollController(); 27 | final ScrollController _controller1 = ScrollController(); 28 | 29 | Future getFilteredList() async {} 30 | 31 | Widget _acquaintance() { 32 | return const Center( 33 | child: Text('_acquaintance will apear here'), 34 | ); 35 | } 36 | 37 | Widget _friends() { 38 | return const Center( 39 | child: Text('Friends will appear here '), 40 | ); 41 | } 42 | 43 | Widget _colleagues() { 44 | return const Center( 45 | child: Text('Colleagues will appear here'), 46 | ); 47 | } 48 | 49 | Widget usersWidget() { 50 | return StreamBuilder( 51 | stream: userBloc.userController.stream, 52 | builder: (BuildContext buildContext, 53 | AsyncSnapshot?> snapshot) { 54 | return snapshot.connectionState == ConnectionState.waiting 55 | ? const Center( 56 | child: CircularProgressIndicator(), 57 | ) 58 | : _randomUsers(snapshot: snapshot); 59 | }); 60 | } 61 | 62 | Widget _showAd() { 63 | return Container( 64 | margin: const EdgeInsets.symmetric(vertical: 10), 65 | height: 200, 66 | decoration: BoxDecoration( 67 | color: materialColors[5], borderRadius: BorderRadius.circular(20)), 68 | alignment: Alignment.center, 69 | child: const Text('Ad'), 70 | ); 71 | } 72 | 73 | Widget _cardWidget( 74 | AsyncSnapshot?> snapshot, int index) { 75 | return Container( 76 | decoration: BoxDecoration(boxShadow: [ 77 | BoxShadow( 78 | color: Colors.grey.withOpacity(0.4), 79 | blurRadius: 5.0, // soften the shadow 80 | spreadRadius: 1.0, //extend the shadow 81 | offset: const Offset( 82 | 2.0, // Move to right 10 horizontally 83 | 2.0, // Move to bottom 10 Vertically 84 | ), 85 | ) 86 | ]), 87 | child: Stack(fit: StackFit.expand, children: [ 88 | Container( 89 | decoration: BoxDecoration( 90 | image: DecorationImage( 91 | fit: BoxFit.cover, 92 | image: NetworkImage(snapshot.data![index].picture)), 93 | borderRadius: BorderRadius.circular(10), 94 | ), 95 | margin: const EdgeInsets.only(left: 5, bottom: 10, top: 10), 96 | ), 97 | Container( 98 | decoration: BoxDecoration( 99 | gradient: LinearGradient( 100 | begin: Alignment.bottomCenter, 101 | end: Alignment.topCenter, 102 | colors: [Colors.black.withOpacity(0.8), Colors.transparent]), 103 | ), 104 | ), 105 | Container( 106 | alignment: Alignment.bottomCenter, 107 | padding: const EdgeInsets.only(bottom: 24), 108 | child: Text( 109 | '${snapshot.data![index].first} ${snapshot.data![index].last}', 110 | style: const TextStyle( 111 | fontWeight: FontWeight.bold, 112 | fontSize: 18, 113 | ), 114 | textAlign: TextAlign.center, 115 | ), 116 | ), 117 | ]), 118 | ); 119 | } 120 | 121 | Widget _randomUsers( 122 | {required AsyncSnapshot?> snapshot}) { 123 | return GestureDetector( 124 | onPanUpdate: (details) { 125 | if (details.delta.dy > 0) { 126 | if (_controller.offset < 0) { 127 | _controller.jumpTo(0); 128 | _controller1.jumpTo(0); 129 | } 130 | 131 | _controller.jumpTo(_controller.offset - details.delta.dy); 132 | _controller1.jumpTo(_controller1.offset - details.delta.dy); 133 | } else if (details.delta.dy < 0) { 134 | final double maxScroll = _controller.position.maxScrollExtent; 135 | final double currentScroll = _controller.position.pixels; 136 | final double maxScroll1 = _controller1.position.maxScrollExtent; 137 | final double currentScroll1 = _controller1.position.pixels; 138 | 139 | ///lets say that we reached 99% of the screen 140 | const double delta = 141 | 230; // or something else.. you have to do the math yourself 142 | if (maxScroll - currentScroll <= delta) { 143 | _controller.jumpTo(_controller.position.maxScrollExtent); 144 | } 145 | if (maxScroll1 - currentScroll1 <= delta) { 146 | _controller1.jumpTo(_controller1.position.maxScrollExtent); 147 | } 148 | 149 | _controller.jumpTo(_controller.offset - details.delta.dy); 150 | _controller1.jumpTo(_controller1.offset - details.delta.dy); 151 | } 152 | }, 153 | child: Container( 154 | padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10), 155 | child: Row( 156 | children: [ 157 | Expanded( 158 | child: ScrollConfiguration( 159 | behavior: 160 | ScrollConfiguration.of(context).copyWith(scrollbars: false), 161 | child: ListView.builder( 162 | controller: _controller, 163 | physics: const NeverScrollableScrollPhysics(), 164 | itemCount: snapshot.data!.length, 165 | itemBuilder: (BuildContext context, int index) { 166 | if (index.isEven) { 167 | return Container( 168 | height: 200, child: _cardWidget(snapshot, index)); 169 | } else { 170 | return const SizedBox(); 171 | } 172 | }, 173 | ), 174 | ), 175 | ), 176 | const SizedBox( 177 | width: 10, 178 | ), 179 | Expanded( 180 | child: ScrollConfiguration( 181 | behavior: 182 | ScrollConfiguration.of(context).copyWith(scrollbars: false), 183 | child: ListView.builder( 184 | controller: _controller1, 185 | physics: const NeverScrollableScrollPhysics(), 186 | itemCount: snapshot.data!.length, 187 | itemBuilder: (BuildContext context, int index) { 188 | if (index == random || index == 1) { 189 | return _showAd(); 190 | } 191 | if (index.isOdd) { 192 | return Container( 193 | height: 300, child: _cardWidget(snapshot, index)); 194 | } else { 195 | return const SizedBox(); 196 | } 197 | }, 198 | ), 199 | ), 200 | ), 201 | ], 202 | ), 203 | ), 204 | ); 205 | } 206 | 207 | @override 208 | void initState() { 209 | super.initState(); 210 | // _controller.addListener(() { 211 | // _controller.jumpTo(_controller.offset); 212 | // }); 213 | // _controller1.addListener(() {}); 214 | } 215 | 216 | void _searchUser(String searchQuery) { 217 | final List searchResult = []; 218 | userBloc.userController.sink.add(null); 219 | if (searchQuery.isEmpty) { 220 | userBloc.userController.sink.add(totalUsers); 221 | return; 222 | } 223 | for (final user in totalUsers) { 224 | if (user.first.toLowerCase().contains(searchQuery.toLowerCase()) || 225 | user.last.toLowerCase().contains(searchQuery.toLowerCase())) { 226 | searchResult.add(user); 227 | } 228 | } 229 | userBloc.userController.sink.add(searchResult); 230 | } 231 | 232 | Future fetchRandomUsers() async { 233 | final http.Response response = await http.get(Uri.parse(RANDOM_URL)); 234 | if (response.statusCode == 200) { 235 | final body = jsonDecode(response.body); 236 | final Iterable list = body['results']; 237 | // map each json object to model and addto list and return the list of models 238 | totalUsers = 239 | list.map((model) => RandomUserModel.fromJson(model)).toList(); 240 | userBloc.userController.sink.add(totalUsers); 241 | } 242 | } 243 | 244 | Widget _buildBody() { 245 | return index == 0 246 | ? _friends() 247 | : index == 1 248 | ? usersWidget() 249 | : index == 2 250 | ? _acquaintance() 251 | : _colleagues(); 252 | } 253 | 254 | late int random; 255 | List totalUsers = []; 256 | Random rng = Random(); 257 | int index = 0; 258 | @override 259 | Widget build(BuildContext context) { 260 | return Scaffold( 261 | appBar: AppBar( 262 | leading: const BackButton( 263 | color: Colors.black, 264 | ), 265 | actions: const [ 266 | IconButton(icon: Icon(Icons.shopping_basket), onPressed: null) 267 | ], 268 | ), 269 | body: Column( 270 | children: [ 271 | Container( 272 | padding: const EdgeInsets.all(16.0), 273 | child: TextField( 274 | onChanged: (text) => _searchUser(text), 275 | decoration: InputDecoration( 276 | suffixIcon: const Icon(Icons.search), 277 | hintText: 'Search', 278 | contentPadding: 279 | const EdgeInsets.symmetric(horizontal: 30, vertical: 20), 280 | border: OutlineInputBorder( 281 | borderSide: 282 | const BorderSide(width: 3.1, color: Colors.red), 283 | borderRadius: BorderRadius.circular(30))), 284 | ), 285 | ), 286 | Padding( 287 | padding: const EdgeInsets.symmetric(vertical: 10), 288 | child: Tabs( 289 | index: index, 290 | list: tabBarTitle, 291 | onIndexChange: (x) { 292 | setState(() { 293 | index = x; 294 | }); 295 | if (x == 1) { 296 | random = rng.nextInt(100); 297 | fetchRandomUsers(); 298 | } 299 | }, 300 | ), 301 | ), 302 | Expanded(child: _buildBody()) 303 | ], 304 | ), 305 | ); 306 | } 307 | } 308 | 309 | class Tabs extends StatelessWidget { 310 | Tabs( 311 | {required this.list, 312 | required this.onIndexChange, 313 | required this.index, 314 | Key? key}) 315 | : super(key: key); 316 | final List list; 317 | final Function(int) onIndexChange; 318 | final int index; 319 | 320 | @override 321 | Widget build(BuildContext context) { 322 | return DefaultTabController( 323 | length: list.length, 324 | initialIndex: index, 325 | child: TabBar( 326 | // indicatorColor: primaryColorGreen, 327 | indicatorSize: TabBarIndicatorSize.label, 328 | onTap: (index) { 329 | onIndexChange(index); 330 | }, 331 | isScrollable: true, 332 | tabs: [ 333 | for (int i = 0; i < list.length; i++) 334 | Padding( 335 | padding: const EdgeInsets.symmetric(vertical: 8.0), 336 | child: Text( 337 | list[i], 338 | style: const TextStyle(fontSize: 16), 339 | ), 340 | ), 341 | ], 342 | ), 343 | ); 344 | } 345 | } 346 | -------------------------------------------------------------------------------- /lib/ultra_gradient.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'main.dart'; 6 | 7 | class UltraGradientDemo extends StatefulWidget { 8 | const UltraGradientDemo({required this.title, Key? key}) : super(key: key); 9 | final String title; 10 | @override 11 | State createState() => _UltraGradientDemoState(); 12 | } 13 | 14 | class _UltraGradientDemoState extends State { 15 | int _counter = 0; 16 | void _incrementCounter() { 17 | setState(() { 18 | _counter++; 19 | }); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return BackgroundWidget( 25 | child: Scaffold( 26 | backgroundColor: Colors.transparent, 27 | appBar: AppBar( 28 | backgroundColor: Colors.transparent, 29 | title: Text(widget.title), 30 | ), 31 | body: Center( 32 | child: Column( 33 | mainAxisAlignment: MainAxisAlignment.center, 34 | children: [ 35 | const Text( 36 | 'You have pushed the button this many times:', 37 | ), 38 | Text( 39 | '$_counter', 40 | style: Theme.of(context).textTheme.headlineMedium, 41 | ), 42 | ], 43 | ), 44 | ), 45 | floatingActionButton: FloatingActionButton( 46 | onPressed: _incrementCounter, 47 | tooltip: 'Increment', 48 | child: const Icon(Icons.add), 49 | ), 50 | ), 51 | ); 52 | } 53 | } 54 | 55 | class BackgroundWidget extends StatefulWidget { 56 | const BackgroundWidget({required this.child, super.key}); 57 | final Widget child; 58 | 59 | @override 60 | State createState() => _BackgroundWidgetState(); 61 | } 62 | 63 | class _BackgroundWidgetState extends State 64 | with SingleTickerProviderStateMixin { 65 | @override 66 | void initState() { 67 | _controller = 68 | AnimationController(vsync: this, duration: const Duration(seconds: 6)); 69 | _animation = Tween(begin: 0, end: 1).animate(_controller); 70 | _controller.repeat(reverse: true); 71 | super.initState(); 72 | } 73 | 74 | @override 75 | void dispose() { 76 | _controller.removeStatusListener((status) {}); 77 | _controller.dispose(); 78 | 79 | super.dispose(); 80 | } 81 | 82 | late AnimationController _controller; 83 | late Animation _animation; 84 | @override 85 | Widget build(BuildContext context) { 86 | return Material( 87 | child: Stack( 88 | children: [ 89 | AnimatedBuilder( 90 | animation: _animation, 91 | builder: (context, child) { 92 | return CustomPaint( 93 | painter: BackgroundPainter( 94 | _animation, fragmentProgram.fragmentShader()), 95 | child: Container(), 96 | ); 97 | }), 98 | BackdropFilter( 99 | filter: ImageFilter.blur(sigmaX: 60, sigmaY: 60), 100 | child: Container( 101 | color: Colors.black.withOpacity(0.1), 102 | )), 103 | widget.child, 104 | ], 105 | ), 106 | ); 107 | } 108 | } 109 | 110 | class BackgroundPainter extends CustomPainter { 111 | BackgroundPainter(this.animation, this.shader); 112 | Offset getOffset(Path path) { 113 | final pms = path.computeMetrics(forceClosed: false).elementAt(0); 114 | final length = pms.length; 115 | final offset = pms.getTangentForOffset(length * animation.value)!.position; 116 | return offset; 117 | } 118 | 119 | final Animation animation; 120 | final FragmentShader shader; 121 | 122 | // Offset getOffset(Path path) { 123 | // final pms = path.computeMetrics(forceClosed: false).elementAt(0); 124 | // final length = pms.length; 125 | // final offset = pms.getTangentForOffset(length * animation.value)!.position; 126 | // return offset; 127 | // } 128 | 129 | void drawSquare(Canvas canvas, Size size, Paint paint1) { 130 | paint1.color = Colors.blue.shade300; 131 | paint1.maskFilter = const MaskFilter.blur(BlurStyle.normal, 100); 132 | paint1.style = PaintingStyle.fill; 133 | canvas.drawRRect( 134 | RRect.fromRectAndRadius( 135 | Rect.fromCenter( 136 | center: Offset(size.width * 0.75, 100), 137 | width: 300, 138 | height: 300, 139 | ), 140 | const Radius.circular(20), 141 | ), 142 | paint1); 143 | } 144 | 145 | void drawEllipse(Canvas canvas, Size size, Paint paint) { 146 | final path = Path(); 147 | paint.color = Colors.purple; 148 | paint.style = PaintingStyle.stroke; 149 | path.moveTo(size.width * 0.4, -100); 150 | path.quadraticBezierTo(size.width * 0.8, size.height * 0.6, 151 | size.width * 1.2, size.height * 0.4); 152 | // canvas.drawPath(path, paint); 153 | 154 | paint.style = PaintingStyle.fill; 155 | canvas.drawOval( 156 | Rect.fromCenter( 157 | center: getOffset(path), 158 | width: 450, 159 | height: 250, 160 | ), 161 | paint); 162 | } 163 | 164 | void drawTriangle(Canvas canvas, Size size, paint) { 165 | paint.color = Colors.green; 166 | final path = Path(); 167 | paint.style = PaintingStyle.stroke; 168 | paint.strokeWidth = 10.0; 169 | path.moveTo(-100.0, size.height * 0.5); 170 | path.quadraticBezierTo( 171 | 300, size.height * 0.7, size.width, size.height * 1.2); 172 | // canvas.drawPath(path, paint); 173 | paint.style = PaintingStyle.fill; 174 | 175 | // draw triangle 176 | final offset = getOffset(path); 177 | canvas.drawPath( 178 | Path() 179 | ..moveTo(offset.dx, offset.dy) 180 | ..lineTo(offset.dx + 450, offset.dy + 150) 181 | ..lineTo(offset.dx + 250, offset.dy - 500) 182 | ..close(), 183 | paint); 184 | } 185 | 186 | void drawCircle(Canvas canvas, Size size, Paint paint) { 187 | paint.color = Colors.orange; 188 | final Path path = Path(); 189 | paint.style = PaintingStyle.stroke; 190 | paint.strokeWidth = 10.0; 191 | path.moveTo(size.width * 1.1, size.height / 4); 192 | path.quadraticBezierTo( 193 | size.width / 2, size.height * 1.0, -100, size.height / 4); 194 | // canvas.drawPath((path), paint); 195 | paint.style = PaintingStyle.fill; 196 | final offset = getOffset(path); 197 | canvas.drawCircle(offset, 150, paint); 198 | } 199 | 200 | void drawAbstractShapes(Canvas canvas, Size size, Paint paint) { 201 | final Path path = Path(); 202 | path.moveTo(size.width * 1.2, 0); 203 | path.quadraticBezierTo( 204 | size.width * 1.2, 300, size.width * 0.4, size.height * 0.6); 205 | path.quadraticBezierTo( 206 | size.width * 0.1, size.height * 0.7, -100, size.height * 1.2); 207 | path.lineTo(-50, -50); 208 | path.close(); 209 | paint.maskFilter = const MaskFilter.blur(BlurStyle.normal, 100); 210 | canvas.drawPath( 211 | path, 212 | paint 213 | ..color = Colors.purple.shade200 214 | ..style = PaintingStyle.fill); 215 | drawSquare(canvas, size, paint); 216 | } 217 | 218 | void drawContrastingBlobs(Canvas canvas, Size size, Paint paint) { 219 | paint.maskFilter = const MaskFilter.blur(BlurStyle.normal, 30); 220 | paint.blendMode = BlendMode.overlay; 221 | drawCircle(canvas, size, paint); 222 | drawTriangle(canvas, size, paint); 223 | drawEllipse(canvas, size, paint); 224 | } 225 | 226 | void paintBackground(Canvas canvas, Size size, Paint paint) { 227 | canvas.drawRect( 228 | Rect.fromCenter( 229 | center: Offset(size.width * 0.5, size.height * 0.5), 230 | width: size.width, 231 | height: size.height, 232 | ), 233 | paint..color = Colors.black); 234 | } 235 | 236 | @override 237 | void paint(Canvas canvas, Size size) { 238 | final paint = Paint(); 239 | // Set color information as uniforms in the shader 240 | // shader.setFloat(0, size.width); 241 | // shader.setFloat(1, size.height); 242 | // shader.setFloat( 243 | // 2, paint.color.red / 255.0); // Red component normalized to [0, 1] 244 | // shader.setFloat( 245 | // 3, paint.color.green / 255.0); // Green component normalized to [0, 1] 246 | // shader.setFloat( 247 | // 4, paint.color.blue / 255.0); // Blue component normalized to [0, 1] 248 | // // Create shader from the fragment shader 249 | // paint.shader = shader; 250 | // Use shaderPaint for drawing background and shapes 251 | paintBackground(canvas, size, paint); 252 | drawAbstractShapes( 253 | canvas, size, paint); // Use shaderPaint for drawing shapes 254 | drawContrastingBlobs( 255 | canvas, size, paint); // Use shaderPaint for drawing shapes 256 | } 257 | 258 | @override 259 | bool shouldRepaint(covariant CustomPainter oldDelegate) { 260 | return oldDelegate != this; 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /lib/widgets/picker_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_flutter_layouts/const/colors.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class TimePickerWidget extends StatefulWidget { 6 | 7 | const TimePickerWidget({required this.onChange, Key? key}) : super(key: key); 8 | final Function(String) onChange; 9 | @override 10 | _TimePickerWidgetState createState() => _TimePickerWidgetState(); 11 | } 12 | 13 | class _TimePickerWidgetState extends State { 14 | Widget durationPicker({bool inMinutes = false}) { 15 | return CupertinoPicker( 16 | scrollController: FixedExtentScrollController(initialItem: 0), 17 | magnification: 1.1, 18 | backgroundColor: beachRed[50], 19 | onSelectedItemChanged: (x) { 20 | if (inMinutes) { 21 | currentTimeInMin = x.toString(); 22 | } else { 23 | currentTimeInHour = x.toString(); 24 | } 25 | setState(() {}); 26 | widget.onChange('$currentTimeInHour Hr $currentTimeInMin mins'); 27 | }, 28 | children: List.generate( 29 | inMinutes ? 60 : 24, 30 | (index) => Text(inMinutes ? '$index mins' : '$index Hr', 31 | style: TextStyle(color: white))), 32 | itemExtent: 40, 33 | ); 34 | } 35 | 36 | String currentTimeInHour = ''; 37 | String currentTimeInMin = ''; 38 | @override 39 | Widget build(BuildContext context) { 40 | return DefaultTextStyle( 41 | style: TextStyle(color: white), 42 | child: Padding( 43 | padding: const EdgeInsets.symmetric(horizontal: 16.0), 44 | child: Column( 45 | mainAxisSize: MainAxisSize.min, 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Row( 49 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 50 | children: [ 51 | const Text( 52 | 'Custom Time Picker', 53 | style: TextStyle( 54 | fontWeight: FontWeight.w500, fontSize: 20), 55 | ), 56 | IconButton( 57 | onPressed: () => Navigator.of(context).pop(), 58 | icon: const Icon( 59 | Icons.clear, 60 | color: Colors.white, 61 | ), 62 | ) 63 | ], 64 | ), 65 | const Text( 66 | 'Scroll the list to pick the time.', 67 | ), 68 | Padding( 69 | padding: const EdgeInsets.only(top: 20.0), 70 | child: RichText( 71 | text: TextSpan( 72 | style: const TextStyle(fontWeight: FontWeight.bold), 73 | children: [ 74 | const TextSpan( 75 | text: 'Selected: ', 76 | ), 77 | TextSpan( 78 | style: const TextStyle(color: Color(0xffe6e6ea)), 79 | text: 80 | '$currentTimeInHour Hr $currentTimeInMin mins'), 81 | // TextSpan(text: ' $budgetinLakh Lakhs'), 82 | ]), 83 | )), 84 | Container( 85 | color: beachRed[50], 86 | width: MediaQuery.of(context).size.width, 87 | child: Center( 88 | child: Container( 89 | color: beachRed[50], 90 | width: MediaQuery.of(context).size.width * 0.5, 91 | height: MediaQuery.of(context).size.height * 0.25, 92 | child: Row( 93 | mainAxisAlignment: MainAxisAlignment.center, 94 | children: [ 95 | Expanded(child: durationPicker()), 96 | Expanded(child: durationPicker(inMinutes: true)), 97 | ], 98 | )), 99 | ), 100 | ), 101 | ], 102 | ), 103 | ), 104 | ); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: awesome_flutter_layouts 2 | description: A list of awesome latyout built in flutter. 3 | 4 | version: 1.1.0+1 5 | 6 | environment: 7 | sdk: ^3.7.0 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | google_fonts: ^6.2.1 13 | http: ^1.3.0 14 | provider: ^6.1.4 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | flutter: 20 | shaders: 21 | - assets/shaders/shader.frag 22 | uses-material-design: true 23 | assets: 24 | - assets/ 25 | - assets/images/ 26 | - assets/clock_demo/ 27 | -------------------------------------------------------------------------------- /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:awesome_flutter_layouts/main.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_test/flutter_test.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(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 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maheshj01/awesome_flutter_layouts/aea75c2f7c40c7feef22625d4911a2511c7d9857/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | awesome_flutter_layouts 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome_flutter_layouts", 3 | "short_name": "awesome_flutter_layouts", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | --------------------------------------------------------------------------------