├── .all-contributorsrc
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── build-and-deploy-to-playstore.yml
├── .gitignore
├── .metadata
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ └── com
│ │ │ └── ibhavikmakwana
│ │ │ └── flutterplayground
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── drawable
│ │ └── launch_background.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── styles.xml
│ │ └── test_strings.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── GoogleSantaTracker.flr
├── fonts
│ ├── MajorMonoDisplay-Regular.ttf
│ ├── Roboto-Bold.ttf
│ ├── Roboto-Medium.ttf
│ └── Roboto-Regular.ttf
└── images
│ ├── feature-graphic.png
│ ├── ic_github.svg
│ └── ic_launcher.png
├── icons
├── Google-Play-Store-Logo.png
├── facebook-icon.png
├── linkedin-icon.png
├── medium-icon.png
└── twitter-icon.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── ExampleNameItem.dart
├── ads
│ └── test_ad_helper.dart
├── main.dart
├── models
│ └── ExapmleNames.dart
├── my_app.dart
├── store
│ ├── theme_store.dart
│ └── theme_store.g.dart
├── ui
│ ├── aboutlisttile
│ │ └── AboutListTileExample.dart
│ ├── animated_crossfade
│ │ └── animated_cross_fade.dart
│ ├── animatedicons
│ │ └── AnimatedIcons.dart
│ ├── animatedsize
│ │ └── AnimatedSize.dart
│ ├── animatedswitcher
│ │ └── AnimatedSwitcherExample.dart
│ ├── app_bar
│ │ └── AppBarExample.dart
│ ├── app_bar_bottom
│ │ └── appbar_bottom.dart
│ ├── backdrop_filter
│ │ └── BackdropFilterExample.dart
│ ├── bottomnavigation
│ │ └── BottomNavigation.dart
│ ├── chipsexample
│ │ └── ChipsExample.dart
│ ├── collapsibletoolbar
│ │ └── CollapsibleToolbar.dart
│ ├── cupertino
│ │ ├── CupertinoActionSheetExample.dart
│ │ ├── CupertinoProgressIndicatorExample.dart
│ │ └── CupertinoTimerPickerExample.dart
│ ├── datatable
│ │ └── data_table_example.dart
│ ├── dismissible
│ │ └── DismissibleExample.dart
│ ├── dragdrop
│ │ └── ExampleDragDrop.dart
│ ├── drawer
│ │ └── NavigationDrawer.dart
│ ├── expanded_example
│ │ └── expanded_example.dart
│ ├── expansion_tile
│ │ ├── ExpansionTileExample.dart
│ │ └── sample_data.dart
│ ├── flare
│ │ └── flare_example.dart
│ ├── flow_example
│ │ └── FlowWidgetExample.dart
│ ├── flutter_admob
│ │ └── admob_example.dart
│ ├── grid_view
│ │ └── grid_view_example.dart
│ ├── gridpaper
│ │ └── GridPaperExample.dart
│ ├── hardwarekey
│ │ └── RawKeyboardDemo.dart
│ ├── lifecycle
│ │ └── Lifecycle.dart
│ ├── local_auth
│ │ └── LocalAuth.dart
│ ├── map
│ │ └── GoogleMapsExample.dart
│ ├── nestedlist
│ │ └── NestedList.dart
│ ├── progressbutton
│ │ └── ProgressButton.dart
│ ├── quick_actions
│ │ └── QuickActionsExample.dart
│ ├── rotatedbox
│ │ └── RotatedBox.dart
│ ├── rotation_transition
│ │ └── RotationTransitionExample.dart
│ ├── staggeredanimation
│ │ └── StaggerDemo.dart
│ ├── stepper
│ │ └── StepperExample.dart
│ ├── tabbar
│ │ └── TabBarExample.dart
│ ├── text
│ │ ├── TextExamples.dart
│ │ ├── TextSpan.dart
│ │ └── TextUnderline.dart
│ ├── tooltip
│ │ └── tooltip.dart
│ ├── transform
│ │ └── transform_example.dart
│ └── wrap
│ │ └── wrap_example.dart
├── ui_ux
│ ├── home_page
│ │ ├── my_home_page.dart
│ │ ├── my_home_page_store.dart
│ │ └── my_home_page_store.g.dart
│ ├── open_source_licenses.dart
│ └── search_widget.dart
├── utils
│ └── Strings.dart
└── values
│ ├── assets.dart
│ ├── imports.dart
│ └── routes.dart
├── preview
├── AnimatedSwitcher.gif
├── GridPaper.jpg
├── Hardware.gif
├── ListGrid.gif
├── RotationTransition.gif
├── about_list_tile.png
├── animated_icons.gif
├── animated_size.gif
├── appbar.png
├── backdrop_filter.png
├── bottom_nav_bar.gif
├── collapsing_app_bar.gif
├── dismissible.gif
├── expansion_tile.png
├── flare.gif
├── google_maps_example.gif
├── home.png
├── nav_drawer_left.png
├── nav_drawer_right.png
├── nav_drawer_right_two.png
├── navigation_drawer.png
├── nested_list.gif
├── progress_button.gif
├── rotated_box.png
├── staggered_animation.gif
├── tab_bar.gif
├── text_span.png
└── text_underline.png
├── pubspec.yaml
└── release_notes.txt
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "contributors": [
8 | {
9 | "login": "prasadsunny1",
10 | "name": "sanni prasad",
11 | "avatar_url": "https://avatars.githubusercontent.com/u/11705392?v=4",
12 | "profile": "http://prasadsunny1.dev",
13 | "contributions": [
14 | "code"
15 | ]
16 | },
17 | {
18 | "login": "dhuma1981",
19 | "name": "Dhrumil Shah",
20 | "avatar_url": "https://avatars.githubusercontent.com/u/298484?v=4",
21 | "profile": "https://github.com/dhuma1981",
22 | "contributions": [
23 | "code"
24 | ]
25 | },
26 | {
27 | "login": "EdgarFabiano",
28 | "name": "Edgar Fabiano De Souza Filho",
29 | "avatar_url": "https://avatars.githubusercontent.com/u/11666921?v=4",
30 | "profile": "https://github.com/EdgarFabiano",
31 | "contributions": [
32 | "code"
33 | ]
34 | }
35 | ],
36 | "contributorsPerLine": 7,
37 | "projectName": "FlutterPlayground",
38 | "projectOwner": "ibhavikmakwana",
39 | "repoType": "github",
40 | "repoHost": "https://github.com",
41 | "skipCi": true
42 | }
43 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/build-and-deploy-to-playstore.yml:
--------------------------------------------------------------------------------
1 | # GitHub action to Build and deploy to Play Store
2 | name: Build and deploy to Play Store
3 |
4 | on:
5 | push:
6 | branches:
7 | - master
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v1
15 | - uses: actions/setup-java@v1
16 | with:
17 | java-version: '12.x'
18 |
19 | - name: Cache Flutter dependencies
20 | uses: actions/cache@v2
21 | with:
22 | path: ~/.pub-cache
23 | key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }}
24 | restore-keys: ${{ runner.os }}-pub-cache-
25 |
26 | - name: Set up keystore.properties
27 | run: |
28 | echo "${{ secrets.KEYSTORE_PROPERTIES }}" > android/key.properties
29 |
30 | - name: Download google-services.json
31 | run: echo "$FIREBASE_CONFIG" > ./android/app/google-services.json
32 |
33 | - uses: subosito/flutter-action@v1.5.3
34 | with:
35 | channel: 'stable'
36 |
37 | - name: Install dependencies
38 | run: flutter pub get
39 |
40 | - name: Build release app bundle
41 | run: flutter build appbundle --release
42 | env:
43 | KEYSTORE_PATH: android/key.jks
44 | KEYSTORE_ALIAS: my_keystore_alias
45 | KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
46 | KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
47 |
48 | - name: Authenticate with Google Play Console
49 | uses: google-github-actions/setup-gcloud@v1
50 | with:
51 | project_id: my-project-id
52 | service_account_key: ${{ secrets.PLAY_STORE_AUTH_TOKEN }}
53 | - name: Upload APK to Google Play Console
54 | uses: r0adkll/upload-google-play@v1
55 | with:
56 | releaseFiles: "build/app/outputs/bundle/release/app-release.aab"
57 | track: "production"
58 | packageName: "com.ibhavikmakwana.flutterplayground"
59 | serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.lock
2 |
3 | # IntelliJ related
4 | *.iml
5 | .idea/
6 | .packages
7 | build/
8 |
9 | # Android related
10 | **/android/**/gradle-wrapper.jar
11 | **/android/.gradle
12 | **/android/gradlew
13 | **/android/gradlew.bat
14 | **/android/local.properties
15 | **/android/**/GeneratedPluginRegistrant.java
16 |
17 | **/ios/Flutter/Generated.xcconfig
18 | **/ios/Runner/GeneratedPluginRegistrant.*
19 | /lib/ui/sample.dart
20 | /lib/ui/widgetapp/
21 | /.flutter-plugins
22 | /android/app/google-services.json
23 | /android/misc/api-8857670977859340350-9644-c1e382e20443.json
24 | .flutter-plugins-dependencies
25 | .dart_tool/
26 | /android/app/flutter_playground.jks
27 | /upload_certificate.pem
28 | /lib/ads/ad_helper.dart
29 | /android/app/release/
30 | /ios/Flutter/flutter_export_environment.sh
31 |
--------------------------------------------------------------------------------
/.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: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at bhavikmakwana43@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 2-Clause License
2 |
3 | Copyright (c) 2021, Bhavik Makwana
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Playground
2 |
3 | [](#contributors-)
4 |
5 |
6 | [](https://app.codacy.com/app/ibhavikmakwana/FlutterPlayground?utm_source=github.com&utm_medium=referral&utm_content=ibhavikmakwana/FlutterPlayground&utm_campaign=Badge_Grade_Dashboard)
7 | [](https://codemagic.io/apps/5d0de80099fdb700102145c9/5d0de80099fdb700102145c8/latest_build)
8 | [](https://saythanks.io/to/ibhavikmakwana)
9 |
10 | Playground app for Flutter.
11 | Contains examples to quickly learn and tinker around with various features.
12 | Consider Contributing if you find this project helpful.
13 |
14 | [
](https://play.google.com/store/apps/details?id=com.ibhavikmakwana.flutterplayground)
15 |
16 | ## Preview
17 |
18 | | Home | App bar | Navigation Drawer |
19 | | ------------------ | --------------------------- | ------------------ |
20 | |
|
|
|
21 |
22 |
23 | | Left Navigation Drawer | Right Navigation Drawer | Right Navigation Drawer |
24 | | ------------------ | --------------------------- | ------------------ |
25 | |
|
|
|
26 |
27 |
28 | | Text Span | Text Underline | AboutListTile |
29 | | ------------------ | ------------------ | ------------------ |
30 | |
|
|
|
31 |
32 | | Rotated Box | Grid Paper | Expansion Tile |
33 | | ------------------ | ------------------ | ------------------ |
34 | |
|
|
|
35 |
36 | | BackdropFilter |
37 | | ------------------ |
38 | |
|
39 |
40 | | Collapsible Toolbar | Bottom Navigation | Animated Icons |
41 | | ------------------ | --------------------------- | ------------------ |
42 | |
|
|
|
43 |
44 |
45 | | Animated Size | Progress Button | Staggered Animation |
46 | | ------------------ | --------------------------- | ------------------ |
47 | |
|
|
|
48 |
49 |
50 | | Tab bar | List to Grid | Hardware clicks |
51 | | ------------------ | --------------------------- | ------------------ |
52 | |
|
|
|
53 |
54 | | AnimatedSwitcher | Nested List | Rotation Transition |
55 | | ------------------ | ------------------ | ------------------ |
56 | |
|
|
|
57 |
58 | | Google Maps Example | Flare Example |
59 | | ------------------ | ------------------ |
60 | |
|
|
61 |
62 | ## Getting Started
63 |
64 | For help getting started with Flutter, view online
65 | [documentation](https://flutter.io/).
66 |
67 | ## Contribute
68 | 1. Fork the the project
69 | 2. Create your feature branch (git checkout -b my-new-feature)
70 | 3. Make required changes and commit (git commit -am 'Add some feature')
71 | 4. Push to the branch (git push origin my-new-feature)
72 | 5. Create new Pull Request
73 |
74 | ## Questions?🤔
75 |
76 | Hit me on
77 |
78 |
79 |
80 |
81 |
82 | ## Donate
83 |
84 | > If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:
85 | >
86 | > - [PayPal](https://www.paypal.me/ibhavikmakwana)
87 | > - Google Pay **(bhavikmakwana43@okhdfcbank)**
88 |
89 | ## License
90 |
91 | Copyright (c) 2020 Bhavik Makwana
92 |
93 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
94 |
95 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
96 |
97 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
98 |
99 | ## Contributors ✨
100 |
101 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
102 |
103 |
104 |
105 |
106 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:lint/analysis_options.yaml
2 | analyzer:
3 | errors:
4 | missing_required_param: error
5 | missing_return: error
6 | must_be_immutable: error
7 | parameter_assignments: error
8 | sort_pub_dependencies: ignore
9 | sort_unnamed_constructors_first: warning
10 | avoid_print: ignore
11 | file_names: ignore
12 | avoid_function_literals_in_foreach_calls: ignore
13 | argument_type_not_assignable: error
14 | unnecessary_getters_setters: error
15 | unnecessary_raw_strings: error
16 | prefer_constructors_over_static_methods: error
17 | exclude:
18 | - "**/*.locator.dart"
19 | - "**/*.router.dart"
20 | - "**/*.logger.dart"
21 | - "**/*.form.dart"
22 | - "**/*.g.dart"
23 | linter:
24 | rules:
25 | parameter_assignments: true
26 | always_use_package_imports: true
27 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 | /misc/flutterplayground.jks
12 | /key.properties
13 | /app/src/main/res/values/strings.xml
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 | apply plugin: 'com.google.gms.google-services' // Google Services plugin
28 | def keystoreProperties = new Properties()
29 | def keystorePropertiesFile = rootProject.file('key.properties')
30 | if (keystorePropertiesFile.exists()) {
31 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32 | }
33 |
34 | android {
35 | compileSdkVersion 33
36 |
37 | sourceSets {
38 |
39 | main.java.srcDirs += 'src/main/kotlin'
40 | }
41 |
42 | lintOptions {
43 | disable 'InvalidPackage'
44 | }
45 |
46 | defaultConfig {
47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
48 | applicationId "com.ibhavikmakwana.flutterplayground"
49 | minSdkVersion 21
50 | targetSdkVersion 33
51 | versionCode flutterVersionCode.toInteger()
52 | versionName flutterVersionName
53 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
54 | }
55 |
56 | signingConfigs {
57 | release {
58 | keyAlias keystoreProperties['keyAlias']
59 | keyPassword keystoreProperties['keyPassword']
60 | storeFile file(keystoreProperties['storeFile'])
61 | storePassword keystoreProperties['storePassword']
62 | }
63 | }
64 | buildTypes {
65 | release {
66 | signingConfig signingConfigs.release
67 |
68 | }
69 | }
70 | }
71 |
72 | flutter {
73 | source '../..'
74 | }
75 |
76 | dependencies {
77 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
78 | testImplementation 'junit:junit:4.13.1'
79 | androidTestImplementation 'androidx.test:runner:1.4.0-alpha06'
80 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-alpha06'
81 | implementation 'com.google.firebase:firebase-analytics:19.0.0'
82 | }
83 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | #Flutter Wrapper
2 | -keep class io.flutter.app.** { *; }
3 | -keep class io.flutter.plugin.** { *; }
4 | -keep class io.flutter.util.** { *; }
5 | -keep class io.flutter.view.** { *; }
6 | -keep class io.flutter.** { *; }
7 | -keep class io.flutter.plugins.** { *; }
8 | -keep class com.google.android.gms.common.GooglePlayServicesUtil {*;}
9 | -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {*;}
10 | -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {*;}
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
33 |
36 |
43 |
47 |
50 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/ibhavikmakwana/flutterplayground/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.ibhavikmakwana.flutterplayground
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity(): FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | You can insert your own image assets here
7 | -
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/test_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.3'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.8'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 | org.gradle.jvmargs=-Xmx1536M
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon May 17 10:23:26 NPT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/assets/GoogleSantaTracker.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/GoogleSantaTracker.flr
--------------------------------------------------------------------------------
/assets/fonts/MajorMonoDisplay-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/fonts/MajorMonoDisplay-Regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/fonts/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/fonts/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/assets/fonts/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/fonts/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/assets/images/feature-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/images/feature-graphic.png
--------------------------------------------------------------------------------
/assets/images/ic_github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/images/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/assets/images/ic_launcher.png
--------------------------------------------------------------------------------
/icons/Google-Play-Store-Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/icons/Google-Play-Store-Logo.png
--------------------------------------------------------------------------------
/icons/facebook-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/icons/facebook-icon.png
--------------------------------------------------------------------------------
/icons/linkedin-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/icons/linkedin-icon.png
--------------------------------------------------------------------------------
/icons/medium-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/icons/medium-icon.png
--------------------------------------------------------------------------------
/icons/twitter-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/icons/twitter-icon.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/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 | 8.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/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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: [UIApplicationLaunchOptionsKey: 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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/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 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | Flutter Playground
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
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 | NSFaceIDUsageDescription
45 | Why is my app authenticating using face id?
46 |
47 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/lib/ExampleNameItem.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:firebase_analytics/firebase_analytics.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_playground/values/imports.dart';
8 |
9 | /// A [ExampleNameItem] to display a [ExampleNames].
10 | class ExampleNameItem extends StatelessWidget {
11 | final ExampleNames exampleNames;
12 | final ValueChanged? onTap;
13 |
14 | const ExampleNameItem({
15 | Key? key,
16 | required this.exampleNames,
17 | this.onTap,
18 | }) : super(key: key);
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return ClipRRect(
23 | borderRadius: BorderRadius.circular(4.0),
24 | child: Card(
25 | elevation: 4.0,
26 | shape: const RoundedRectangleBorder(),
27 | child: Container(
28 | decoration: BoxDecoration(
29 | border: Border(
30 | left: BorderSide(
31 | width: 4.0,
32 | color: Theme.of(context).colorScheme.secondary,
33 | ),
34 | ),
35 | ),
36 | child: InkWell(
37 | onTap: () {
38 | Navigator.pushNamed(context, "/${exampleNames.title}");
39 | FirebaseAnalytics.instance.setCurrentScreen(screenName: exampleNames.title);
40 | },
41 | child: Row(
42 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
43 | children: [
44 | Expanded(
45 | child: Container(
46 | margin: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0),
47 | child: Text(
48 | exampleNames.title,
49 | softWrap: true,
50 | maxLines: 2,
51 | overflow: TextOverflow.ellipsis,
52 | ),
53 | ),
54 | ),
55 | const Padding(
56 | padding: EdgeInsets.all(8.0),
57 | child: Icon(
58 | Icons.chevron_right,
59 | ),
60 | ),
61 | ],
62 | ),
63 | ),
64 | ),
65 | ),
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/ads/test_ad_helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | class AdHelper {
4 | static String get bannerAdUnitId {
5 | if (Platform.isAndroid) {
6 | return "ca-app-pub-3940256099942544/6300978111";
7 | } else {
8 | throw UnsupportedError("Unsupported platform");
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:firebase_core/firebase_core.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_playground/my_app.dart';
8 | import 'package:flutter_playground/store/theme_store.dart';
9 | import 'package:flutter_playground/values/imports.dart';
10 | import 'package:provider/provider.dart';
11 |
12 | Future main() async {
13 | WidgetsFlutterBinding.ensureInitialized();
14 | await Firebase.initializeApp();
15 | return runApp(
16 | Provider(
17 | create: (_) => ThemeStore(),
18 | child: MyApp(),
19 | ),
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/lib/models/ExapmleNames.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | class ExampleNames {
6 | ExampleNames(this.title,);
7 |
8 | final String title;
9 | }
10 |
--------------------------------------------------------------------------------
/lib/my_app.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_analytics/firebase_analytics.dart';
2 | import 'package:firebase_analytics/observer.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_mobx/flutter_mobx.dart';
5 | import 'package:flutter_playground/store/theme_store.dart';
6 | import 'package:flutter_playground/ui_ux/home_page/my_home_page.dart';
7 | import 'package:flutter_playground/ui_ux/home_page/my_home_page_store.dart';
8 | import 'package:flutter_playground/utils/Strings.dart';
9 | import 'package:flutter_playground/values/routes.dart';
10 | import 'package:google_fonts/google_fonts.dart';
11 | import 'package:provider/provider.dart';
12 |
13 | class MyApp extends StatelessObserverWidget {
14 | static FirebaseAnalytics analytics = FirebaseAnalytics.instance;
15 | static FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics);
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialApp(
20 | title: Strings.appName,
21 | theme: ThemeData(
22 | brightness: Brightness.light,
23 | fontFamily: GoogleFonts.poppins().fontFamily,
24 | ),
25 | navigatorObservers: [observer],
26 | themeMode: Provider.of(context).themeMode,
27 | darkTheme: ThemeData(
28 | brightness: Brightness.dark,
29 | fontFamily: GoogleFonts.poppins().fontFamily,
30 | ),
31 | debugShowCheckedModeBanner: false,
32 | home: Provider(
33 | create: (context) => MyHomePageStore()..initList(),
34 | child: const MyHomePage(title: Strings.appName),
35 | ),
36 | routes: DefaultRoutes().routes(),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/store/theme_store.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:mobx/mobx.dart';
3 |
4 | part 'theme_store.g.dart';
5 |
6 | class ThemeStore = _ThemeStore with _$ThemeStore;
7 |
8 | abstract class _ThemeStore with Store {
9 | @observable
10 | ThemeMode themeMode = ThemeMode.light;
11 |
12 | @action
13 | void changeTheme() {
14 | themeMode == ThemeMode.light
15 | ? themeMode = ThemeMode.dark
16 | : themeMode = ThemeMode.light;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/store/theme_store.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'theme_store.dart';
4 |
5 | // **************************************************************************
6 | // StoreGenerator
7 | // **************************************************************************
8 |
9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
10 |
11 | mixin _$ThemeStore on _ThemeStore, Store {
12 | final _$themeModeAtom = Atom(name: '_ThemeStore.themeMode');
13 |
14 | @override
15 | ThemeMode get themeMode {
16 | _$themeModeAtom.context.enforceReadPolicy(_$themeModeAtom);
17 | _$themeModeAtom.reportObserved();
18 | return super.themeMode;
19 | }
20 |
21 | @override
22 | set themeMode(ThemeMode value) {
23 | _$themeModeAtom.context.conditionallyRunInAction(() {
24 | super.themeMode = value;
25 | _$themeModeAtom.reportChanged();
26 | }, _$themeModeAtom, name: '${_$themeModeAtom.name}_set');
27 | }
28 |
29 | final _$_ThemeStoreActionController = ActionController(name: '_ThemeStore');
30 |
31 | @override
32 | dynamic changeTheme() {
33 | final _$actionInfo = _$_ThemeStoreActionController.startAction();
34 | try {
35 | return super.changeTheme();
36 | } finally {
37 | _$_ThemeStoreActionController.endAction(_$actionInfo);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/ui/aboutlisttile/AboutListTileExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AboutListTileExample extends StatefulWidget {
8 | final String title;
9 |
10 | const AboutListTileExample({Key? key, required this.title}) : super(key: key);
11 |
12 | @override
13 | _AboutListTileState createState() => _AboutListTileState();
14 | }
15 |
16 | class _AboutListTileState extends State {
17 | @override
18 | Widget build(BuildContext context) {
19 | return Scaffold(
20 | appBar: AppBar(
21 | title: Text(widget.title),
22 | ),
23 | body: Column(
24 | children: const [
25 | AboutListTile(
26 | icon: FlutterLogo(),
27 | aboutBoxChildren: [
28 | Text("Playground app for Flutter. Contains list of examples."),
29 | ],
30 | applicationIcon: FlutterLogo(),
31 | applicationName: "Flutter Playground",
32 | applicationVersion: "1.0.0",
33 | child: Text("About"),
34 | ),
35 | ],
36 | ),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/ui/animated_crossfade/animated_cross_fade.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AnimatedCrossFadeExample extends StatefulWidget {
8 | final String title;
9 |
10 | const AnimatedCrossFadeExample(this.title);
11 |
12 | @override
13 | _AnimatedCrossFadeExampleState createState() =>
14 | _AnimatedCrossFadeExampleState();
15 | }
16 |
17 | class _AnimatedCrossFadeExampleState extends State {
18 | bool _first = true;
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return Scaffold(
23 | appBar: AppBar(
24 | title: Text(widget.title),
25 | ),
26 | body: Center(
27 | child: Column(
28 | children: [
29 | TextButton(
30 | onPressed: () {
31 | setState(() {
32 | _first = !_first;
33 | });
34 | },
35 | child: const Text("Click")),
36 | AnimatedCrossFade(
37 | sizeCurve: const ElasticOutCurve(),
38 | firstCurve: Curves.decelerate,
39 | secondCurve: Curves.decelerate,
40 | duration: const Duration(seconds: 3),
41 | firstChild: const FlutterLogo(
42 | style: FlutterLogoStyle.horizontal, size: 100.0),
43 | secondChild: const FlutterLogo(size: 100.0),
44 | crossFadeState:
45 | _first ? CrossFadeState.showFirst : CrossFadeState.showSecond,
46 | ),
47 | ],
48 | ),
49 | ),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/ui/animatedicons/AnimatedIcons.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AnimatedIconsDemo extends StatefulWidget {
8 | const AnimatedIconsDemo({Key? key, required this.title}) : super(key: key);
9 |
10 | // This widget is the home page of your application. It is stateful, meaning
11 | // that it has a State object (defined below) that contains fields that affect
12 | // how it looks.
13 |
14 | // This class is the configuration for the state. It holds the values (in this
15 | // case the title) provided by the parent (in this case the App widget) and
16 | // used by the build method of the State. Fields in a Widget subclass are
17 | // always marked "final".
18 |
19 | final String title;
20 |
21 | @override
22 | _AnimatedIconsState createState() => _AnimatedIconsState();
23 | }
24 |
25 | class _AnimatedIconsState extends State
26 | with SingleTickerProviderStateMixin {
27 | late AnimationController _controller;
28 |
29 | @override
30 | void initState() {
31 | super.initState();
32 | _controller = AnimationController(
33 | duration: const Duration(milliseconds: 300),
34 | value: 1.0,
35 | vsync: this,
36 | );
37 | }
38 |
39 | @override
40 | void dispose() {
41 | _controller.dispose();
42 | super.dispose();
43 | }
44 |
45 | bool get _status {
46 | final AnimationStatus status = _controller.status;
47 | return status == AnimationStatus.completed ||
48 | status == AnimationStatus.forward;
49 | }
50 |
51 | @override
52 | Widget build(BuildContext context) {
53 | return Scaffold(
54 | appBar: AppBar(
55 | elevation: 0.0,
56 | title: Text(widget.title),
57 | ),
58 | body: ListView(
59 | children: [
60 | getAnimatedIcon(AnimatedIcons.add_event, "Event to Add"),
61 | getAnimatedIcon(AnimatedIcons.arrow_menu, "Menu to Arrow"),
62 | getAnimatedIcon(AnimatedIcons.close_menu, "Menu to Close "),
63 | getAnimatedIcon(AnimatedIcons.ellipsis_search, "Search to Ellipsis"),
64 | getAnimatedIcon(AnimatedIcons.event_add, "Add to Event"),
65 | getAnimatedIcon(AnimatedIcons.home_menu, "Menu to Home"),
66 | getAnimatedIcon(AnimatedIcons.list_view, "View to List"),
67 | getAnimatedIcon(AnimatedIcons.menu_arrow, "Arrow to Menu"),
68 | getAnimatedIcon(AnimatedIcons.menu_close, "Close to Menu"),
69 | getAnimatedIcon(AnimatedIcons.menu_home, "Home to Menu"),
70 | getAnimatedIcon(AnimatedIcons.pause_play, "Play to Pause"),
71 | getAnimatedIcon(AnimatedIcons.play_pause, "Pause to Play"),
72 | getAnimatedIcon(AnimatedIcons.search_ellipsis, "Ellipsis to Search"),
73 | getAnimatedIcon(AnimatedIcons.view_list, "List to View"),
74 | ],
75 | ),
76 | );
77 | }
78 |
79 | Widget getAnimatedIcon(AnimatedIconData iconData, String title) {
80 | return Padding(
81 | padding: const EdgeInsets.all(8.0),
82 | child: InkWell(
83 | child: Row(
84 | children: [
85 | IconButton(
86 | onPressed: () {
87 | _controller.fling(velocity: _status ? -2.0 : 2.0);
88 | },
89 | icon: AnimatedIcon(
90 | icon: iconData,
91 | progress: _controller.view,
92 | ),
93 | ),
94 | Text(title),
95 | ],
96 | ),
97 | ),
98 | );
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/lib/ui/animatedsize/AnimatedSize.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AnimatedSizeDemo extends StatefulWidget {
8 | const AnimatedSizeDemo({Key? key, required this.title}) : super(key: key);
9 | final String title;
10 |
11 | @override
12 | _AnimatedSizeDemoState createState() => _AnimatedSizeDemoState();
13 | }
14 |
15 | class _AnimatedSizeDemoState extends State
16 | with TickerProviderStateMixin {
17 | double _height = 80.0;
18 | double _width = 80.0;
19 | var _color = Colors.blue;
20 | bool _resized = false;
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return Scaffold(
25 | appBar: AppBar(
26 | title: Text(widget.title),
27 | ),
28 | body: Center(
29 | child: Column(
30 | mainAxisAlignment: MainAxisAlignment.center,
31 | children: [
32 | AnimatedSize(
33 | curve: Curves.bounceInOut,
34 | vsync: this,
35 | duration: const Duration(seconds: 1),
36 | child: GestureDetector(
37 | onTap: () {
38 | setState(() {
39 | if (_resized) {
40 | _resized = false;
41 | _color = Colors.blue;
42 | _height = 80.0;
43 | _width = 80.0;
44 | } else {
45 | _resized = true;
46 | _color = Colors.blue;
47 | _height = 320.0;
48 | _width = 320.0;
49 | }
50 | });
51 | },
52 | child: Container(
53 | width: _width,
54 | height: _height,
55 | color: _color,
56 | ),
57 | ),
58 | ),
59 | ],
60 | ),
61 | ),
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/ui/animatedswitcher/AnimatedSwitcherExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AnimatedSwitcherExample extends StatefulWidget {
8 | const AnimatedSwitcherExample({Key? key, required this.title})
9 | : super(key: key);
10 |
11 | final String title;
12 |
13 | @override
14 | _AnimatedSwitcherExampleState createState() =>
15 | _AnimatedSwitcherExampleState();
16 | }
17 |
18 | class _AnimatedSwitcherExampleState extends State {
19 | int _counter = 0;
20 |
21 | void _incrementCounter() {
22 | setState(() {
23 | _counter += 1;
24 | });
25 | }
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: AppBar(
31 | title: Text(widget.title),
32 | ),
33 | body: Center(
34 | child: Column(
35 | mainAxisAlignment: MainAxisAlignment.center,
36 | children: [
37 | Column(
38 | children: [
39 | const Text(
40 | 'You have pushed the button this many times:',
41 | ),
42 | AnimatedSwitcher(
43 | duration: const Duration(milliseconds: 500),
44 | transitionBuilder:
45 | (Widget child, Animation animation) {
46 | return ScaleTransition(
47 | scale: animation,
48 | child: child,
49 | );
50 | },
51 | child: Text(
52 | '$_counter',
53 | // This key causes the AnimatedSwitcher to interpret this as a ""
54 | // child each time the count changes, so that it will begin its animation
55 | // when the count changes.
56 | key: ValueKey(_counter),
57 | style: Theme.of(context).textTheme.headlineMedium,
58 | ),
59 | ),
60 | ],
61 | ),
62 | ],
63 | ),
64 | ),
65 | floatingActionButton: FloatingActionButton(
66 | onPressed: _incrementCounter,
67 | tooltip: 'Increment',
68 | child: const Icon(Icons.add),
69 | ),
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/ui/app_bar/AppBarExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class AppBarExample extends StatelessWidget {
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: const Text("Default Appbar"),
13 | elevation: 0.0,
14 | ),
15 | body: ListView(
16 | children: [
17 | ///App bar with background color
18 | Container(
19 | margin: const EdgeInsets.only(top: 16.0, bottom: 16.0),
20 | child: AppBar(
21 | title: const Text("Title"),
22 | backgroundColor: Colors.orange,
23 | elevation: 4.0,
24 | ),
25 | ),
26 |
27 | ///App bar with Action items
28 | Container(
29 | margin: const EdgeInsets.only(bottom: 16.0),
30 | child: AppBar(
31 | title: const Text("Appbar actions"),
32 | actions: [
33 | IconButton(
34 | icon: const Icon(Icons.search),
35 | onPressed: () {},
36 | ),
37 | IconButton(
38 | icon: const Icon(Icons.settings),
39 | onPressed: () {},
40 | ),
41 | ],
42 | ),
43 | ),
44 |
45 | ///Center text
46 | Container(
47 | margin: const EdgeInsets.only(bottom: 16.0),
48 | child: AppBar(
49 | title: const Text("Center"),
50 | centerTitle: true,
51 | ),
52 | ),
53 |
54 | ///IconTheme for the app bar
55 | Container(
56 | margin: const EdgeInsets.only(bottom: 16.0),
57 | child: AppBar(
58 | title: const Text("Appbar Icon and Text Theme"),
59 | actions: [
60 | IconButton(
61 | icon: const Icon(Icons.search),
62 | onPressed: () {},
63 | ),
64 | IconButton(
65 | icon: const Icon(Icons.settings),
66 | onPressed: () {},
67 | ),
68 | ],
69 | iconTheme: const IconThemeData(
70 | color: Colors.black,
71 | ), toolbarTextStyle: const TextTheme(
72 | titleLarge: TextStyle(
73 | color: Colors.black,
74 | ),
75 | ).bodyMedium, titleTextStyle: const TextTheme(
76 | titleLarge: TextStyle(
77 | color: Colors.black,
78 | ),
79 | ).titleLarge,
80 | ),
81 | ),
82 |
83 | ///App bar with the title and subtitle
84 | Container(
85 | margin: const EdgeInsets.only(bottom: 16.0),
86 | child: AppBar(
87 | title: Column(
88 | crossAxisAlignment: CrossAxisAlignment.start,
89 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
90 | children: const [
91 | Text(
92 | "Title",
93 | style: TextStyle(fontSize: 18.0),
94 | ),
95 | Text(
96 | "subtitle",
97 | style: TextStyle(fontSize: 14.0),
98 | ),
99 | ],
100 | ),
101 | ),
102 | ),
103 |
104 | ///App bar with the title and and icon/image at start
105 | Container(
106 | margin: const EdgeInsets.only(bottom: 16.0),
107 | child: AppBar(
108 | backgroundColor: Colors.orangeAccent,
109 | title: Row(
110 | children: const [
111 | FlutterLogo(),
112 | Padding(
113 | padding: EdgeInsets.only(left: 16.0),
114 | child: Text(
115 | "Title with image",
116 | ),
117 | ),
118 | ],
119 | ),
120 | ),
121 | ),
122 |
123 | ///App Bar with transparent background
124 | Container(
125 | margin: const EdgeInsets.only(bottom: 16.0),
126 | child: AppBar(
127 | backgroundColor: Colors.transparent,
128 | elevation: 0,
129 | iconTheme: const IconThemeData(color: Colors.black),
130 | title: const Text(
131 | "Transparent AppBar",
132 | style: TextStyle(color: Colors.black),
133 | ),
134 | actions: [
135 | IconButton(
136 | icon: const Icon(Icons.search),
137 | onPressed: () {},
138 | )
139 | ],
140 | ),
141 | )
142 | ],
143 | ),
144 | );
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/lib/ui/app_bar_bottom/appbar_bottom.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AppBarBottom extends StatefulWidget {
4 | final String title;
5 |
6 | const AppBarBottom(this.title);
7 |
8 | @override
9 | _AppBarBottomState createState() => _AppBarBottomState();
10 | }
11 |
12 | class _AppBarBottomState extends State
13 | with SingleTickerProviderStateMixin {
14 | TabController? _tabController;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 | _tabController = TabController(vsync: this, length: 3);
20 | }
21 |
22 | @override
23 | void dispose() {
24 | _tabController!.dispose();
25 | super.dispose();
26 | }
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return Scaffold(
31 | appBar: AppBar(
32 | title: Text(widget.title),
33 | bottom: PreferredSize(
34 | preferredSize: const Size.fromHeight(48),
35 | child: Container(
36 | color: Colors.white,
37 | height: 48,
38 | alignment: Alignment.center,
39 | child: TabPageSelector(controller: _tabController),
40 | ),
41 | ),
42 | ),
43 | body: TabBarView(
44 | controller: _tabController,
45 | children: [
46 | Container(
47 | color: Colors.orangeAccent,
48 | ),
49 | Container(
50 | color: Colors.redAccent,
51 | ),
52 | Container(
53 | color: Colors.blueAccent,
54 | ),
55 | ],
56 | ),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/ui/backdrop_filter/BackdropFilterExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:ui';
6 |
7 | import 'package:flutter/material.dart';
8 |
9 | class BackdropFilterExample extends StatelessWidget {
10 | final String title;
11 |
12 | const BackdropFilterExample(this.title);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | appBar: AppBar(
18 | title: Text(title),
19 | ),
20 | body: Center(
21 | child: Stack(
22 | children: [
23 | const FlutterLogo(
24 | size: 200.0,
25 | ),
26 | ClipRect(
27 | child: BackdropFilter(
28 | filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
29 | child: Container(
30 | width: 200.0,
31 | height: 200.0,
32 | decoration: BoxDecoration(
33 | color: Colors.white.withOpacity(0.5),
34 | ),
35 | ),
36 | ),
37 | ),
38 | ],
39 | ),
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/ui/bottomnavigation/BottomNavigation.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class BottomNavigation extends StatefulWidget {
8 | const BottomNavigation({Key? key, required this.title}) : super(key: key);
9 | final String title;
10 |
11 | @override
12 | _BottomNavigationState createState() => _BottomNavigationState();
13 | }
14 |
15 | class _BottomNavigationState extends State {
16 | PageController? _pageController;
17 | var _page = 0;
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return Scaffold(
22 | appBar: AppBar(
23 | title: Text(widget.title),
24 | ),
25 | body: PageView(
26 | controller: _pageController,
27 | physics: const BouncingScrollPhysics(),
28 | onPageChanged: onPageChanged,
29 | children: [
30 | Container(
31 | color: Colors.orangeAccent,
32 | ),
33 | Container(
34 | color: Colors.redAccent,
35 | ),
36 | Container(
37 | color: Colors.blueAccent,
38 | ),
39 | ],
40 | ),
41 | bottomNavigationBar: BottomNavigationBar(
42 | items: const [
43 | BottomNavigationBarItem(
44 | icon: Icon(Icons.photo),
45 | label: "Photo",
46 | ),
47 | BottomNavigationBarItem(
48 | icon: Icon(Icons.map),
49 | label: "Map",
50 | ),
51 | BottomNavigationBarItem(
52 | icon: Icon(Icons.favorite),
53 | label: "Favorite",
54 | ),
55 | ],
56 | onTap: navigationTapped,
57 | currentIndex: _page,
58 | ),
59 | );
60 | }
61 |
62 | ///
63 | /// Bottom Navigation tap listener
64 | ///
65 | void navigationTapped(int page) {
66 | _pageController!.animateToPage(
67 | page,
68 | duration: const Duration(milliseconds: 300),
69 | curve: Curves.easeIn,
70 | );
71 | }
72 |
73 | void onPageChanged(int page) {
74 | setState(() {
75 | _page = page;
76 | });
77 | }
78 |
79 | @override
80 | void initState() {
81 | super.initState();
82 | _pageController = PageController();
83 | }
84 |
85 | @override
86 | void dispose() {
87 | super.dispose();
88 | _pageController!.dispose();
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/lib/ui/chipsexample/ChipsExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class ChipsExample extends StatefulWidget {
8 | final String title;
9 |
10 | const ChipsExample(this.title);
11 |
12 | @override
13 | ChipsExampleState createState() {
14 | return ChipsExampleState();
15 | }
16 | }
17 |
18 | class ChipsExampleState extends State {
19 | @override
20 | Widget build(BuildContext context) {
21 | return Scaffold(
22 | appBar: AppBar(
23 | title: Text(widget.title),
24 | ),
25 | body: Column(
26 | children: [
27 | Chip(
28 | label: const Text("Simple Chip"),
29 | //This mode has anti-aliased clipping edges to achieve a smoother look.
30 | clipBehavior: Clip.antiAlias,
31 | deleteIcon: const Icon(Icons.remove),
32 | onDeleted: () {},
33 | materialTapTargetSize: MaterialTapTargetSize.padded,
34 | avatar: const CircleAvatar(child: FlutterLogo()),
35 | ),
36 | ActionChip(
37 | label: const Text("Action Chip"),
38 | onPressed: () {},
39 | pressElevation: 4.0,
40 | avatar: const CircleAvatar(child: FlutterLogo()),
41 | )
42 | ],
43 | ),
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/ui/collapsibletoolbar/CollapsibleToolbar.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class CollapsibleToolbar extends StatefulWidget {
8 | const CollapsibleToolbar({Key? key, required this.title}) : super(key: key);
9 | final String title;
10 |
11 | @override
12 | _CollapsibleToolbarState createState() => _CollapsibleToolbarState();
13 | }
14 |
15 | class _CollapsibleToolbarState extends State {
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | body: CustomScrollView(
20 | slivers: [
21 | SliverAppBar(
22 | expandedHeight: 200.0,
23 | pinned: true,
24 | flexibleSpace: FlexibleSpaceBar(
25 | title: Text(widget.title),
26 | ),
27 | ),
28 | SliverFixedExtentList(
29 | delegate: SliverChildBuilderDelegate(
30 | (context, index) => const Text("Flutter list items"),
31 | ),
32 | itemExtent: 24.0)
33 | ],
34 | ),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/ui/cupertino/CupertinoActionSheetExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/cupertino.dart';
6 |
7 | class CupertinoActionSheetExample extends StatelessWidget {
8 | final String title;
9 |
10 | const CupertinoActionSheetExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return CupertinoApp(
15 | home: CupertinoPageScaffold(
16 | navigationBar: CupertinoNavigationBar(
17 | previousPageTitle: "Back",
18 | middle: Text(title),
19 | ),
20 | child: const CupertinoActionSheet(
21 | actions: [
22 | Center(child: Text("First Action")),
23 | Center(child: Text("Second Action")),
24 | ],
25 | cancelButton: Center(child: Text("Cancel")),
26 | ),
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/ui/cupertino/CupertinoProgressIndicatorExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/cupertino.dart';
6 |
7 | class CupertinoProgressIndicatorExample extends StatelessWidget {
8 | final String title;
9 |
10 | const CupertinoProgressIndicatorExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return CupertinoPageScaffold(
15 | navigationBar: CupertinoNavigationBar(
16 | previousPageTitle: "Back",
17 | middle: Text(title),
18 | ),
19 | child: const Center(
20 | child: CupertinoActivityIndicator(),
21 | ),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/ui/cupertino/CupertinoTimerPickerExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class CupertinoTimerPickerExample extends StatelessWidget {
9 | final String title;
10 |
11 | const CupertinoTimerPickerExample(this.title);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: CupertinoNavigationBar(
17 | middle: Text(title),
18 | previousPageTitle: "Back",
19 | ),
20 | body: Center(
21 | child: CupertinoTimerPicker(
22 | initialTimerDuration: const Duration(hours: 1),
23 | onTimerDurationChanged: (Duration value) {},
24 | minuteInterval: 5,
25 | secondInterval: 60,
26 | ),
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/ui/datatable/data_table_example.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class DataClassExample extends StatelessWidget {
4 | final String title;
5 |
6 | const DataClassExample(this.title);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: Text(title),
13 | ),
14 | body: Center(
15 | child: DataTable(
16 | sortColumnIndex: 1,
17 | columns: const [
18 | DataColumn(
19 | label: Text("One"),
20 | numeric: true,
21 | tooltip: "This is first column",
22 | ),
23 | DataColumn(
24 | label: Text("Two"),
25 | )
26 | ],
27 | rows: [
28 | DataRow(
29 | cells: [
30 | DataCell(
31 | const Text("Cell 1"),
32 | showEditIcon: true,
33 | onTap: () {
34 | print("Cell 1 tapped");
35 | },
36 | ),
37 | DataCell(
38 | const Text("Cell 2"),
39 | onTap: () {},
40 | ),
41 | ],
42 | ),
43 | DataRow(
44 | cells: [
45 | DataCell(
46 | const Text("Cell 3"),
47 | onTap: () {},
48 | ),
49 | DataCell(
50 | const Text("Cell 4"),
51 | onTap: () {},
52 | ),
53 | ],
54 | ),
55 | DataRow(
56 | cells: [
57 | DataCell(
58 | const Text("Cell 5"),
59 | onTap: () {},
60 | ),
61 | DataCell(
62 | const Text("Cell 6"),
63 | onTap: () {},
64 | ),
65 | ],
66 | ),
67 | ],
68 | ),
69 | ),
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/ui/dismissible/DismissibleExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class DismissibleExample extends StatelessWidget {
8 | final String title;
9 |
10 | const DismissibleExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text(title),
17 | ),
18 | body: ListView.builder(
19 | itemBuilder: (context, index) => Dismissible(
20 | key: Key(index.toString()),
21 | background: Container(
22 | color: Colors.red,
23 | ),
24 | onDismissed: onDismissed,
25 | movementDuration: const Duration(seconds: 1),
26 | secondaryBackground: Container(
27 | color: Colors.yellow,
28 | ),
29 | child: ListTile(
30 | title: Text("Tile $index"),
31 | ),
32 | ),
33 | ),
34 | );
35 | }
36 |
37 | void onDismissed(DismissDirection index) {
38 | print("$index removed");
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/ui/dragdrop/ExampleDragDrop.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class DragAndDropExample extends StatefulWidget {
8 | final String title;
9 |
10 | const DragAndDropExample({Key? key, required this.title}) : super(key: key);
11 |
12 | @override
13 | DragAndDropAppState createState() => DragAndDropAppState();
14 | }
15 |
16 | class DragAndDropAppState extends State {
17 | int position = 1;
18 |
19 | void moveRect(int pos) {
20 | setState(() {
21 | position = pos;
22 | });
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | appBar: AppBar(title: Text(widget.title)),
29 | body: Column(children: [
30 | Expanded(
31 | child: Row(
32 | mainAxisAlignment: MainAxisAlignment.spaceAround,
33 | children: [
34 | MovableRect(1, position, moveRect),
35 | MovableRect(2, position, moveRect),
36 | MovableRect(3, position, moveRect),
37 | ],
38 | )),
39 | ]));
40 | }
41 | }
42 |
43 | class Dot extends StatefulWidget {
44 | const Dot({Key? key, this.color, this.size, this.child}) : super(key: key);
45 |
46 | final Color? color;
47 | final double? size;
48 | final Widget? child;
49 |
50 | @override
51 | DotState createState() => DotState();
52 | }
53 |
54 | class DotState extends State {
55 | @override
56 | Widget build(BuildContext context) {
57 | return Container(
58 | width: widget.size,
59 | height: widget.size,
60 | decoration:
61 | BoxDecoration(color: widget.color, border: Border.all(width: 0.0)),
62 | child: widget.child);
63 | }
64 | }
65 |
66 | class OutlineRectPainter extends CustomPainter {
67 | const OutlineRectPainter();
68 |
69 | @override
70 | void paint(Canvas canvas, Size size) {
71 | final Paint paint = Paint()
72 | ..color = const Color(0xFF000000)
73 | ..style = PaintingStyle.stroke;
74 | final Path path = Path();
75 | final Rect box = Offset.zero & size;
76 |
77 | path.addRect(box);
78 | canvas.drawPath(path, paint);
79 | }
80 |
81 | @override
82 | bool shouldRepaint(OutlineRectPainter oldDelegate) => false;
83 | }
84 |
85 | class MovableRect extends StatelessWidget {
86 | const MovableRect(this.position, this.rectPosition, this.callback);
87 |
88 | final int position;
89 | final int rectPosition;
90 | final ValueChanged callback;
91 |
92 | static final GlobalKey kRectKey = GlobalKey();
93 | static const double kRectSize = 50.0;
94 |
95 | @override
96 | Widget build(BuildContext context) {
97 | final Widget rect = Dot(
98 | key: kRectKey,
99 | color: Colors.blue.shade700,
100 | size: kRectSize,
101 | );
102 | const Widget outlineRect = SizedBox(
103 | width: kRectSize,
104 | height: kRectSize,
105 | child: CustomPaint(painter: OutlineRectPainter()));
106 | if (position == rectPosition) {
107 | return Draggable(
108 | data: true,
109 | childWhenDragging: outlineRect,
110 | feedback: rect,
111 | maxSimultaneousDrags: 2,
112 | child: rect,
113 | );
114 | } else {
115 | return DragTarget(onAccept: (bool data) {
116 | callback(position);
117 | }, builder:
118 | (BuildContext context, List accepted, List rejected) {
119 | return outlineRect;
120 | });
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/lib/ui/drawer/NavigationDrawer.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_playground/utils/Strings.dart';
7 |
8 | class NavigationDrawerExample extends StatefulWidget {
9 | @override
10 | _NavigationDrawerExampleState createState() => _NavigationDrawerExampleState();
11 | }
12 |
13 | class _NavigationDrawerExampleState extends State {
14 | bool _isVisible = true;
15 |
16 | String _title = "Navigation Example";
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(),
22 | endDrawer: endDrawer(),
23 | drawer: startDrawer(),
24 | body: Center(child: Text(_title)),
25 | );
26 | }
27 |
28 | ///
29 | /// right hand side drawer using [UserAccountsDrawerHeader]
30 | /// [Drawer]
31 | ///
32 | Widget endDrawer() {
33 | return Drawer(
34 | child: ListView(
35 | padding: EdgeInsets.zero,
36 | children: [
37 | UserAccountsDrawerHeader(
38 | accountName: const Text("Flutter Example"),
39 | accountEmail: const Text("flutterexample@gmail.com"),
40 | currentAccountPicture: circularAvatars(),
41 | otherAccountsPictures: [
42 | circularAvatars(),
43 | circularAvatars(),
44 | circularAvatars(),
45 | ],
46 | onDetailsPressed: () {
47 | setState(() {
48 | _isVisible = !_isVisible;
49 | });
50 | },
51 | ),
52 | Offstage(
53 | offstage: _isVisible,
54 | child: Column(
55 | children: [
56 | createDrawerAccountListTiles(),
57 | createDrawerAccountListTiles(),
58 | createDrawerAccountListTiles(),
59 | createDrawerAccountListTiles(),
60 | ],
61 | ),
62 | ),
63 | Offstage(
64 | offstage: !_isVisible,
65 | child: Column(
66 | children: [
67 | createDrawerListTiles(
68 | Icons.photo_camera,
69 | "Import",
70 | ),
71 | createDrawerListTiles(Icons.photo, "Gallery"),
72 | createDrawerListTiles(Icons.slideshow, "Slideshow"),
73 | createDrawerListTiles(Icons.build, "Tools"),
74 | const Divider(),
75 | createDrawerListTiles(Icons.share, "Share"),
76 | createDrawerListTiles(Icons.send, "Send"),
77 | ],
78 | ),
79 | ),
80 | ],
81 | ),
82 | );
83 | }
84 |
85 | ///
86 | /// left side drawer using [DrawerHeader]
87 | ///
88 | Widget startDrawer() {
89 | return Drawer(
90 | child: ListView(
91 | padding: EdgeInsets.zero,
92 | children: [
93 | DrawerHeader(
94 | decoration: const BoxDecoration(color: Colors.orangeAccent),
95 | child: Column(
96 | crossAxisAlignment: CrossAxisAlignment.start,
97 | mainAxisAlignment: MainAxisAlignment.end,
98 | children: const [
99 | FlutterLogo(
100 | size: 48.0,
101 | ),
102 | Text(
103 | "Flutter Example",
104 | style: TextStyle(
105 | fontFamily: Strings.fontRobotoRegular,
106 | fontSize: 16.0,
107 | ),
108 | ),
109 | Text(
110 | "flutterexample@gmail.com",
111 | style: TextStyle(
112 | fontFamily: Strings.fontRobotoRegular,
113 | fontSize: 14.0,
114 | ),
115 | ),
116 | ],
117 | ),
118 | ),
119 | createDrawerListTiles(Icons.photo_camera, "Import"),
120 | createDrawerListTiles(Icons.photo, "Gallery"),
121 | createDrawerListTiles(Icons.slideshow, "Slideshow"),
122 | createDrawerListTiles(Icons.build, "Tools"),
123 | const Divider(),
124 | createDrawerListTiles(Icons.share, "Share"),
125 | createDrawerListTiles(Icons.send, "Send"),
126 | ],
127 | ),
128 | );
129 | }
130 |
131 | ///
132 | /// Account list tile
133 | ///
134 | Widget createDrawerAccountListTiles() {
135 | return const ListTile(
136 | leading: CircleAvatar(
137 | backgroundColor: Colors.orangeAccent,
138 | child: FlutterLogo(),
139 | ),
140 | title: Text(
141 | "flutterexample@gmail.com",
142 | style: TextStyle(
143 | fontFamily: Strings.fontRobotoBold,
144 | fontSize: 16.0,
145 | ),
146 | ),
147 | );
148 | }
149 |
150 | ///
151 | /// Drawer container list tiles
152 | /// [IconData]
153 | ///
154 | Widget createDrawerListTiles(IconData icon, String title) {
155 | return ListTile(
156 | leading: Icon(
157 | icon,
158 | ),
159 | title: Text(
160 | title,
161 | style: const TextStyle(
162 | fontFamily: Strings.fontRobotoBold,
163 | fontSize: 16.0,
164 | ),
165 | ),
166 | onTap: () {
167 | setState(() {
168 | _title = title;
169 | Navigator.pop(context);
170 | });
171 | },
172 | );
173 | }
174 |
175 | ///
176 | /// creates the circular avatar for the header
177 | /// [CircleAvatar]
178 | ///
179 | Widget circularAvatars() {
180 | return const CircleAvatar(
181 | backgroundColor: Colors.orangeAccent,
182 | child: FlutterLogo(),
183 | );
184 | }
185 | }
186 |
--------------------------------------------------------------------------------
/lib/ui/expanded_example/expanded_example.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ExpandedExample extends StatelessWidget {
4 | final String title;
5 |
6 | const ExpandedExample(this.title);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: Text(title),
13 | ),
14 | body: Column(
15 | children: [
16 | Row(
17 | children: [
18 | Container(
19 | color: Colors.yellow,
20 | width: 50,
21 | height: 50,
22 | ),
23 | Expanded(
24 | child: Container(
25 | color: Colors.purple,
26 | height: 50,
27 | width: 50,
28 | ),
29 | ),
30 | Container(
31 | color: Colors.yellow,
32 | width: 50,
33 | height: 50,
34 | ),
35 | ],
36 | ),
37 | Expanded(
38 | child: Row(
39 | children: [
40 | Container(
41 | color: Colors.purple,
42 | width: 50,
43 | ),
44 | Expanded(
45 | child: Container(
46 | color: Colors.yellow,
47 | width: 50,
48 | ),
49 | ),
50 | Container(
51 | color: Colors.purple,
52 | width: 50,
53 | ),
54 | ],
55 | ),
56 | ),
57 | Row(
58 | children: [
59 | Container(
60 | color: Colors.yellow,
61 | width: 50,
62 | height: 50,
63 | ),
64 | Expanded(
65 | child: Container(
66 | color: Colors.purple,
67 | height: 50,
68 | width: 50,
69 | ),
70 | ),
71 | Container(
72 | color: Colors.yellow,
73 | width: 50,
74 | height: 50,
75 | ),
76 | ],
77 | ),
78 | ],
79 | ),
80 | );
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/lib/ui/expansion_tile/ExpansionTileExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_playground/ui/expansion_tile/sample_data.dart';
7 |
8 | final List data = [
9 | SampleData(
10 | "Food & Beverages",
11 | [
12 | SampleData(
13 | "Drinks",
14 | [
15 | SampleData("Tea"),
16 | SampleData("Coffee"),
17 | SampleData("Juices"),
18 | ],
19 | ),
20 | SampleData("Street food"),
21 | ],
22 | ),
23 | SampleData(
24 | "Fashion",
25 | [
26 | SampleData("Men's fashion"),
27 | SampleData("Women's fashion"),
28 | ],
29 | ),
30 | SampleData(
31 | "TVs & Appliances",
32 | [
33 | SampleData("Television"),
34 | SampleData("Washing Machine"),
35 | SampleData(
36 | "Kitchen Appliances",
37 | [
38 | SampleData("Microwave Ovens"),
39 | SampleData("Oven Toaster Grills (OTG)"),
40 | SampleData("Juicer/Mixer/Grinder"),
41 | ],
42 | ),
43 | ],
44 | ),
45 | ];
46 |
47 | class ExpansionTileExample extends StatelessWidget {
48 | final String title;
49 |
50 | const ExpansionTileExample(this.title);
51 |
52 | @override
53 | Widget build(BuildContext context) {
54 | return Scaffold(
55 | appBar: AppBar(
56 | title: Text(title),
57 | ),
58 | body: ListView.builder(
59 | itemBuilder: (BuildContext context, int index) => Item(data[index]),
60 | itemCount: data.length,
61 | ),
62 | );
63 | }
64 | }
65 |
66 | // Displays one Entry. If the entry has children then it's displayed
67 | // with an ExpansionTile.
68 | class Item extends StatelessWidget {
69 | const Item(this.sample);
70 |
71 | final SampleData sample;
72 |
73 | Widget _buildTiles(SampleData root) {
74 | if (root.children.isEmpty) return ListTile(title: Text(root.title));
75 | return ExpansionTile(
76 | key: PageStorageKey(root),
77 | title: Text(root.title),
78 | children: root.children.map(_buildTiles).toList(),
79 | );
80 | }
81 |
82 | @override
83 | Widget build(BuildContext context) {
84 | return _buildTiles(sample);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/ui/expansion_tile/sample_data.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | class SampleData {
6 | SampleData(this.title, [this.children = const []]);
7 |
8 | final String title;
9 | final List children;
10 | }
11 |
--------------------------------------------------------------------------------
/lib/ui/flare/flare_example.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flare_flutter/flare_actor.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class FlareExample extends StatefulWidget {
9 | final String title;
10 |
11 | const FlareExample(this.title);
12 |
13 | @override
14 | FlareExampleState createState() {
15 | return FlareExampleState();
16 | }
17 | }
18 |
19 | class FlareExampleState extends State {
20 | @override
21 | Widget build(BuildContext context) {
22 | return Scaffold(
23 | appBar: AppBar(
24 | title: Text(widget.title),
25 | ),
26 | body: const Center(
27 | child: FlareActor(
28 | "assets/GoogleSantaTracker.flr",
29 | animation: "Untitled",
30 | ),
31 | ),
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/ui/flow_example/FlowWidgetExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class FlowWidgetExample extends StatefulWidget {
8 | final String title;
9 |
10 | const FlowWidgetExample(this.title);
11 |
12 | @override
13 | FlowWidgetExampleState createState() {
14 | return FlowWidgetExampleState();
15 | }
16 | }
17 |
18 | class FlowWidgetExampleState extends State
19 | with TickerProviderStateMixin {
20 | AnimationController? start;
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 | start = AnimationController.unbounded(vsync: this);
26 | }
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return Scaffold(
31 | appBar: AppBar(
32 | title: Text(widget.title),
33 | ),
34 | body: Center(
35 | child: Flow(
36 | delegate: ExampleFlowDelegate(opacity: 0.2, startOffset: start),
37 | children: [
38 | buildBox(0, Colors.red),
39 | buildBox(1, Colors.deepPurple),
40 | buildBox(2, Colors.brown),
41 | buildBox(3, Colors.orange),
42 | buildBox(4, Colors.blueGrey),
43 | buildBox(5, Colors.cyan),
44 | buildBox(6, Colors.blue),
45 | ],
46 | ),
47 | ),
48 | );
49 | }
50 |
51 | Widget buildBox(int i, MaterialColor red) {
52 | return GestureDetector(
53 | onTap: () {
54 | print("TAPPED $i");
55 | },
56 | child: Container(
57 | width: 100.0,
58 | height: 50.0,
59 | color: red,
60 | child:
61 | Center(child: Text('$i', textDirection: TextDirection.ltr))));
62 | }
63 | }
64 |
65 | class ExampleFlowDelegate extends FlowDelegate {
66 | ExampleFlowDelegate({this.opacity, this.startOffset})
67 | : super(repaint: startOffset);
68 |
69 | double? opacity;
70 | Animation? startOffset;
71 |
72 | @override
73 | BoxConstraints getConstraintsForChild(int i, BoxConstraints constraints) {
74 | return constraints.loosen();
75 | }
76 |
77 | @override
78 | void paintChildren(FlowPaintingContext context) {
79 | double dy = startOffset!.value;
80 |
81 | for (int i = 0; i < context.childCount; ++i) {
82 | context.paintChild(i,
83 | opacity: opacity!,
84 | transform: Matrix4.translationValues(0.0, dy, 0.0));
85 | dy += 0.65 * context.getChildSize(i)!.height;
86 | }
87 | }
88 |
89 | @override
90 | bool shouldRepaint(ExampleFlowDelegate oldDelegate) =>
91 | startOffset == oldDelegate.startOffset;
92 | }
93 |
--------------------------------------------------------------------------------
/lib/ui/flutter_admob/admob_example.dart:
--------------------------------------------------------------------------------
1 | //import 'package:firebase_admob/firebase_admob.dart';
2 | //import 'package:flutter/material.dart';
3 | //
4 | //class AdMobExample extends StatefulWidget {
5 | // final String title;
6 | //
7 | // AdMobExample(this.title);
8 | //
9 | // @override
10 | // _AdMobExampleState createState() => _AdMobExampleState();
11 | //}
12 | //
13 | //class _AdMobExampleState extends State {
14 | // static const MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo(
15 | // keywords: ['Flutter'],
16 | // contentUrl: 'http://flutter.dev',
17 | // childDirected: true,
18 | // nonPersonalizedAds: true,
19 | // );
20 | //
21 | // BannerAd _bannerAd;
22 | // InterstitialAd _interstitialAd;
23 | // int _coins = 0;
24 | //
25 | // BannerAd createBannerAd() {
26 | // return BannerAd(
27 | // adUnitId: BannerAd.testAdUnitId, //Replace test unit ID wth actual Unit ID
28 | // size: AdSize.banner,
29 | // targetingInfo: targetingInfo,
30 | // listener: (MobileAdEvent event) {
31 | // print("BannerAd event $event");
32 | // },
33 | // );
34 | // }
35 | //
36 | // InterstitialAd createInterstitialAd() {
37 | // return InterstitialAd(
38 | // adUnitId: InterstitialAd.testAdUnitId,
39 | // //Replace test unit ID wth actual Unit ID
40 | // targetingInfo: targetingInfo,
41 | // listener: (MobileAdEvent event) {
42 | // print("InterstitialAd event $event");
43 | // },
44 | // );
45 | // }
46 | //
47 | // @override
48 | // void initState() {
49 | // super.initState();
50 | // FirebaseAdMob.instance.initialize(
51 | // appId: FirebaseAdMob.testAppId); //Replace test app ID wth actual app ID
52 | // _bannerAd = createBannerAd()..load();
53 | // RewardedVideoAd.instance.listener =
54 | // (RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
55 | // print("RewardedVideoAd event $event");
56 | // if (event == RewardedVideoAdEvent.rewarded) {
57 | // setState(() {
58 | // _coins += rewardAmount;
59 | // });
60 | // }
61 | // };
62 | // }
63 | //
64 | // @override
65 | // void dispose() {
66 | // _bannerAd?.dispose();
67 | // _interstitialAd?.dispose();
68 | // super.dispose();
69 | // }
70 | //
71 | // @override
72 | // Widget build(BuildContext context) {
73 | // return MaterialApp(
74 | // home: Scaffold(
75 | // appBar: AppBar(
76 | // title: Text(widget.title),
77 | // ),
78 | // body: SingleChildScrollView(
79 | // child: Center(
80 | // child: Column(
81 | // crossAxisAlignment: CrossAxisAlignment.center,
82 | // mainAxisSize: MainAxisSize.min,
83 | // children: [
84 | // RaisedButton(
85 | // child: const Text('SHOW BANNER'),
86 | // onPressed: () {
87 | // _bannerAd ??= createBannerAd();
88 | // _bannerAd
89 | // ..load()
90 | // ..show();
91 | // }),
92 | // RaisedButton(
93 | // child: const Text('REMOVE BANNER'),
94 | // onPressed: () {
95 | // _bannerAd?.dispose();
96 | // _bannerAd = null;
97 | // }),
98 | // RaisedButton(
99 | // child: const Text('LOAD INTERSTITIAL'),
100 | // onPressed: () {
101 | // _interstitialAd?.dispose();
102 | // _interstitialAd = createInterstitialAd()..load();
103 | // },
104 | // ),
105 | // RaisedButton(
106 | // child: const Text('SHOW INTERSTITIAL'),
107 | // onPressed: () {
108 | // _interstitialAd?.show();
109 | // },
110 | // ),
111 | // RaisedButton(
112 | // child: const Text('LOAD REWARDED VIDEO'),
113 | // onPressed: () {
114 | // RewardedVideoAd.instance.load(
115 | // adUnitId: RewardedVideoAd.testAdUnitId,
116 | // //Replace test unit ID wth actual Unit ID
117 | // targetingInfo: targetingInfo);
118 | // },
119 | // ),
120 | // RaisedButton(
121 | // child: const Text('SHOW REWARDED VIDEO'),
122 | // onPressed: () {
123 | // RewardedVideoAd.instance.show();
124 | // },
125 | // ),
126 | // Text("You have $_coins coins."),
127 | // ].map((Widget button) {
128 | // return Padding(
129 | // padding: const EdgeInsets.symmetric(vertical: 16.0),
130 | // child: button,
131 | // );
132 | // }).toList(),
133 | // ),
134 | // ),
135 | // ),
136 | // ),
137 | // );
138 | // }
139 | //}
140 |
--------------------------------------------------------------------------------
/lib/ui/grid_view/grid_view_example.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 | import 'package:flutter/material.dart';
5 |
6 | class GridViewExample extends StatelessWidget {
7 | final String title;
8 |
9 | const GridViewExample(this.title) : super();
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | appBar: AppBar(
14 | title: Text(title),
15 | ),
16 | body: GridView.builder(
17 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
18 | crossAxisCount: 3),
19 | itemCount: 10,
20 | itemBuilder: (BuildContext context, int index) {
21 | return Item(index);
22 | }),
23 | );
24 | }
25 | }
26 |
27 | class Item extends StatelessWidget {
28 | const Item(this.index);
29 | final int index;
30 |
31 | Widget _buildTiles() {
32 | return GridTile(
33 | key: PageStorageKey(index),
34 | child: Center(
35 | child: Text(
36 | index.toString(),
37 | ),
38 | ),
39 | );
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return _buildTiles();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/ui/gridpaper/GridPaperExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class GridPaperExample extends StatelessWidget {
8 | final String title;
9 |
10 | const GridPaperExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text(title),
17 | ),
18 | body: GridPaper(
19 | color: Colors.red,
20 | child: Container(),
21 | ),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/ui/hardwarekey/RawKeyboardDemo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 |
8 | class RawKeyboardDemo extends StatefulWidget {
9 | final String title;
10 |
11 | const RawKeyboardDemo({Key? key, required this.title}) : super(key: key);
12 |
13 | @override
14 | _HardwareKeyDemoState createState() => _HardwareKeyDemoState();
15 | }
16 |
17 | class _HardwareKeyDemoState extends State {
18 | final FocusNode _focusNode = FocusNode();
19 | RawKeyEvent? _event;
20 |
21 | @override
22 | void dispose() {
23 | _focusNode.dispose();
24 | super.dispose();
25 | }
26 |
27 | void _handleKeyEvent(RawKeyEvent event) {
28 | setState(() {
29 | _event = event;
30 | });
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | final TextTheme textTheme = Theme.of(context).textTheme;
36 | return Scaffold(
37 | appBar: AppBar(
38 | title: Text(widget.title),
39 | ),
40 | body: Center(
41 | child: RawKeyboardListener(
42 | focusNode: _focusNode,
43 | onKey: _handleKeyEvent,
44 | child: AnimatedBuilder(
45 | animation: _focusNode,
46 | builder: (BuildContext context, Widget? child) {
47 | if (!_focusNode.hasFocus) {
48 | return GestureDetector(
49 | onTap: () {
50 | FocusScope.of(context).requestFocus(_focusNode);
51 | },
52 | child: Text('Tap to focus', style: textTheme.headlineMedium),
53 | );
54 | }
55 |
56 | if (_event == null) {
57 | return Text('Press Volume key', style: textTheme.headlineMedium);
58 | }
59 |
60 | int? flags;
61 | int? codePoint;
62 | int? keyCode;
63 | int? scanCode;
64 | int? metaState;
65 | final RawKeyEventData data = _event!.data;
66 |
67 | if (data is RawKeyEventDataAndroid) {
68 | flags = data.flags;
69 | codePoint = data.codePoint;
70 | keyCode = data.keyCode;
71 | scanCode = data.scanCode;
72 | metaState = data.metaState;
73 | }
74 |
75 | return Column(
76 | mainAxisAlignment: MainAxisAlignment.center,
77 | children: [
78 | Text('${_event.runtimeType}', style: textTheme.titleMedium),
79 | Text('flags: $flags', style: textTheme.titleMedium),
80 | Text('codePoint: $codePoint', style: textTheme.titleMedium),
81 | Text('keyCode: $keyCode', style: textTheme.titleMedium),
82 | Text('scanCode: $scanCode', style: textTheme.titleMedium),
83 | Text('metaState: $metaState', style: textTheme.titleMedium),
84 | ],
85 | );
86 | },
87 | ),
88 | ),
89 | ),
90 | );
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/lib/ui/lifecycle/Lifecycle.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class Lifecycle extends StatefulWidget {
8 | final String title;
9 |
10 | const Lifecycle({Key? key, required this.title}) : super(key: key);
11 |
12 | @override
13 | _LifecycleState createState() => _LifecycleState();
14 | }
15 |
16 | class _LifecycleState extends State with WidgetsBindingObserver {
17 | final List _appLifecycleState = [];
18 |
19 | @override
20 | void initState() {
21 | super.initState();
22 | WidgetsBinding.instance.addObserver(this);
23 | }
24 |
25 | @override
26 | void dispose() {
27 | super.dispose();
28 | WidgetsBinding.instance.removeObserver(this);
29 | }
30 |
31 | @override
32 | void didChangeAppLifecycleState(AppLifecycleState state) {
33 | super.didChangeAppLifecycleState(state);
34 | setState(() {
35 | _appLifecycleState.add(state);
36 | });
37 | }
38 |
39 | List _stateString() {
40 | return List.generate(_appLifecycleState.length, (int index) {
41 | return Text('lifecycle state : $_appLifecycleState,');
42 | });
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return Scaffold(
48 | appBar: AppBar(
49 | title: Text(widget.title),
50 | ),
51 | body: ListView(
52 | children: _stateString(),
53 | ),
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/lib/ui/local_auth/LocalAuth.dart:
--------------------------------------------------------------------------------
1 | //// Copyright 2020 The Chromium Authors. All rights reserved.
2 | //// Use of this source code is governed by a BSD-style license that can be
3 | //// found in the LICENSE file.
4 | //
5 | //import 'dart:async';
6 | //
7 | //import 'package:flutter/material.dart';
8 | //import 'package:flutter/services.dart';
9 | //import 'package:local_auth/local_auth.dart';
10 | //
11 | //class LocalAuthExample extends StatefulWidget {
12 | // final String title;
13 | //
14 | // LocalAuthExample({Key key, this.title}) : super(key: key);
15 | //
16 | // @override
17 | // _LocalAuthState createState() => _LocalAuthState();
18 | //}
19 | //
20 | //class _LocalAuthState extends State {
21 | // String _authorized = 'Not Authorized';
22 | //
23 | // Future _authenticate() async {
24 | // final LocalAuthentication auth = LocalAuthentication();
25 | // bool authenticated = false;
26 | // try {
27 | // authenticated = await auth.authenticateWithBiometrics(
28 | // localizedReason: 'Scan your fingerprint to authenticate',
29 | // useErrorDialogs: true,
30 | // stickyAuth: false);
31 | // } on PlatformException catch (e) {
32 | // print(e);
33 | // }
34 | // if (!mounted) return;
35 | //
36 | // setState(() {
37 | // _authorized = authenticated ? 'Authorized' : 'Not Authorized';
38 | // });
39 | // }
40 | //
41 | // @override
42 | // Widget build(BuildContext context) {
43 | // return Scaffold(
44 | // appBar: AppBar(
45 | // title: Text(widget.title),
46 | // ),
47 | // body: ConstrainedBox(
48 | // constraints: const BoxConstraints.expand(),
49 | // child: Column(
50 | // mainAxisAlignment: MainAxisAlignment.spaceAround,
51 | // children: [
52 | // Text('Current State: $_authorized\n'),
53 | // RaisedButton(
54 | // child: const Text('Authenticate'),
55 | // onPressed: _authenticate,
56 | // ),
57 | // ],
58 | // ),
59 | // ),
60 | // );
61 | // }
62 | //}
63 |
--------------------------------------------------------------------------------
/lib/ui/map/GoogleMapsExample.dart:
--------------------------------------------------------------------------------
1 | //// Copyright 2020 The Chromium Authors. All rights reserved.
2 | //// Use of this source code is governed by a BSD-style license that can be
3 | //// found in the LICENSE file.
4 | //
5 | //import 'package:flutter/material.dart';
6 | //import 'package:google_maps_flutter/google_maps_flutter.dart';
7 | //
8 | //class GoogleMapsExample extends StatefulWidget {
9 | // final String title;
10 | //
11 | // GoogleMapsExample(this.title);
12 | //
13 | // @override
14 | // State createState() => GoogleMapsExampleState();
15 | //}
16 | //
17 | //class GoogleMapsExampleState extends State {
18 | // GoogleMapController mapController;
19 | //
20 | // @override
21 | // Widget build(BuildContext context) {
22 | // return Scaffold(
23 | // appBar: AppBar(
24 | // title: Text(widget.title),
25 | // ),
26 | // body: Stack(
27 | // children: [
28 | // Container(
29 | // width: double.infinity,
30 | // height: double.infinity,
31 | // child: GoogleMap(
32 | // initialCameraPosition: const CameraPosition(
33 | // bearing: 270.0,
34 | // target: LatLng(23.0225, 72.5714),
35 | // tilt: 30.0,
36 | // zoom: 17.0,
37 | // ),
38 | // onMapCreated: _onMapCreated,
39 | // ),
40 | // ),
41 | // Padding(
42 | // padding: const EdgeInsets.all(8.0),
43 | // child: Align(
44 | // alignment: Alignment.bottomRight,
45 | // child: FloatingActionButton(
46 | // onPressed: mapController == null
47 | // ? null
48 | // : () {
49 | // mapController
50 | // .animateCamera(CameraUpdate.CameraPosition(
51 | // const CameraPosition(
52 | // bearing: 270.0,
53 | // target: LatLng(23.0225, 72.5714),
54 | // tilt: 30.0,
55 | // zoom: 17.0,
56 | // ),
57 | // ));
58 | // },
59 | // mini: true,
60 | // child: Icon(Icons.my_location),
61 | // ),
62 | // ),
63 | // ),
64 | // ],
65 | // ),
66 | // );
67 | // }
68 | //
69 | // void _onMapCreated(GoogleMapController controller) {
70 | // setState(() {
71 | // mapController = controller;
72 | // });
73 | // }
74 | //}
75 |
--------------------------------------------------------------------------------
/lib/ui/nestedlist/NestedList.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class NestedList extends StatelessWidget {
8 | final String title;
9 |
10 | const NestedList(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text(title),
17 | ),
18 | body: ListView.builder(
19 | primary: true,
20 | itemBuilder: (BuildContext context, int index) {
21 | return buildHorizontalListView();
22 | },
23 | itemCount: 5,
24 | ),
25 | );
26 | }
27 |
28 | Widget buildHorizontalListView() {
29 | return SizedBox(
30 | height: 50.0,
31 | child: ListView.builder(
32 | scrollDirection: Axis.horizontal,
33 | shrinkWrap: true,
34 | physics: const ClampingScrollPhysics(),
35 | itemBuilder: (BuildContext context, int index) {
36 | return SizedBox(
37 | width: 50.0,
38 | child: ListTile(
39 | title: Text(index.toString()),
40 | ),
41 | );
42 | },
43 | itemCount: 10,
44 | ),
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/ui/progressbutton/ProgressButton.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter/material.dart';
8 |
9 | class ProgressButton extends StatefulWidget {
10 | const ProgressButton({Key? key, required this.title}) : super(key: key);
11 |
12 | final String title;
13 |
14 | @override
15 | _ProgressButtonState createState() => _ProgressButtonState();
16 | }
17 |
18 | class _ProgressButtonState extends State
19 | with TickerProviderStateMixin {
20 | int _state = 0;
21 | late Animation _animation;
22 | late AnimationController _controller;
23 | final GlobalKey _globalKey = GlobalKey();
24 | double _width = double.infinity;
25 |
26 | @override
27 | void dispose() {
28 | super.dispose();
29 | _controller.dispose();
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | appBar: AppBar(
36 | title: Text(widget.title),
37 | ),
38 | body: Center(
39 | child: PhysicalModel(
40 | elevation: 8.0,
41 | shadowColor: Colors.lightGreenAccent,
42 | color: Colors.lightGreen,
43 | borderRadius: BorderRadius.circular(25.0),
44 | child: SizedBox(
45 | key: _globalKey,
46 | height: 48.0,
47 | width: _width,
48 | child: ElevatedButton(
49 | style: ElevatedButton.styleFrom(
50 | padding: const EdgeInsets.all(0.0), backgroundColor: Colors.lightGreen,
51 | elevation: 4.0,
52 | ),
53 | onPressed: () {
54 | setState(() {
55 | if (_state == 0) {
56 | animateButton();
57 | }
58 | });
59 | },
60 | child: setUpButtonChild(),
61 | ),
62 | ),
63 | ),
64 | ),
65 | );
66 | }
67 |
68 | ///
69 | /// Set up the child widget for the RaisedButton
70 | ///
71 | Widget setUpButtonChild() {
72 | if (_state == 0) {
73 | return const Text(
74 | "Click Here",
75 | style: TextStyle(
76 | color: Colors.white,
77 | fontSize: 16.0,
78 | ),
79 | );
80 | } else if (_state == 1) {
81 | return const CircularProgressIndicator(
82 | valueColor: AlwaysStoppedAnimation(Colors.white),
83 | );
84 | } else {
85 | return const Icon(Icons.check, color: Colors.white);
86 | }
87 | }
88 |
89 | void animateButton() {
90 | final double initialWidth = _globalKey.currentContext!.size!.width;
91 |
92 | _controller = AnimationController(
93 | duration: const Duration(milliseconds: 300), vsync: this);
94 | _animation = Tween(begin: 0.0, end: 1.0).animate(_controller)
95 | ..addListener(() {
96 | setState(() {
97 | _width = initialWidth - ((initialWidth - 48.0) * _animation.value);
98 | });
99 | });
100 | _controller.forward();
101 |
102 | setState(() {
103 | _state = 1;
104 | });
105 |
106 | Timer(const Duration(milliseconds: 3300), () {
107 | setState(() {
108 | _state = 2;
109 | });
110 | });
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/lib/ui/quick_actions/QuickActionsExample.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:quick_actions/quick_actions.dart';
3 |
4 | class QuickActionsExample extends StatefulWidget {
5 | const QuickActionsExample(this.title);
6 |
7 | final String title;
8 |
9 | @override
10 | _MyHomePageState createState() => _MyHomePageState();
11 | }
12 |
13 | class _MyHomePageState extends State {
14 | @override
15 | void initState() {
16 | super.initState();
17 | final QuickActions quickActions = QuickActions();
18 | quickActions.initialize((String shortcutType) {
19 | if (shortcutType == 'flutter_playground') {
20 | print('Hey. There Welcome to the Flutter Playground app');
21 | }
22 | });
23 |
24 | quickActions.setShortcutItems(
25 | [
26 | const ShortcutItem(
27 | type: 'flutter_playground',
28 | localizedTitle: 'Flutter Playground',
29 | icon: 'AppIcon',
30 | ),
31 | ],
32 | );
33 | }
34 |
35 | @override
36 | Widget build(BuildContext context) {
37 | return Scaffold(
38 | appBar: AppBar(
39 | title: Text(widget.title),
40 | ),
41 | body: const Center(
42 | child: Text(
43 | 'On home screen, long press the icon to '
44 | 'get Main view action. Tapping on that action should print '
45 | 'a message to the log.',
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/ui/rotatedbox/RotatedBox.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class RotatedBoxExample extends StatelessWidget {
8 | final String title;
9 |
10 | const RotatedBoxExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text(title),
17 | ),
18 | body: Center(
19 | child: Column(
20 | mainAxisAlignment: MainAxisAlignment.center,
21 | children: const [
22 | RotatedBox(
23 | quarterTurns: 1,
24 | child: Text("Hello World!"),
25 | ),
26 | RotatedBox(
27 | quarterTurns: 2,
28 | child: Text("Hello World!"),
29 | ),
30 | RotatedBox(
31 | quarterTurns: 3,
32 | child: Text("Hello World!"),
33 | ),
34 | RotatedBox(
35 | quarterTurns: 4,
36 | child: Text("Hello World!"),
37 | ),
38 | ],
39 | ),
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/ui/rotation_transition/RotationTransitionExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class RotationTransitionExample extends StatefulWidget {
8 | final String title;
9 |
10 | const RotationTransitionExample(this.title);
11 |
12 | @override
13 | _RotationTransitionExampleState createState() =>
14 | _RotationTransitionExampleState();
15 | }
16 |
17 | class _RotationTransitionExampleState extends State
18 | with SingleTickerProviderStateMixin {
19 | late AnimationController _animation;
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 | _animation = AnimationController(
25 | duration: const Duration(milliseconds: 3600),
26 | vsync: this,
27 | )..repeat();
28 | }
29 |
30 | @override
31 | void dispose() {
32 | _animation.dispose();
33 | super.dispose();
34 | }
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return Scaffold(
39 | appBar: AppBar(
40 | title: Text(widget.title),
41 | ),
42 | body: Center(
43 | child: RotationTransition(
44 | turns: _animation,
45 | child: Container(
46 | decoration: const FlutterLogoDecoration(),
47 | width: 200.0,
48 | height: 200.0,
49 | )),
50 | ),
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/ui/staggeredanimation/StaggerDemo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter/scheduler.dart' show timeDilation;
9 |
10 | class StaggerAnimation extends StatelessWidget {
11 | StaggerAnimation({Key? key, required this.controller})
12 | :
13 |
14 | // Each animation defined here transforms its value during the subset
15 | // of the controller's duration defined by the animation's interval.
16 | // For example the opacity animation transforms its value during
17 | // the first 10% of the controller's duration.
18 |
19 | opacity = Tween(
20 | begin: 0.0,
21 | end: 1.0,
22 | ).animate(
23 | CurvedAnimation(
24 | reverseCurve: Curves.easeIn,
25 | parent: controller,
26 | curve: const Interval(
27 | 0.0,
28 | 0.100,
29 | curve: Curves.ease,
30 | ),
31 | ),
32 | ),
33 | width = Tween(
34 | begin: 50.0,
35 | end: 150.0,
36 | ).animate(
37 | CurvedAnimation(
38 | reverseCurve: Curves.elasticIn,
39 | parent: controller,
40 | curve: const Interval(
41 | 0.125,
42 | 0.270,
43 | curve: Curves.bounceOut,
44 | ),
45 | ),
46 | ),
47 | height = Tween(begin: 50.0, end: 150.0).animate(
48 | CurvedAnimation(
49 | parent: controller,
50 | curve: const Interval(
51 | 0.270,
52 | 0.395,
53 | curve: Curves.ease,
54 | ),
55 | ),
56 | ),
57 | padding = EdgeInsetsTween(
58 | begin: const EdgeInsets.only(bottom: 16.0),
59 | end: const EdgeInsets.only(bottom: 75.0),
60 | ).animate(
61 | CurvedAnimation(
62 | parent: controller,
63 | curve: const Interval(
64 | 0.250,
65 | 0.395,
66 | curve: Curves.ease,
67 | ),
68 | ),
69 | ),
70 | borderRadius = BorderRadiusTween(
71 | begin: BorderRadius.circular(4.0),
72 | end: BorderRadius.circular(75.0),
73 | ).animate(
74 | CurvedAnimation(
75 | reverseCurve: Curves.elasticIn,
76 | parent: controller,
77 | curve: const Interval(
78 | 0.395,
79 | 0.520,
80 | curve: Curves.ease,
81 | ),
82 | ),
83 | ),
84 | color = ColorTween(
85 | begin: Colors.indigo[100],
86 | end: Colors.orange[400],
87 | ).animate(
88 | CurvedAnimation(
89 | parent: controller,
90 | curve: const Interval(
91 | 0.520,
92 | 0.770,
93 | curve: Curves.ease,
94 | ),
95 | ),
96 | ),
97 | super(key: key);
98 |
99 | final Animation controller;
100 | final Animation opacity;
101 | final Animation width;
102 | final Animation height;
103 | final Animation padding;
104 | final Animation borderRadius;
105 | final Animation color;
106 |
107 | // This function is called each time the controller "ticks" a frame.
108 | // When it runs, all of the animation's values will have been
109 | // updated to reflect the controller's current value.
110 | Widget _buildAnimation(BuildContext context, Widget? child) {
111 | return Container(
112 | padding: padding.value,
113 | alignment: Alignment.bottomCenter,
114 | child: Opacity(
115 | opacity: opacity.value,
116 | child: Container(
117 | width: width.value,
118 | height: height.value,
119 | decoration: BoxDecoration(
120 | color: color.value,
121 | border: Border.all(
122 | color: Colors.indigo[300]!,
123 | width: 3.0,
124 | ),
125 | borderRadius: borderRadius.value,
126 | ),
127 | ),
128 | ),
129 | );
130 | }
131 |
132 | @override
133 | Widget build(BuildContext context) {
134 | return AnimatedBuilder(
135 | builder: _buildAnimation,
136 | animation: controller,
137 | );
138 | }
139 | }
140 |
141 | class StaggerDemo extends StatefulWidget {
142 | const StaggerDemo({Key? key, this.title}) : super(key: key);
143 |
144 | final String? title;
145 |
146 | @override
147 | _StaggerDemoState createState() => _StaggerDemoState();
148 | }
149 |
150 | class _StaggerDemoState extends State
151 | with TickerProviderStateMixin {
152 | late AnimationController _controller;
153 |
154 | @override
155 | void initState() {
156 | super.initState();
157 |
158 | _controller = AnimationController(
159 | duration: const Duration(milliseconds: 2000), vsync: this);
160 | }
161 |
162 | @override
163 | void dispose() {
164 | _controller.dispose();
165 | super.dispose();
166 | }
167 |
168 | Future _playAnimation() async {
169 | try {
170 | await _controller.forward().orCancel;
171 | await _controller.reverse().orCancel;
172 | } on TickerCanceled {
173 | // the animation got canceled, probably because we were disposed
174 | }
175 | }
176 |
177 | @override
178 | Widget build(BuildContext context) {
179 | timeDilation = 1.0; // 1.0 is normal animation speed.
180 | return Scaffold(
181 | appBar: AppBar(
182 | title: Text(widget.title!),
183 | ),
184 | body: GestureDetector(
185 | behavior: HitTestBehavior.opaque,
186 | onTap: () {
187 | _playAnimation();
188 | },
189 | child: Center(
190 | child: Container(
191 | width: 300.0,
192 | height: 300.0,
193 | decoration: BoxDecoration(
194 | color: Colors.black.withOpacity(0.1),
195 | border: Border.all(
196 | color: Colors.black.withOpacity(0.5),
197 | ),
198 | ),
199 | child: StaggerAnimation(controller: _controller.view),
200 | ),
201 | ),
202 | ),
203 | );
204 | }
205 | }
206 |
207 | void main() {
208 | runApp(const MaterialApp(home: StaggerDemo()));
209 | }
210 |
--------------------------------------------------------------------------------
/lib/ui/stepper/StepperExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class StepperExample extends StatefulWidget {
8 | const StepperExample({Key? key, required this.title}) : super(key: key);
9 | final String title;
10 |
11 | @override
12 | _StepperExampleState createState() => _StepperExampleState();
13 | }
14 |
15 | class _StepperExampleState extends State {
16 | int stepCounter = 0;
17 | List steps = [
18 | const Step(
19 | title: Text("Step One"),
20 | content: Text("This is the first step"),
21 | isActive: true,
22 | ),
23 | const Step(
24 | title: Text("Step Two"),
25 | content: Text("This is the second step"),
26 | isActive: true,
27 | ),
28 | Step(
29 | title: const Text("Step Three"),
30 | content: Wrap(
31 | spacing: 8.0, // gap between adjacent chips
32 | runSpacing: 4.0, // main axis (rows or columns)
33 | children: const [
34 | Chip(label: Text('Chips11')),
35 | Chip(label: Text('Chips12')),
36 | Chip(label: Text('Chips13')),
37 | Chip(label: Text('Chips14')),
38 | Chip(label: Text('Chips15')),
39 | Chip(label: Text('Chips16'))
40 | ],
41 | ),
42 | isActive: true,
43 | ),
44 | const Step(
45 | title: Text("Step Four"),
46 | content: Text("This is the fourth step"),
47 | isActive: true,
48 | ),
49 | ];
50 |
51 | @override
52 | Widget build(BuildContext context) {
53 | return Scaffold(
54 | appBar: AppBar(
55 | title: Text(widget.title),
56 | ),
57 | body: Stepper(
58 | currentStep: stepCounter,
59 | steps: steps,
60 | onStepTapped: (step) {
61 | setState(() {
62 | stepCounter = step;
63 | });
64 | },
65 | onStepCancel: () {
66 | setState(() {
67 | stepCounter > 0 ? stepCounter -= 1 : stepCounter = 0;
68 | });
69 | },
70 | onStepContinue: () {
71 | setState(() {
72 | stepCounter < steps.length - 1 ? stepCounter += 1 : stepCounter = 0;
73 | });
74 | },
75 | ),
76 | );
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/lib/ui/tabbar/TabBarExample.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class TabBarExample extends StatefulWidget {
8 | final String title;
9 |
10 | const TabBarExample({Key? key, required this.title}) : super(key: key);
11 |
12 | @override
13 | _TabBarExampleState createState() => _TabBarExampleState();
14 | }
15 |
16 | class _TabBarExampleState extends State
17 | with SingleTickerProviderStateMixin {
18 | TabController? _tabController;
19 |
20 | @override
21 | void initState() {
22 | _tabController = TabController(length: 3, vsync: this);
23 | super.initState();
24 | }
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(
30 | title: Text(widget.title),
31 | bottom: TabBar(
32 | tabs: const [
33 | Tab(
34 | text: "Tab 1",
35 | ),
36 | Tab(
37 | text: "Tab 2",
38 | ),
39 | Tab(
40 | text: "Tab 3",
41 | ),
42 | ],
43 | controller: _tabController,
44 | ),
45 | ),
46 | body: TabBarView(
47 | controller: _tabController,
48 | children: [
49 | Container(
50 | color: Colors.orangeAccent,
51 | ),
52 | Container(
53 | color: Colors.redAccent,
54 | ),
55 | Container(
56 | color: Colors.blueAccent,
57 | ),
58 | ],
59 | ),
60 | );
61 | }
62 |
63 | @override
64 | void dispose() {
65 | _tabController!.dispose();
66 | super.dispose();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/ui/text/TextExamples.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_playground/utils/Strings.dart';
7 |
8 | class TextExamples extends StatefulWidget {
9 | final String title;
10 |
11 | const TextExamples({Key? key, required this.title}) : super(key: key);
12 |
13 | @override
14 | _TextExamplesState createState() => _TextExamplesState();
15 | }
16 |
17 | class _TextExamplesState extends State {
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(
22 | title: Text(widget.title),
23 | ),
24 | body: textSpanPage());
25 | }
26 |
27 | Widget textSpanPage() {
28 | return Center(
29 | child: Column(
30 | children: [
31 | textButtons(
32 | Strings.textSpanExampleTitle,
33 | Strings.textSpanExampleRoute,
34 | ),
35 | textButtons(
36 | Strings.textUnderlineExampleTitle,
37 | Strings.textUnderlineExampleRoute,
38 | ),
39 | ],
40 | ),
41 | );
42 | }
43 |
44 | Widget textButtons(String text, String route) {
45 | return Padding(
46 | padding: const EdgeInsets.all(8.0),
47 | child: TextButton(
48 | style: TextButton.styleFrom(
49 | foregroundColor: Colors.red, shape: const RoundedRectangleBorder(), disabledForegroundColor: Colors.white.withOpacity(0.38),
50 | ),
51 | onPressed: () {
52 | Navigator.pushNamed(context, route);
53 | },
54 | child: Text(text),
55 | ),
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/ui/text/TextSpan.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/gestures.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class TextSpanExample extends StatefulWidget {
9 | final String title;
10 |
11 | const TextSpanExample({Key? key, required this.title}) : super(key: key);
12 |
13 | @override
14 | _TextSpanState createState() => _TextSpanState();
15 | }
16 |
17 | class _TextSpanState extends State {
18 | final recognizer = TapGestureRecognizer()
19 | ..onTap = () {
20 | print("You have tapped Flutter");
21 | };
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | appBar: AppBar(
27 | title: Text(widget.title),
28 | ),
29 | body: textSpanPage());
30 | }
31 |
32 | Widget textSpanPage() {
33 | return Column(
34 | mainAxisAlignment: MainAxisAlignment.center,
35 | children: [
36 | textSpan(),
37 | ],
38 | );
39 | }
40 |
41 | Widget textSpan() {
42 | return RichText(
43 | text: TextSpan(
44 | style: TextStyle(
45 | fontWeight: FontWeight.w400,
46 | fontSize: 24.0,
47 | color: Colors.blue.shade500,
48 | ),
49 | children: [
50 | TextSpan(
51 | text: 'Hello, This is the ',
52 | style: TextStyle(
53 | fontWeight: FontWeight.w400,
54 | fontSize: 24.0,
55 | color: Colors.blue.shade500,
56 | ),
57 | ),
58 | TextSpan(
59 | recognizer: recognizer,
60 | text: 'Flutter ',
61 | style: TextStyle(
62 | fontWeight: FontWeight.w900,
63 | fontSize: 24.0,
64 | color: Colors.blue.shade900,
65 | ),
66 | ),
67 | const TextSpan(
68 | text: 'Playground',
69 | ),
70 | ],
71 | ),
72 | textAlign: TextAlign.center,
73 | textDirection: TextDirection.ltr,
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/ui/text/TextUnderline.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class TextUnderline extends StatefulWidget {
8 | final String title;
9 |
10 | const TextUnderline({Key? key, required this.title}) : super(key: key);
11 |
12 | @override
13 | _TextUnderlineState createState() => _TextUnderlineState();
14 | }
15 |
16 | class _TextUnderlineState extends State {
17 | @override
18 | Widget build(BuildContext context) {
19 | return Scaffold(
20 | appBar: AppBar(
21 | title: Text(widget.title),
22 | ),
23 | body: textSpanPage());
24 | }
25 |
26 | Widget textSpanPage() {
27 | return Center(
28 | child: Column(
29 | children: [
30 | textUnderLine("Flutter", TextDecorationStyle.solid, Colors.green),
31 | textUnderLine("Flutter", TextDecorationStyle.dashed, Colors.blue),
32 | textUnderLine("Flutter", TextDecorationStyle.dotted, Colors.red),
33 | textUnderLine("Flutter", TextDecorationStyle.wavy, Colors.amber),
34 | ],
35 | ),
36 | );
37 | }
38 |
39 | Widget textUnderLine(
40 | String text, TextDecorationStyle decorationStyle, Color color) {
41 | return Text(
42 | text,
43 | style: TextStyle(
44 | fontSize: 48.0,
45 | color: color,
46 | decoration: TextDecoration.underline,
47 | decorationStyle: decorationStyle),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/ui/tooltip/tooltip.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class ToolTipExample extends StatelessWidget {
8 | final String title;
9 |
10 | const ToolTipExample(this.title);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text(title),
17 | ),
18 | body: Column(
19 | mainAxisAlignment: MainAxisAlignment.spaceAround,
20 | children: [
21 | const Tooltip(
22 | message: "This is Flutter Logo",
23 | child: FlutterLogo(),
24 | ),
25 | Tooltip(
26 | message: "This is Raised Button",
27 | child: ElevatedButton(
28 | onPressed: () {},
29 | child: const Text("This is Button"),
30 | ),
31 | ),
32 | const Tooltip(
33 | message: "This is camera Icon",
34 | child: Icon(Icons.camera),
35 | )
36 | ],
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/ui/transform/transform_example.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class TransformExample extends StatelessWidget {
6 | final String title;
7 |
8 | const TransformExample(this.title);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | appBar: AppBar(
14 | title: Text(title),
15 | ),
16 | body: Column(
17 | children: [
18 | Transform(
19 | transform: Matrix4.identity()
20 | ..setEntry(3, 2, 10 / 1000)
21 | ..rotateX(pi),
22 | child: Container(
23 | color: Colors.indigo,
24 | height: 150,
25 | width: 150,
26 | ),
27 | ),
28 | Transform.scale(
29 | scale: 2,
30 | origin: const Offset(0, 0),
31 | child: Container(
32 | color: Colors.indigo,
33 | height: 150,
34 | width: 150,
35 | ),
36 | ),
37 | ],
38 | ),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/ui/wrap/wrap_example.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class WrapExample extends StatelessWidget {
6 | final String title;
7 |
8 | const WrapExample(this.title);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | final List colors = [Colors.red, Colors.green, Colors.yellow];
13 | final Random random = Random();
14 |
15 | return Scaffold(
16 | appBar: AppBar(
17 | title: Text(title),
18 | ),
19 | body: Center(
20 | child: Wrap(
21 | children: [
22 | Container(
23 | color: colors[random.nextInt(3)],
24 | height: 100,
25 | width: 100,
26 | ),
27 | const SizedBox(width: 5, height: 5),
28 | Container(
29 | color: colors[random.nextInt(3)],
30 | height: 100,
31 | width: 100,
32 | ),
33 | const SizedBox(width: 5, height: 5),
34 | Container(
35 | color: colors[random.nextInt(3)],
36 | height: 100,
37 | width: 100,
38 | ),
39 | const SizedBox(width: 5, height: 5),
40 | Container(
41 | color: colors[random.nextInt(3)],
42 | height: 100,
43 | width: 100,
44 | ),
45 | const SizedBox(width: 5, height: 5),
46 | Container(
47 | color: colors[random.nextInt(3)],
48 | height: 100,
49 | width: 100,
50 | ),
51 | ],
52 | ),
53 | ),
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/lib/ui_ux/home_page/my_home_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_playground/store/theme_store.dart';
3 | import 'package:flutter_playground/ui_ux/home_page/my_home_page_store.dart';
4 | import 'package:flutter_playground/ui_ux/open_source_licenses.dart';
5 | import 'package:flutter_playground/ui_ux/search_widget.dart';
6 | import 'package:flutter_playground/values/assets.dart';
7 | import 'package:flutter_playground/values/imports.dart';
8 | import 'package:flutter_svg/flutter_svg.dart';
9 | import 'package:provider/provider.dart';
10 | import 'package:url_launcher/url_launcher.dart';
11 |
12 | class MyHomePage extends StatefulWidget {
13 | const MyHomePage({Key? key, required this.title}) : super(key: key);
14 | final String title;
15 |
16 | @override
17 | _MyHomePageState createState() => _MyHomePageState();
18 | }
19 |
20 | class _MyHomePageState extends State {
21 | MyHomePageStore? store;
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | }
27 |
28 | @override
29 | void didChangeDependencies() {
30 | store ??= Provider.of(context);
31 | super.didChangeDependencies();
32 | }
33 |
34 | @override
35 | void dispose() {
36 | super.dispose();
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Scaffold(
42 | floatingActionButton: FloatingActionButton(
43 | onPressed: onFabPressed,
44 | child: const Icon(Icons.lightbulb_outline),
45 | ),
46 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
47 | bottomNavigationBar: BottomAppBar(
48 | shape: const CircularNotchedRectangle(),
49 | child: Row(
50 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
51 | children: [
52 | IconButton(
53 | icon: const Icon(Icons.menu),
54 | onPressed: () => openMenuBottomSheet(context),
55 | ),
56 | IconButton(
57 | icon: const Icon(Icons.search),
58 | onPressed: () => showSearch(
59 | context: context,
60 | delegate: CustomSearchDelegate(store),
61 | ),
62 | ),
63 | ],
64 | ),
65 | ),
66 | body: SingleChildScrollView(
67 | physics: const BouncingScrollPhysics(),
68 | child: Column(
69 | mainAxisSize: MainAxisSize.min,
70 | crossAxisAlignment: CrossAxisAlignment.start,
71 | children: [
72 | SafeArea(
73 | child: Container(
74 | margin: const EdgeInsets.all(16),
75 | child: Row(
76 | children: [
77 | Expanded(
78 | child: Text(
79 | widget.title,
80 | style: Theme.of(context).textTheme.titleLarge,
81 | ),
82 | ),
83 | IconButton(
84 | onPressed: () {
85 | _launchURL(
86 | 'https://github.com/ibhavikmakwana/FlutterPlayground',
87 | );
88 | },
89 | icon: SvgPicture.asset(Assets.icGithub),
90 | ),
91 | ],
92 | ),
93 | ),
94 | ),
95 | Flexible(
96 | child: ClipRRect(
97 | borderRadius: const BorderRadius.all(Radius.circular(16)),
98 | child: Container(
99 | margin: const EdgeInsets.all(16),
100 | child: Image.asset(
101 | Assets.featureGraphic,
102 | height: 150,
103 | width: double.maxFinite,
104 | fit: BoxFit.cover,
105 | ),
106 | ),
107 | ),
108 | ),
109 | Flexible(
110 | child: _buildExampleItemsWidget(),
111 | ),
112 | ],
113 | ),
114 | ),
115 | );
116 | }
117 |
118 | Widget _buildExampleItemsWidget() {
119 | return ListView.builder(
120 | shrinkWrap: true,
121 | physics: const NeverScrollableScrollPhysics(),
122 | itemBuilder: (BuildContext context, int index) => ExampleNameItem(
123 | exampleNames: store!.exampleList[index],
124 | ),
125 | itemCount: store!.exampleList.length,
126 | padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0),
127 | );
128 | }
129 |
130 | //Change Dark/Light Theme
131 | void onFabPressed() => Provider.of(context, listen: false).changeTheme();
132 |
133 | //Open Menu Bottom Sheet
134 | void openMenuBottomSheet(BuildContext context) {
135 | showModalBottomSheet(
136 | context: context,
137 | backgroundColor: Colors.transparent,
138 | builder: (context) {
139 | return Material(
140 | shape: const RoundedRectangleBorder(
141 | borderRadius: BorderRadius.vertical(top: Radius.circular(8)),
142 | ),
143 | child: Wrap(
144 | children: [
145 | ListTile(
146 | title: const Text('About'),
147 | onTap: () => openAboutDialog(context),
148 | ),
149 | const Divider(),
150 | ListTile(
151 | title: const Text('Open-source licenses'),
152 | onTap: () => navigateToOpnSourceLicence(),
153 | ),
154 | const Divider(),
155 | ListTile(
156 | title: const Text('Privacy Policy'),
157 | onTap: () => _launchURL(
158 | 'https://flutter-playground.flycricket.io/privacy.html',
159 | ),
160 | ),
161 | ],
162 | ),
163 | );
164 | },
165 | );
166 | }
167 |
168 | void openAboutDialog(BuildContext context) {
169 | showAboutDialog(
170 | context: context,
171 | applicationLegalese:
172 | 'Playground app for Flutter. Contains examples to quickly learn and tinker around with various features. Consider Contributing if you find this project helpful.',
173 | applicationIcon: Image.asset(
174 | Assets.appIcon,
175 | height: 24,
176 | width: 24,
177 | ),
178 | );
179 | }
180 |
181 | Future _launchURL(String url) async {
182 | if (await canLaunchUrl(Uri.parse(url))) {
183 | await launchUrl(Uri.parse(url));
184 | } else {
185 | throw 'Could not launch $url';
186 | }
187 | }
188 |
189 | void navigateToOpnSourceLicence() {
190 | Navigator.of(context).push(
191 | MaterialPageRoute(
192 | builder: (context) => OpenSourceLicenses(),
193 | ),
194 | );
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/lib/ui_ux/home_page/my_home_page_store.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_playground/values/imports.dart';
2 | import 'package:mobx/mobx.dart';
3 |
4 | part 'my_home_page_store.g.dart';
5 |
6 | class MyHomePageStore = _MyHomePageStore with _$MyHomePageStore;
7 |
8 | abstract class _MyHomePageStore with Store {
9 | @observable
10 | ObservableList exampleList = ObservableList();
11 |
12 | @observable
13 | ObservableList searchResult = ObservableList();
14 |
15 | @action
16 | void search(String query) {
17 | exampleList.forEach((ExampleNames example) {
18 | if (example.title.toLowerCase().contains(query.toLowerCase())) {
19 | searchResult.add(example);
20 | }
21 | });
22 | }
23 |
24 | @action
25 | void initList() {
26 | exampleList = ObservableList.of([
27 | ExampleNames(Strings.appBarTitle),
28 | ExampleNames(Strings.tabBarTitle),
29 | ExampleNames(Strings.navigationDrawerTitle),
30 | ExampleNames(Strings.collapsibleToolbarTitle),
31 | ExampleNames(Strings.bottomNavigationTitle),
32 | ExampleNames(Strings.animatedIconsTitle),
33 | ExampleNames(Strings.animatedSizeTitle),
34 | ExampleNames(Strings.progressButtonTitle),
35 | ExampleNames(Strings.staggerDemoTitle),
36 | ExampleNames(Strings.stepperExampleTitle),
37 | ExampleNames(Strings.hardwareKeyExampleTitle),
38 | ExampleNames(Strings.dragDropExampleTitle),
39 | ExampleNames(Strings.textExampleExampleTitle),
40 | ExampleNames(Strings.animatedSwitcherExampleTitle),
41 | ExampleNames(Strings.aboutListTileExampleTitle),
42 | ExampleNames(Strings.lifeCycleStateExampleTitle),
43 | // ExampleNames(Strings.localAuthTitle),
44 | ExampleNames(Strings.rotatedBoxTitle),
45 | ExampleNames(Strings.nestedListTitle),
46 | ExampleNames(Strings.cupertinoTimerPickerTitle),
47 | ExampleNames(Strings.cupertinoActionSheetTitle),
48 | ExampleNames(Strings.cupertinoProgressIndicatorTitle),
49 | ExampleNames(Strings.gridPaperTitle),
50 | ExampleNames(Strings.chipsExampleTitle),
51 | ExampleNames(Strings.expansionTileTitle),
52 | ExampleNames(Strings.rotationTransitionTitle),
53 | ExampleNames(Strings.flowWidgetExampleTitle),
54 | ExampleNames(Strings.dismissibleExampleTitle),
55 | ExampleNames(Strings.backdropFilterExampleTitle),
56 | // ExampleNames(Strings.googleMapsExampleTitle),
57 | ExampleNames(Strings.toolTipExampleTitle),
58 | ExampleNames(Strings.animatedCrossFadeExampleTitle),
59 | ExampleNames(Strings.flareTitle),
60 | ExampleNames(Strings.dataClassExampleTitle),
61 | ExampleNames(Strings.expandedExampleTitle),
62 | ExampleNames(Strings.wrapExampleTitle),
63 | ExampleNames(Strings.quickActionsTitle),
64 | ExampleNames(Strings.bottomAppBarTitle),
65 | ExampleNames(Strings.transformExampleTitle),
66 | ExampleNames(Strings.admobPluginExample),
67 | ExampleNames(Strings.gridViewExampleTitle),
68 | ]);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/ui_ux/home_page/my_home_page_store.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'my_home_page_store.dart';
4 |
5 | // **************************************************************************
6 | // StoreGenerator
7 | // **************************************************************************
8 |
9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
10 |
11 | mixin _$MyHomePageStore on _MyHomePageStore, Store {
12 | final _$exampleListAtom = Atom(name: '_MyHomePageStore.exampleList');
13 |
14 | @override
15 | ObservableList get exampleList {
16 | _$exampleListAtom.context.enforceReadPolicy(_$exampleListAtom);
17 | _$exampleListAtom.reportObserved();
18 | return super.exampleList;
19 | }
20 |
21 | @override
22 | set exampleList(ObservableList value) {
23 | _$exampleListAtom.context.conditionallyRunInAction(() {
24 | super.exampleList = value;
25 | _$exampleListAtom.reportChanged();
26 | }, _$exampleListAtom, name: '${_$exampleListAtom.name}_set');
27 | }
28 |
29 | final _$_MyHomePageStoreActionController =
30 | ActionController(name: '_MyHomePageStore');
31 |
32 | @override
33 | void initList() {
34 | final _$actionInfo = _$_MyHomePageStoreActionController.startAction();
35 | try {
36 | return super.initList();
37 | } finally {
38 | _$_MyHomePageStoreActionController.endAction(_$actionInfo);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/ui_ux/open_source_licenses.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:webview_flutter/webview_flutter.dart';
3 |
4 | class OpenSource {
5 | String name;
6 | String link;
7 |
8 | OpenSource(this.name, this.link);
9 | }
10 |
11 | class OpenSourceLicenses extends StatelessWidget {
12 | final List list = [
13 | OpenSource('Flutter', 'https://raw.githubusercontent.com/flutter/flutter/master/LICENSE'),
14 | OpenSource('cupertino_icons', 'https://raw.githubusercontent.com/flutter/cupertino_icons/master/LICENSE'),
15 | OpenSource('flare_flutter', 'https://raw.githubusercontent.com/2d-inc/Flare-Flutter/stable/LICENSE'),
16 | OpenSource('quick_actions', 'https://raw.githubusercontent.com/flutter/plugins/master/LICENSE'),
17 | OpenSource(
18 | 'google_fonts', 'https://raw.githubusercontent.com/material-foundation/google-fonts-flutter/master/LICENSE'),
19 | OpenSource('mobx', 'https://raw.githubusercontent.com/mobxjs/mobx.dart/master/LICENSE'),
20 | OpenSource('flutter_mobx', 'https://raw.githubusercontent.com/mobxjs/mobx.dart/master/LICENSE'),
21 | OpenSource('provider', 'https://raw.githubusercontent.com/rrousselGit/provider/master/LICENSE'),
22 | OpenSource('url_launcher', 'https://raw.githubusercontent.com/flutter/plugins/master/LICENSE'),
23 | OpenSource('webview_flutter', 'https://raw.githubusercontent.com/flutter/plugins/master/LICENSE'),
24 | ];
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(title: const Text('Open source licenses')),
30 | body: ListView.separated(
31 | separatorBuilder: (context, index) => const Divider(),
32 | itemCount: list.length,
33 | itemBuilder: (context, index) => ListTile(
34 | title: Text(list[index].name),
35 | onTap: () => navigateToLicence(context, list[index]),
36 | ),
37 | physics: const BouncingScrollPhysics(),
38 | ),
39 | );
40 | }
41 |
42 | void navigateToLicence(BuildContext context, OpenSource licence) {
43 | Navigator.of(context).push(
44 | MaterialPageRoute(
45 | builder: (context) => LicenseDetail(licence: licence),
46 | ),
47 | );
48 | }
49 | }
50 |
51 | class LicenseDetail extends StatefulWidget {
52 | final OpenSource? licence;
53 |
54 | const LicenseDetail({Key? key, this.licence}) : super(key: key);
55 |
56 | @override
57 | _LicenseDetailState createState() => _LicenseDetailState();
58 | }
59 |
60 | class _LicenseDetailState extends State {
61 | late WebViewController _controller;
62 |
63 | @override
64 | void initState() {
65 | super.initState();
66 | _controller = WebViewController()
67 | ..setJavaScriptMode(JavaScriptMode.unrestricted)
68 | ..setBackgroundColor(const Color(0x00000000))
69 | ..setNavigationDelegate(
70 | NavigationDelegate(
71 | onProgress: (int progress) {
72 | // Update loading bar.
73 | },
74 | onPageStarted: (String url) {},
75 | onPageFinished: (String url) {},
76 | onWebResourceError: (WebResourceError error) {},
77 | onNavigationRequest: (NavigationRequest request) {
78 | return NavigationDecision.navigate;
79 | },
80 | ),
81 | )
82 | ..loadRequest(
83 | Uri.parse(widget.licence!.link),
84 | );
85 | }
86 |
87 | @override
88 | Widget build(BuildContext context) {
89 | return Scaffold(
90 | appBar: AppBar(
91 | title: Text(widget.licence!.name),
92 | ),
93 | body: Builder(
94 | builder: (BuildContext context) {
95 | return WebViewWidget(controller: _controller);
96 | // initialUrl: widget.licence!.link,
97 | // onWebViewCreated: (WebViewController webViewController) {
98 | // _controller.complete(webViewController);
99 | // },
100 | // onPageStarted: (String url) {
101 | // print('Page started loading: $url');
102 | // },
103 | // onPageFinished: (String url) {
104 | // print('Page finished loading: $url');
105 | // },
106 | // );
107 | },
108 | ),
109 | );
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/lib/ui_ux/search_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:flutter_playground/ExampleNameItem.dart';
4 | import 'package:flutter_playground/ui_ux/home_page/my_home_page_store.dart';
5 |
6 | class CustomSearchDelegate extends SearchDelegate {
7 | final MyHomePageStore? store;
8 |
9 | CustomSearchDelegate(this.store);
10 |
11 | @override
12 | List buildActions(BuildContext context) {
13 | return [
14 | IconButton(
15 | icon: const Icon(Icons.clear),
16 | onPressed: () {
17 | query = '';
18 | store!.searchResult.clear();
19 | },
20 | ),
21 | ];
22 | }
23 |
24 | @override
25 | Widget buildLeading(BuildContext context) {
26 | return IconButton(
27 | icon: const Icon(Icons.arrow_back),
28 | onPressed: () => close(context, null),
29 | );
30 | }
31 |
32 | @override
33 | Widget buildResults(BuildContext context) => buildListView();
34 |
35 | Observer buildListView() {
36 | if (query.isNotEmpty) {
37 | store!.search(query);
38 | } else {
39 | store!.searchResult.clear();
40 | }
41 | return Observer(
42 | builder: (context) => store!.searchResult.isNotEmpty
43 | ? ListView.builder(
44 | padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
45 | itemCount: store!.searchResult.length,
46 | physics: const BouncingScrollPhysics(),
47 | itemBuilder: (BuildContext context, int index) => ExampleNameItem(
48 | exampleNames: store!.searchResult[index],
49 | ),
50 | )
51 | : Container(),
52 | );
53 | }
54 |
55 | @override
56 | Widget buildSuggestions(BuildContext context) => Container();
57 | }
58 |
--------------------------------------------------------------------------------
/lib/utils/Strings.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | class Strings {
6 | ///App name
7 | static const String appName = "Flutter Playground";
8 |
9 | ///Assets
10 | //Fonts
11 | static const String fontRobotoBold = "MajorMonoDisplay-Regular.ttf";
12 | static const String fontRobotoRegular = "MajorMonoDisplay-Regular.ttf";
13 |
14 | ///routes
15 | static const String defaultExampleRoute = "/Default Example";
16 | static const String appBarExampleRoute = "/App Bar";
17 | static const String tabBarExampleRoute = "/Tab Bar with Tab Bar View";
18 | static const String navigationDrawerExampleRoute = "/Navigation Drawer";
19 | static const String bottomNavigationExampleRoute =
20 | "/Bottom Navigation with PageView";
21 | static const String collapsibleToolbarExampleRoute = "/Collapsible toolbar";
22 | static const String buttonsExampleRoute = "/Buttons";
23 | static const String animatedIconsExampleRoute = "/Animated Icons";
24 | static const String animatedSizeExampleRoute = "/Animated Size";
25 | static const String progressButtonExampleRoute = "/Progress Button";
26 | static const String staggerDemoExampleRoute = "/Stagger Animation";
27 | static const String stepperExampleRoute = "/Stepper Example";
28 | static const String hardwareKeyExampleRoute = "/Hardware Key Example";
29 | static const String dragDropExampleRoute = "/Drag and Drop";
30 | static const String animatedSwitcherExampleRoute = "/AnimatedSwitcher";
31 | static const String textExampleExampleRoute = "/Text Examples";
32 | static const String lifeCycleStateExampleRoute = "/Lifecycle State";
33 | static const String aboutListTileExampleRoute = "/AboutListTile";
34 | static const String rotatedBoxExampleRoute = "/RotatedBox Example";
35 | static const String textSpanExampleRoute = "/Text Span";
36 | static const String textUnderlineExampleRoute = "/Text Underline";
37 | static const String admobPluginRoute = "/AdMob Plugin Example";
38 |
39 | // static const String localAuthExampleRoute = "/Local authentication Example";
40 | static const String nestedListExampleRoute = "/Nested Example";
41 | static const String cupertinoTimerPickerRoute =
42 | "/CupertinoTimerPicker Example";
43 | static const String cupertinoActionSheetRoute =
44 | "/CupertinoActionSheet Example";
45 | static const String cupertinoProgressIndicatorRoute =
46 | "/CupertinoProgressIndicator Example";
47 | static const String gridPaperRoute = "/GridPaper Example";
48 | static const String chipsExampleRoute = "/Chips Example";
49 | static const String expansionTileRoute = "/Expansion Tile Example";
50 | static const String rotationTransitionRoute = "/Rotation Transition Example";
51 | static const String flowWidgetExampleRoute = "/Flow Widget Example";
52 | static const String dismissibleExampleRoute = "/Dismissible Example";
53 | static const String backdropFilterExampleRoute = "/BackdropFilter Example";
54 | static const String googleMapsExampleRoute = "/Google Maps Example";
55 | static const String toolTipExampleRoute = "/ToolTip Example";
56 | static const String animatedCrossFadeExampleRoute =
57 | "/AnimatedCrossFade Example";
58 | static const String flareRoute = "/Flare Example";
59 | static const String dataClassExampleRoute = "/DataClass Example";
60 | static const String expandedExampleRoute = "/Expanded Example";
61 | static const String wrapExampleRoute = "/Wrap Example";
62 | static const String quickActionsRoute = "/QuickActions Example";
63 | static const String bottomAppBarRoute = "/AppBar Bottom Example";
64 | static const String transformExampleRoute = "/Transform Example";
65 | static const String gridViewExampleRoute = "/Grid View Example";
66 |
67 | ///Strings
68 | //Titles
69 | static const String appBarTitle = "App Bar";
70 | static const String tabBarTitle = "Tab Bar with Tab Bar View";
71 | static const String bottomNavigationTitle = "Bottom Navigation with PageView";
72 | static const String buttonsTitle = "Buttons";
73 | static const String animatedIconsTitle = "Animated Icons";
74 | static const String animatedSizeTitle = "Animated Size";
75 | static const String collapsibleToolbarTitle = "Collapsible toolbar";
76 | static const String navigationDrawerTitle = "Navigation Drawer";
77 | static const String progressButtonTitle = "Progress Button";
78 | static const String staggerDemoTitle = "Stagger Animation";
79 | static const String stepperExampleTitle = "Stepper Example";
80 | static const String hardwareKeyExampleTitle = "Hardware Key Example";
81 | static const String dragDropExampleTitle = "Drag and Drop";
82 | static const String animatedSwitcherExampleTitle = "AnimatedSwitcher";
83 | static const String textExampleExampleTitle = "Text Examples";
84 | static const String lifeCycleStateExampleTitle = "Lifecycle State";
85 | static const String aboutListTileExampleTitle = "AboutListTile";
86 | // static const String localAuthTitle = "Local authentication Example";
87 | static const String rotatedBoxTitle = "RotatedBox Example";
88 | static const String nestedListTitle = "Nested Example";
89 | static const String cupertinoTimerPickerTitle =
90 | "CupertinoTimerPicker Example";
91 | static const String cupertinoActionSheetTitle =
92 | "CupertinoActionSheet Example";
93 | static const String cupertinoProgressIndicatorTitle =
94 | "CupertinoProgressIndicator Example";
95 | static const String gridPaperTitle = "GridPaper Example";
96 | static const String chipsExampleTitle = "Chips Example";
97 | static const String expansionTileTitle = "Expansion Tile Example";
98 |
99 | static const String rotationTransitionTitle = "Rotation Transition Example";
100 |
101 | static const String textSpanExampleTitle = "Text Span";
102 | static const String textUnderlineExampleTitle = "Text Underline";
103 | static const String flowWidgetExampleTitle = "Flow Widget Example";
104 | static const String dismissibleExampleTitle = "Dismissible Example";
105 | static const String backdropFilterExampleTitle = "BackdropFilter Example";
106 | static const String googleMapsExampleTitle = "Google Maps Example";
107 | static const String toolTipExampleTitle = "ToolTip Example";
108 | static const String animatedCrossFadeExampleTitle =
109 | "AnimatedCrossFade Example";
110 |
111 | static const String flareTitle = "Flare Example";
112 | static const String dataClassExampleTitle = "DataClass Example";
113 | static const String expandedExampleTitle = "Expanded Example";
114 | static const String wrapExampleTitle = "Wrap Example";
115 | static const String quickActionsTitle = "QuickActions Example";
116 | static const String bottomAppBarTitle = "AppBar Bottom Example";
117 | static const String transformExampleTitle = "Transform Example";
118 | static const String admobPluginExample = "AdMob Plugin Example";
119 | static const String gridViewExampleTitle = "Grid View Example";
120 | }
121 |
--------------------------------------------------------------------------------
/lib/values/assets.dart:
--------------------------------------------------------------------------------
1 | class Assets {
2 | static const String featureGraphic = 'assets/images/feature-graphic.png';
3 | static const String appIcon = 'assets/images/ic_launcher.png';
4 | static const String icGithub = 'assets/images/ic_github.svg';
5 | }
6 |
--------------------------------------------------------------------------------
/lib/values/imports.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | export 'package:flutter/cupertino.dart';
6 | export 'package:flutter_playground/ExampleNameItem.dart';
7 | export 'package:flutter_playground/models/ExapmleNames.dart';
8 | export 'package:flutter_playground/ui/aboutlisttile/AboutListTileExample.dart';
9 | export 'package:flutter_playground/ui/animated_crossfade/animated_cross_fade.dart';
10 | export 'package:flutter_playground/ui/animatedicons/AnimatedIcons.dart';
11 | export 'package:flutter_playground/ui/animatedsize/AnimatedSize.dart';
12 | export 'package:flutter_playground/ui/animatedswitcher/AnimatedSwitcherExample.dart';
13 | export 'package:flutter_playground/ui/app_bar/AppBarExample.dart';
14 | export 'package:flutter_playground/ui/app_bar_bottom/appbar_bottom.dart';
15 | export 'package:flutter_playground/ui/backdrop_filter/BackdropFilterExample.dart';
16 | export 'package:flutter_playground/ui/bottomnavigation/BottomNavigation.dart';
17 | export 'package:flutter_playground/ui/chipsexample/ChipsExample.dart';
18 | export 'package:flutter_playground/ui/collapsibletoolbar/CollapsibleToolbar.dart';
19 | export 'package:flutter_playground/ui/cupertino/CupertinoActionSheetExample.dart';
20 | export 'package:flutter_playground/ui/cupertino/CupertinoProgressIndicatorExample.dart';
21 | export 'package:flutter_playground/ui/cupertino/CupertinoTimerPickerExample.dart';
22 | export 'package:flutter_playground/ui/datatable/data_table_example.dart';
23 | export 'package:flutter_playground/ui/dismissible/DismissibleExample.dart';
24 | export 'package:flutter_playground/ui/dragdrop/ExampleDragDrop.dart';
25 | export 'package:flutter_playground/ui/drawer/NavigationDrawer.dart';
26 | export 'package:flutter_playground/ui/expanded_example/expanded_example.dart';
27 | export 'package:flutter_playground/ui/expansion_tile/ExpansionTileExample.dart';
28 | export 'package:flutter_playground/ui/flare/flare_example.dart';
29 | export 'package:flutter_playground/ui/flow_example/FlowWidgetExample.dart';
30 | export 'package:flutter_playground/ui/grid_view/grid_view_example.dart'
31 | hide Item;
32 | export 'package:flutter_playground/ui/gridpaper/GridPaperExample.dart';
33 | export 'package:flutter_playground/ui/hardwarekey/RawKeyboardDemo.dart';
34 | export 'package:flutter_playground/ui/lifecycle/Lifecycle.dart';
35 | export 'package:flutter_playground/ui/local_auth/LocalAuth.dart';
36 | export 'package:flutter_playground/ui/map/GoogleMapsExample.dart';
37 | export 'package:flutter_playground/ui/nestedlist/NestedList.dart';
38 | export 'package:flutter_playground/ui/progressbutton/ProgressButton.dart';
39 | export 'package:flutter_playground/ui/quick_actions/QuickActionsExample.dart';
40 | export 'package:flutter_playground/ui/rotatedbox/RotatedBox.dart';
41 | export 'package:flutter_playground/ui/rotation_transition/RotationTransitionExample.dart';
42 | export 'package:flutter_playground/ui/staggeredanimation/StaggerDemo.dart';
43 | export 'package:flutter_playground/ui/stepper/StepperExample.dart';
44 | export 'package:flutter_playground/ui/tabbar/TabBarExample.dart';
45 | export 'package:flutter_playground/ui/text/TextExamples.dart';
46 | export 'package:flutter_playground/ui/text/TextSpan.dart';
47 | export 'package:flutter_playground/ui/text/TextUnderline.dart';
48 | export 'package:flutter_playground/ui/tooltip/tooltip.dart';
49 | export 'package:flutter_playground/ui/transform/transform_example.dart';
50 | export 'package:flutter_playground/ui/wrap/wrap_example.dart';
51 | export 'package:flutter_playground/utils/Strings.dart';
52 |
--------------------------------------------------------------------------------
/lib/values/routes.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_playground/values/imports.dart';
2 |
3 | /// Avoid defining a class that contains only static members. (Documentation)
4 |
5 | class DefaultRoutes {
6 | ///returns the named routes
7 | Map routes() {
8 | return {
9 | Strings.appBarExampleRoute: (BuildContext context) => AppBarExample(),
10 | Strings.tabBarExampleRoute: (BuildContext context) => const TabBarExample(title: Strings.tabBarTitle),
11 | Strings.navigationDrawerExampleRoute: (BuildContext context) => NavigationDrawerExample(),
12 | Strings.bottomNavigationExampleRoute: (BuildContext context) =>
13 | const BottomNavigation(title: Strings.bottomNavigationTitle),
14 | Strings.collapsibleToolbarExampleRoute: (BuildContext context) =>
15 | const CollapsibleToolbar(title: Strings.appName),
16 | Strings.animatedIconsExampleRoute: (BuildContext context) =>
17 | const AnimatedIconsDemo(title: Strings.animatedIconsTitle),
18 | Strings.animatedSizeExampleRoute: (BuildContext context) =>
19 | const AnimatedSizeDemo(title: Strings.animatedSizeTitle),
20 | Strings.progressButtonExampleRoute: (BuildContext context) =>
21 | const ProgressButton(title: Strings.progressButtonTitle),
22 | Strings.staggerDemoExampleRoute: (BuildContext context) => const StaggerDemo(title: Strings.staggerDemoTitle),
23 | Strings.stepperExampleRoute: (BuildContext context) => const StepperExample(title: Strings.stepperExampleTitle),
24 | Strings.hardwareKeyExampleRoute: (BuildContext context) =>
25 | const RawKeyboardDemo(title: Strings.hardwareKeyExampleTitle),
26 | Strings.dragDropExampleRoute: (BuildContext context) =>
27 | const DragAndDropExample(title: Strings.dragDropExampleTitle),
28 | Strings.animatedSwitcherExampleRoute: (BuildContext context) =>
29 | const AnimatedSwitcherExample(title: Strings.animatedSwitcherExampleTitle),
30 | Strings.textExampleExampleRoute: (BuildContext context) =>
31 | const TextExamples(title: Strings.textExampleExampleTitle),
32 | Strings.textSpanExampleRoute: (BuildContext context) =>
33 | const TextSpanExample(title: Strings.textSpanExampleTitle),
34 | Strings.textUnderlineExampleRoute: (BuildContext context) =>
35 | const TextUnderline(title: Strings.textUnderlineExampleTitle),
36 | Strings.aboutListTileExampleRoute: (BuildContext context) =>
37 | const AboutListTileExample(title: Strings.aboutListTileExampleTitle),
38 | Strings.lifeCycleStateExampleRoute: (BuildContext context) =>
39 | const Lifecycle(title: Strings.lifeCycleStateExampleTitle),
40 | // Strings.localAuthExampleRoute: (BuildContext context) =>
41 | // LocalAuthExample(title: Strings.localAuthTitle),
42 | Strings.rotatedBoxExampleRoute: (BuildContext context) => const RotatedBoxExample(Strings.rotatedBoxTitle),
43 | Strings.nestedListExampleRoute: (BuildContext context) => const NestedList(Strings.nestedListTitle),
44 | Strings.cupertinoTimerPickerRoute: (BuildContext context) =>
45 | const CupertinoTimerPickerExample(Strings.cupertinoTimerPickerTitle),
46 | Strings.cupertinoActionSheetRoute: (BuildContext context) =>
47 | const CupertinoActionSheetExample(Strings.cupertinoActionSheetTitle),
48 | Strings.cupertinoProgressIndicatorRoute: (BuildContext context) =>
49 | const CupertinoProgressIndicatorExample(Strings.cupertinoProgressIndicatorTitle),
50 | Strings.gridPaperRoute: (BuildContext context) => const GridPaperExample(Strings.gridPaperTitle),
51 | Strings.chipsExampleRoute: (BuildContext context) => const ChipsExample(Strings.chipsExampleTitle),
52 | Strings.expansionTileRoute: (BuildContext context) => const ExpansionTileExample(Strings.expansionTileTitle),
53 | Strings.rotationTransitionRoute: (BuildContext context) =>
54 | const RotationTransitionExample(Strings.rotationTransitionTitle),
55 | Strings.flowWidgetExampleRoute: (BuildContext context) => const FlowWidgetExample(Strings.flowWidgetExampleTitle),
56 | Strings.dismissibleExampleRoute: (BuildContext context) =>
57 | const DismissibleExample(Strings.dismissibleExampleTitle),
58 | Strings.backdropFilterExampleRoute: (BuildContext context) =>
59 | const BackdropFilterExample(Strings.backdropFilterExampleTitle),
60 | Strings.toolTipExampleRoute: (BuildContext context) => const ToolTipExample(Strings.toolTipExampleTitle),
61 | Strings.animatedCrossFadeExampleRoute: (BuildContext context) =>
62 | const AnimatedCrossFadeExample(Strings.animatedCrossFadeExampleTitle),
63 | Strings.flareRoute: (BuildContext context) => const FlareExample(Strings.flareTitle),
64 | Strings.dataClassExampleRoute: (BuildContext context) => const DataClassExample(Strings.dataClassExampleTitle),
65 | // Strings.googleMapsExampleRoute: (BuildContext context) =>
66 | // GoogleMapsExample(Strings.googleMapsExampleTitle),
67 | Strings.expandedExampleRoute: (BuildContext context) => const ExpandedExample(Strings.expandedExampleTitle),
68 | Strings.wrapExampleRoute: (BuildContext context) => const WrapExample(Strings.wrapExampleTitle),
69 | Strings.quickActionsRoute: (BuildContext context) => const QuickActionsExample(Strings.quickActionsTitle),
70 | Strings.bottomAppBarRoute: (BuildContext context) => const AppBarBottom(Strings.bottomAppBarTitle),
71 | Strings.transformExampleRoute: (BuildContext context) => const TransformExample(Strings.transformExampleTitle),
72 | Strings.gridViewExampleRoute: (BuildContext context) => const GridViewExample(Strings.gridViewExampleTitle),
73 | // Strings.admobPluginRoute: (BuildContext context) =>
74 | // AdMobExample(Strings.admobPluginExample),
75 | };
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/preview/AnimatedSwitcher.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/AnimatedSwitcher.gif
--------------------------------------------------------------------------------
/preview/GridPaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/GridPaper.jpg
--------------------------------------------------------------------------------
/preview/Hardware.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/Hardware.gif
--------------------------------------------------------------------------------
/preview/ListGrid.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/ListGrid.gif
--------------------------------------------------------------------------------
/preview/RotationTransition.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/RotationTransition.gif
--------------------------------------------------------------------------------
/preview/about_list_tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/about_list_tile.png
--------------------------------------------------------------------------------
/preview/animated_icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/animated_icons.gif
--------------------------------------------------------------------------------
/preview/animated_size.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/animated_size.gif
--------------------------------------------------------------------------------
/preview/appbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/appbar.png
--------------------------------------------------------------------------------
/preview/backdrop_filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/backdrop_filter.png
--------------------------------------------------------------------------------
/preview/bottom_nav_bar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/bottom_nav_bar.gif
--------------------------------------------------------------------------------
/preview/collapsing_app_bar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/collapsing_app_bar.gif
--------------------------------------------------------------------------------
/preview/dismissible.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/dismissible.gif
--------------------------------------------------------------------------------
/preview/expansion_tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/expansion_tile.png
--------------------------------------------------------------------------------
/preview/flare.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/flare.gif
--------------------------------------------------------------------------------
/preview/google_maps_example.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/google_maps_example.gif
--------------------------------------------------------------------------------
/preview/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/home.png
--------------------------------------------------------------------------------
/preview/nav_drawer_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/nav_drawer_left.png
--------------------------------------------------------------------------------
/preview/nav_drawer_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/nav_drawer_right.png
--------------------------------------------------------------------------------
/preview/nav_drawer_right_two.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/nav_drawer_right_two.png
--------------------------------------------------------------------------------
/preview/navigation_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/navigation_drawer.png
--------------------------------------------------------------------------------
/preview/nested_list.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/nested_list.gif
--------------------------------------------------------------------------------
/preview/progress_button.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/progress_button.gif
--------------------------------------------------------------------------------
/preview/rotated_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/rotated_box.png
--------------------------------------------------------------------------------
/preview/staggered_animation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/staggered_animation.gif
--------------------------------------------------------------------------------
/preview/tab_bar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/tab_bar.gif
--------------------------------------------------------------------------------
/preview/text_span.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/text_span.png
--------------------------------------------------------------------------------
/preview/text_underline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibhavikmakwana/FlutterPlayground/6201689277474cb47f6c788445be71ac412b108f/preview/text_underline.png
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_playground
2 | description: A Flutter application contains a list of Flutter Examples.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.2.9+170
15 |
16 | environment:
17 | sdk: '>=2.18.4 <3.0.0'
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^1.0.5
26 | # local_auth:
27 | flare_flutter: ^3.0.2
28 | # firebase_admob: ^0.9.0+3
29 | quick_actions: ^1.0.2
30 | google_fonts: ^4.0.3
31 | mobx: ^2.1.4
32 | flutter_mobx: ^2.0.6+5
33 | provider: ^6.0.5
34 | url_launcher: ^6.1.10
35 | webview_flutter: ^4.0.7
36 | firebase_analytics: ^10.2.0
37 | firebase_core: ^2.9.0
38 | flutter_svg:
39 |
40 | dev_dependencies:
41 | flutter_test:
42 | sdk: flutter
43 | build_runner: ^2.3.3
44 | mobx_codegen: ^2.1.1
45 | lint: ^2.0.1
46 |
47 | # For information on the generic Dart part of this file, see the
48 | # following page: https://www.dartlang.org/tools/pub/pubspec
49 |
50 | # The following section is specific to Flutter.
51 | flutter:
52 | # The following line ensures that the Material Icons font is
53 | # included with your application, so that you can use the icons in
54 | # the material Icons class.
55 | uses-material-design: true
56 |
57 | # To add assets to your application, add an assets section, like this:
58 | assets:
59 | - assets/
60 | - assets/images/
61 |
--------------------------------------------------------------------------------
/release_notes.txt:
--------------------------------------------------------------------------------
1 | - You can now search in the application
2 | - Some UI/UX Tweaks
3 | - Minor bug fixes
--------------------------------------------------------------------------------