├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── BUG-REPORT.yaml
│ ├── FEATURE-REQUEST.yaml
│ └── QUESTION.yaml
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ └── flutter_easy_dialogs.yaml
├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── dartdoc_options.yaml
├── doc
├── decorations.md
├── dialogs.md
├── faq.md
├── getting-started.md
└── migration_guide_2_to_3.md
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── full_screen
│ │ ├── routes.dart
│ │ └── screens
│ │ │ ├── full_screen_dialog_basic_usage_screen.dart
│ │ │ ├── full_screen_dialog_customization_screen.dart
│ │ │ └── screens.dart
│ ├── main.dart
│ ├── positioned
│ │ ├── routes.dart
│ │ └── screens
│ │ │ ├── positioned_dialog_basic_usage.dart
│ │ │ ├── positioned_dialog_customization_screen.dart
│ │ │ └── positioned_dialog_flutter_animate.dart
│ ├── screens
│ │ └── home_screen.dart
│ └── widget
│ │ └── home_template.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ └── MainMenu.xib
│ │ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
├── pubspec.lock
├── pubspec.yaml
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── lib
├── flutter_easy_dialogs.dart
└── src
│ ├── core
│ ├── android_back_button_interceptor_mixin.dart
│ ├── core.dart
│ ├── easy_dialog_animation.dart
│ ├── easy_dialog_animation_configuration.dart
│ ├── easy_dialog_decoration.dart
│ ├── easy_dialog_dismiss.dart
│ ├── easy_dialogs_controller.dart
│ ├── easy_overlay.dart
│ └── widget
│ │ ├── free_positioned.dart
│ │ └── overlay_provider.dart
│ ├── flutter_easy_dialogs.dart
│ ├── full_screen
│ ├── dialog
│ │ └── full_screen_dialog.dart
│ ├── full_screen.dart
│ ├── shell
│ │ ├── full_screen_shell.dart
│ │ └── modal_banner.dart
│ └── widgets
│ │ ├── easy_full_screen_blur.dart
│ │ └── widget.dart
│ ├── positioned
│ ├── dialog
│ │ └── positioned_dialog.dart
│ ├── positioned.dart
│ └── shell
│ │ ├── banner.dart
│ │ └── positioned_shell.dart
│ └── util
│ └── multiply_animation.dart
├── pubspec.yaml
└── test
├── helper.dart
├── mock.dart
└── src
├── core
├── easy_dialog_animation_configuration_test.dart
├── easy_dialog_animation_test.dart
├── easy_dialog_controller_test.dart
├── easy_dialog_dismiss_test.dart
├── easy_overlay_box_test.dart
├── easy_overlay_entry_test.dart
└── widget
│ └── free_positioned_test.dart
├── flutter_easy_dialogs_test.dart
├── full_screen
└── dialog
│ ├── full_screen_dialog_test.dart
│ └── insert_test.dart
├── positioned
└── dialog
│ ├── insert_test.dart
│ └── positioned_dialog_test.dart
└── util
└── multiply_animation_test.dart
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Every request must be reviewed and accepted by:
2 |
3 | * @feduke-nukem
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: File a bug report
3 | title: "[Bug]: "
4 | labels: ["bug"]
5 | assignees:
6 | - feduke-nukem
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this bug report!
12 | - type: textarea
13 | id: what-happened
14 | attributes:
15 | label: What happened?
16 | description: Also tell us, what did you expect to happen?
17 | placeholder: Tell us what you see!
18 | value: "A bug happened!"
19 | validations:
20 | required: true
21 | - type: textarea
22 | id: logs
23 | attributes:
24 | label: Relevant log output
25 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
26 | render: shell
27 | - type: checkboxes
28 | id: terms
29 | attributes:
30 | label: Code of Conduct
31 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/feduke-nukem/flutter_easy_dialogs/blob/main/CODE_OF_CONDUCT.md)
32 | options:
33 | - label: I agree to follow this project's Code of Conduct
34 | required: true
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yaml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: File a feature request
3 | title: "[Feature]: "
4 | labels: ["feature request"]
5 | assignees:
6 | - feduke-nukem
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this feature request!
12 | - type: textarea
13 | id: your-idea
14 | attributes:
15 | label: What is your idea?
16 | description: Tell us about your idea.
17 | placeholder: Your idea
18 | value: "Your idea!"
19 | validations:
20 | required: true
21 | - type: checkboxes
22 | id: terms
23 | attributes:
24 | label: Code of Conduct
25 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/feduke-nukem/flutter_easy_dialogs/blob/main/CODE_OF_CONDUCT.md)
26 | options:
27 | - label: I agree to follow this project's Code of Conduct
28 | required: true
29 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/QUESTION.yaml:
--------------------------------------------------------------------------------
1 | name: Question
2 | description: File a question
3 | title: "[Question]: "
4 | labels: ["question"]
5 | assignees:
6 | - feduke-nukem
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this question!
12 | - type: textarea
13 | id: your-question
14 | attributes:
15 | label: What is your question?
16 | description: Ask a question.
17 | placeholder: Your question
18 | value: "Your question!"
19 | validations:
20 | required: true
21 | - type: checkboxes
22 | id: terms
23 | attributes:
24 | label: Code of Conduct
25 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/feduke-nukem/flutter_easy_dialogs/blob/main/CODE_OF_CONDUCT.md)
26 | options:
27 | - label: I agree to follow this project's Code of Conduct
28 | required: true
29 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | ## Status
10 |
11 | **READY/IN DEVELOPMENT/HOLD**
12 |
13 | ## Breaking Changes
14 |
15 | YES | NO
16 |
17 | ## Description
18 |
19 |
20 |
21 | ## Type of Change
22 |
23 |
24 |
25 | - [ ] ✨ New feature (non-breaking change which adds functionality)
26 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
27 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
28 | - [ ] 🧹 Code refactor
29 | - [ ] 📝 Documentation
30 | - [ ] 🗑️ Chore
--------------------------------------------------------------------------------
/.github/workflows/flutter_easy_dialogs.yaml:
--------------------------------------------------------------------------------
1 | name: build
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | defaults:
8 | run:
9 | working-directory: ./
10 |
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v3
15 | - uses: subosito/flutter-action@v2
16 |
17 | - name: Install Dependencies
18 | run: flutter packages get
19 |
20 | - name: Format
21 | run: dart format --set-exit-if-changed .
22 |
23 | - name: Analyze
24 | run: dart analyze --fatal-infos --fatal-warnings .
25 |
26 | - name: Run tests
27 | run: flutter test --no-pub --coverage --test-randomize-ordering-seed random
28 |
29 | - name: Check Code Coverage
30 | uses: VeryGoodOpenSource/very_good_coverage@v2
31 | with:
32 | min_coverage: 90
33 | path: ./coverage/lcov.info
34 |
35 | - name: Upload coverage reports to Codecov
36 | uses: codecov/codecov-action@v3
37 | with:
38 | token: ${{ secrets.CODECOV_TOKEN }}
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | .vscode/settings.json
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | .packages
30 | build/
31 | coverage/
--------------------------------------------------------------------------------
/.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: f1875d570e39de09040c8f79aa13cc56baab8db1
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "example",
6 | "cwd": "example",
7 | "request": "launch",
8 | "type": "dart"
9 | },
10 | {
11 | "name": "example (profile mode)",
12 | "cwd": "example",
13 | "request": "launch",
14 | "type": "dart",
15 | "flutterMode": "profile"
16 | },
17 | {
18 | "name": "example (release mode)",
19 | "cwd": "example",
20 | "request": "launch",
21 | "type": "dart",
22 | "flutterMode": "release"
23 | },
24 | {
25 | "name": "Golden",
26 | "request": "launch",
27 | "type": "dart",
28 | "codeLens": {
29 | "for": [
30 | "run-test",
31 | "run-test-file"
32 | ]
33 | },
34 | "args": [
35 | "--update-goldens"
36 | ]
37 | }
38 | ]
39 | }
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | bagotir@gmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to FlutterEasyDialogs
2 |
3 | 👍🎉 First off, thanks for taking the time to contribute! 🎉👍
4 |
5 | The following is a set of guidelines for contributing to FlutterEasyDialogs and its packages.
6 | These are mostly guidelines, not rules. Use your best judgment,
7 | and feel free to propose changes to this document in a pull request.
8 |
9 | ## Proposing a Change
10 |
11 | If you intend to change the public API, or make any non-trivial changes
12 | to the implementation, we recommend filing an issue.
13 | This lets us reach an agreement on your proposal before you put significant
14 | effort into it.
15 |
16 | If you’re only fixing a bug, it’s fine to submit a pull request right away
17 | but we still recommend to file an issue detailing what you’re fixing.
18 | This is helpful in case we don’t accept that specific fix but want to keep
19 | track of the issue.
20 |
21 | ## Creating a Pull Request
22 |
23 | Before creating a pull request please:
24 |
25 | 1. Fork the repository and create your branch from `main`.
26 | 2. Install all dependencies (`flutter packages get` or `pub get`).
27 | 3. Squash your commits and ensure you have a meaningful commit message.
28 | 4. If you’ve fixed a bug or added code that should be tested, add tests!
29 | Pull Requests without 100% test coverage will not be approved.
30 | 5. Ensure the test suite passes.
31 | 6. If you've changed the public API, make sure to update/add documentation.
32 | 7. Create the Pull Request.
33 | 8. Verify that all status checks are passing.
34 |
35 | While the prerequisites above must be satisfied prior to having your
36 | pull request reviewed, the reviewer(s) may ask you to complete additional
37 | design work, tests, or other changes before your pull request can be ultimately
38 | accepted.
39 |
40 | ## Contributing to Documentation
41 |
42 | If you would like to contribute to the documentation
43 | please follow the same process for "Creating a Pull Request" and double check
44 | that your changes look good by running the docs locally.
45 |
46 | ## License
47 |
48 | By contributing to this library, you agree that your contributions will be licensed
49 | under its [MIT license](LICENSE).
50 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Fedor Blagodyr
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
34 |
35 |
36 | #### What is `FlutterEasyDialogs` ?
37 | It is an open-source package for the Flutter framework that provides easy-to-use and customizable dialogs based on [Overlay](https://api.flutter.dev/flutter/widgets/Overlay-class.html) for use in your application without `BuildContext`. With this library, you can quickly create and display dialogs such as alerts, confirmation dialogs, info dialogs, and etc.
38 | The library is designed to be lightweight, efficient, and easy to use, making it ideal for developers who want to add dialog functionality to their apps without having to write complex code.
39 |
40 | ## Documentation
41 |
42 | - [Getting started](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/Getting%20started-topic.html)
43 | - [Dialogs](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/Dialogs-topic.html)
44 | - [Decorations](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/Decorations-topic.html)
45 | - [Migration guide from 2.x to 3.x](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/Migration%20guide%20from%202.x%20to%203.x-topic.html)
46 | - [FAQ](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/FAQ-topic.html)
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | analyzer:
2 |
3 | dart_code_metrics:
4 | metrics:
5 | cyclomatic-complexity: 20
6 | number-of-parameters: 4
7 | maximum-nesting-level: 3
8 | metrics-exclude:
9 | - test/**
10 | rules:
11 | - avoid-unnecessary-type-assertions
12 | - avoid-unrelated-type-assertions
13 | - avoid-nested-conditional-expressions
14 | - no-boolean-literal-compare
15 | - prefer-conditional-expressions
16 | - no-equal-then-else
17 | - prefer-moving-to-variable
18 | - prefer-match-file-name
19 | - avoid-double-slash-imports
20 | - member-ordering:
21 | order:
22 | - private-fields
23 | - public-fields
24 | - constructors
25 | - close-method
26 | - dispose-method
27 | widgets-order:
28 | - constructor
29 | - build-method
30 | - init-state-method
31 | - did-change-dependencies-method
32 | - did-update-widget-method
33 | - dispose-method
34 | - format-comment:
35 | only-doc-comments: true
36 | ignored-patterns:
37 | - "@nodoc"
38 | severity: error
39 | - double-literal-format:
40 | severity: error
41 | - binary-expression-operand-order:
42 | severity: error
43 | - avoid-unnecessary-conditionals:
44 | severity: error
45 | - avoid-missing-enum-constant-in-map:
46 | severity: error
47 | - avoid-redundant-async:
48 | severity: error
49 | - avoid-unnecessary-type-casts:
50 | severity: error
51 | - prefer-trailing-comma:
52 | severity: error
53 | - arguments-ordering:
54 | child-last: true
55 | severity: error
56 | - newline-before-return:
57 | severity: error
58 | - prefer-commenting-analyzer-ignores:
59 | severity: error
60 | - avoid-collection-methods-with-unrelated-types:
61 | strict: false
62 | severity: error
63 | - prefer-correct-type-name:
64 | excluded: [ 'exampleExclude' ]
65 | min-length: 3
66 | max-length: 40
67 | severity: error
68 | - prefer-first:
69 | severity: error
70 | - prefer-iterable-of:
71 | severity: error
72 | - prefer-last:
73 | severity: error
74 | - always-remove-listener:
75 | severity: error
76 | - avoid-returning-widgets:
77 | ignored-names:
78 | - testFunction
79 | ignored-annotations:
80 | - allowedAnnotation
81 | - avoid-unnecessary-setstate:
82 | severity: error
83 | - avoid-wrapping-in-padding:
84 | severity: error
85 | - check-for-equals-in-render-object-setters:
86 | severity: error
87 | - consistent-update-render-object:
88 | severity: error
89 | - prefer-correct-edge-insets-constructor:
90 | severity: error
91 | - prefer-extracting-callbacks:
92 | severity: error
93 | ignored-named-arguments:
94 | - onPressed
95 | allowed-line-count: 3
96 | - use-setstate-synchronously:
97 | severity: error
98 |
99 |
100 |
101 | rules-exclude:
102 | - test/**
--------------------------------------------------------------------------------
/dartdoc_options.yaml:
--------------------------------------------------------------------------------
1 | dartdoc:
2 | categories:
3 | "Getting started":
4 | markdown: doc/getting-started.md
5 | name: Getting started
6 | "Dialogs":
7 | markdown: doc/dialogs.md
8 | name: Dialogs
9 | "Decorations":
10 | markdown: doc/decorations.md
11 | name: Decorations
12 | "Migration guide from 2.x to 3.x":
13 | markdown: doc/migration_guide_2_to_3.md
14 | name: Migration guide from 2.x to 3.x
15 | "FAQ":
16 | markdown: doc/faq.md
17 | name: FAQ
18 | categoryOrder:
19 | - "Getting started"
20 | - "Dialogs"
21 | - "Decorations"
22 | - "Migration guide from 2.x to 3.x"
23 | - "FAQ"
24 | showUndocumentedCategories: true
25 | ignore:
26 | - broken-link
27 | - missing-from-search-index
--------------------------------------------------------------------------------
/doc/dialogs.md:
--------------------------------------------------------------------------------
1 | ## Dialogs
2 |
3 | #### Positioned dialogs
4 | This type of dialogs is used to show at a specific place on the screen using [EasyDialogPosition](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogPosition.html).
5 |
6 | ```dart
7 | FlutterEasyDialogs.show(
8 | EasyDialog.positioned(
9 | position: EasyDialogPosition.top,
10 | content: Container(
11 | height: 150.0,
12 | color: Colors.amber[900],
13 | alignment: Alignment.center,
14 | child: Text('Dialog'),
15 | ),
16 | ),
17 | );
18 | ```
19 | Or:
20 |
21 | ```dart
22 | Container(
23 | height: 150.0,
24 | color: Colors.amber[900],
25 | alignment: Alignment.center,
26 | child: Text('Dialog'),
27 | ).positioned(position: EasyDialogPosition.top).show();
28 | ```
29 |
30 |
41 |
42 | **Since version 3.2.0** you can make dialog draggable:
43 | ```dart
44 | final content = Container(
45 | height: 150.0,
46 | color: Colors.amber[900],
47 | alignment: Alignment.center,
48 | child: Text('Dialog'),
49 | );
50 |
51 | content
52 | .positioned()
53 | .draggable()
54 | .show();
55 | ```
56 |
61 |
62 |
63 | #### FullScreen dialogs
64 |
65 | These dialogs are intended to cover all available space on the screen and be presented one at a time. There is a special [behavior](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/FullScreenDialog/onAndroidPop.html) available to detect the Android software back button and handle it:
66 |
67 | ```dart
68 | FlutterEasyDialogs.show(
69 | EasyDialog.fullScreen(
70 | content: Container(
71 | height: 150.0,
72 | color: Colors.amber[900],
73 | alignment: Alignment.center,
74 | child: Text('Dialog'),
75 | ),
76 | ),
77 | );
78 | ```
79 |
80 | Or:
81 |
82 | ```dart
83 | Container(
84 | height: 150.0,
85 | color: Colors.amber[900],
86 | alignment: Alignment.center,
87 | child: Text('Dialog'),
88 | ).fullScreen().show();
89 | ```
90 |
91 |
102 |
103 | #### Basic parameters
104 | - [content](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialog/content.html) - [widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) that is desired to be shown.
105 | - [animation configuration](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogAnimationConfiguration-class.html) - responsible for configuring animation duration, start value, etc. It also provides an opportunity to create a configuration with an external [AnimationController](https://api.flutter.dev/flutter/animation/AnimationController-class.html) that will drive the dialog animation.
106 | - [auto hide duration](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialog/autoHideDuration.html): duration after which the dialog will be automatically hidden. If you pass `null` the dialog won't auto hide at all.
107 | - [decoration](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogDecoration-class.html): a provided decoration that will be applied to the content.
108 |
109 | #### Context
110 | Each dialog has its own [context](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogContext-class.html), which is a class that contains helpful methods and properties, such as the animation associated with the dialog:
111 |
112 | ```dart
113 | dialog.context.animation;
114 | dialog.context.hideDialog();
115 | dialog.context.vsync;
116 | ```
117 |
--------------------------------------------------------------------------------
/doc/faq.md:
--------------------------------------------------------------------------------
1 | **Q:** What can I do if I already have some builders in my `MaterialApp`?
2 |
3 | **A:** `FlutterEasyDialogs.builder()` returns a function, so you may simply call it:
4 |
5 | ```dart
6 | MaterialApp.router(
7 | builder: (context, child) {
8 | final mediaQueryData = MediaQuery.of(context);
9 | final easyDialogsBuilder = FlutterEasyDialogs.builder();
10 | return MediaQuery(
11 | data: mediaQueryData.copyWith(textScaleFactor: 1.0),
12 | child: easyDialogsBuilder(context, child),
13 | );
14 | },
15 | );
16 | ```
17 |
18 | **Q:** I didn't see an option like: 'autoHide'. How to make a dialog to stay until I hide it manually besides setting autoHideDuration: const Duration(days: 999)?
19 |
20 | **A:** Each dialog has a property named `autoHideDuration`, and if you pass `null`, it won't automatically hide the dialog. You can then hide the dialog manually later:
21 |
22 | ```dart
23 | Container(
24 | color: Colors.blueAccent,
25 | width: double.infinity,
26 | height: 200.0,
27 | child: const Text('Hello World'),
28 | ).positioned(autoHideDuration: null).show();
29 |
30 | // or
31 | FlutterEasyDialogs.show(
32 | EasyDialog.positioned(
33 | autoHideDuration: null,
34 | content: Container(
35 | color: Colors.blueAccent,
36 | width: double.infinity,
37 | height: 200.0,
38 | child: const Text('Hello World'),
39 | ),
40 | ),
41 | );
42 | ```
--------------------------------------------------------------------------------
/doc/getting-started.md:
--------------------------------------------------------------------------------
1 | ## Getting started
2 | ## Installation
3 | In the `pubspec.yaml` of your flutter project, add the following dependency:
4 |
5 | ```yaml
6 | dependencies:
7 | flutter_easy_dialogs:
8 | ```
9 |
10 | In your library add the following import:
11 |
12 | ```dart
13 | import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
14 | ```
15 |
16 | ## Setup and usage
17 |
18 | Wrap your MaterialApp with [FlutterEasyDialogs.builder()](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/FlutterEasyDialogs/builder-constant.html) and you are ready to go.
19 |
20 | ```dart
21 | class MyApp extends StatelessWidget {
22 | const MyApp({super.key});
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return MaterialApp(
27 | builder: FlutterEasyDialogs.builder(),
28 | );
29 | }
30 | }
31 | ```
32 |
33 | Now you are able to call show methods from [FlutterEasyDialogs](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/FlutterEasyDialogs-class.html) like so:
34 | ```dart
35 | FlutterEasyDialogs.show(
36 | EasyDialog.positioned(
37 | decoration: const EasyDialogAnimation.fade(),
38 | content: Container(
39 | height: 150.0,
40 | color: Colors.blue[900],
41 | alignment: Alignment.center,
42 | child: const Text(
43 | 'Dialog',
44 | style: TextStyle(
45 | color: Colors.white,
46 | fontSize: 30.0,
47 | ),
48 | ),
49 | ),
50 | ),
51 | );
52 | ```
53 |
54 | Or:
55 |
56 | ```dart
57 | Container(
58 | height: 150.0,
59 | color: Colors.blue[900],
60 | alignment: Alignment.center,
61 | child: const Text(
62 | 'Dialog',
63 | style: TextStyle(
64 | color: Colors.white,
65 | fontSize: 30.0,
66 | ),
67 | ),
68 | ).positioned().fade().show();
69 | ```
70 |
71 | 
72 |
73 | Or to hide with the help of specific dialog `id`:
74 |
75 | ```dart
76 | FlutterEasyDialogs.hide(id: EasyDialogPosition.top);
77 | ```
78 |
79 | You can await and and finish dialog showing with some result:
80 |
81 | ```dart
82 | final result = await FlutterEasyDialogs.show(
83 | EasyDialog.positioned(
84 | content: Container(
85 | height: 150.0,
86 | color: Colors.amber[900],
87 | alignment: Alignment.center,
88 | child: const Text('Dialog'),
89 | ),
90 | position: EasyDialogPosition.bottom,
91 | ),
92 | );
93 |
94 | await FlutterEasyDialogs.hide(
95 | id: EasyDialogPosition.bottom,
96 | result: 5,
97 | );
98 | ```
99 |
100 | Or:
101 |
102 | ```dart
103 | final result = await Container(
104 | height: 150.0,
105 | color: Colors.amber[900],
106 | alignment: Alignment.center,
107 | child: const Text('Dialog'),
108 | ).positioned(position: EasyDialogPosition.bottom).show();
109 |
110 | await FlutterEasyDialogs.hide(
111 | id: EasyDialogPosition.bottom,
112 | result: 5,
113 | );
114 | ```
115 |
116 | If needed, there is an option to hide multiple dialogs at once.
117 |
118 | ```dart
119 | FlutterEasyDialogs.hideWhere(
120 | (dialog) =>
121 | dialog.position == EasyDialogPosition.bottom ||
122 | dialog.position == EasyDialogPosition.top,
123 | );
124 | ```
125 |
126 | #### Extension
127 |
128 | There is an [extension](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogsX.html) that provides alternative ways to show and hide dialogs.
129 |
130 | ```dart
131 | final dialog = Container(
132 | height: 150.0,
133 | color: Colors.blue[900],
134 | alignment: Alignment.center,
135 | child: Text(
136 | 'bottom',
137 | style: const TextStyle(
138 | color: Colors.white,
139 | fontSize: 30.0,
140 | ),
141 | ),
142 | )
143 | .positioned(position: EasyDialogPosition.bottom)
144 | .fade()
145 | .swipe(instantly: false)
146 | .animatedTap()
147 | .slideHorizontal()
148 | .slideVertical()
149 | .blurBackground(backgroundColor: Colors.red.withOpacity(0.5));
150 |
151 | final result = await dialog.show();
152 | await dialog.hide(result: 5);
153 | ```
154 |
155 | 
156 |
157 |
--------------------------------------------------------------------------------
/doc/migration_guide_2_to_3.md:
--------------------------------------------------------------------------------
1 | ## Migration from 2.x to 3.x
2 |
3 | Each manager has been transformed into a dialog itself:
4 |
5 | * [PositionedDialogManager](https://pub.dev/packages/positioned_dialog_manager) -> [EasyDialog.positioned](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialog/EasyDialog.positioned.html)
6 | * [FullScreenDialogManager](https://pub.dev/packages/full_screen_dialog_manager) -> [EasyDialog.fullScreen](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialog/EasyDialog.fullScreen.html)
7 |
8 | There are no more "Show/Hide" parameters; the dialog contains all the required information internally.
9 |
10 | From:
11 |
12 | ```dart
13 | FlutterEasyDialogs.provider.showPositioned(
14 | PositionedShowParams(
15 | hideAfterDuration: Duration(milliseconds: 500)
16 | content: Container(
17 | height: 150.0,
18 | color: Colors.amber[900],
19 | alignment: Alignment.center,
20 | child: Text('Dialog'),
21 | ),
22 | position: EasyDialogPosition.top,
23 | ),
24 | );
25 | ```
26 |
27 | To:
28 |
29 | ```dart
30 | FlutterEasyDialogs.show(
31 | EasyDialog.positioned(
32 | autoHideDuration: Duration(milliseconds: 500),
33 | content: Container(
34 | height: 150.0,
35 | color: Colors.amber[900],
36 | alignment: Alignment.center,
37 | child: Text('Dialog'),
38 | ),
39 | position: EasyDialogPosition.top,
40 | ),
41 | );
42 | ```
43 |
44 | Or:
45 |
46 | ```dart
47 | Container(
48 | height: 150.0,
49 | color: Colors.amber[900],
50 | alignment: Alignment.center,
51 | child: Text('Dialog'),
52 | )
53 | .positioned(
54 | position: EasyDialogPosition.top,
55 | autoHideDuration: Duration(milliseconds: 500),
56 | )
57 | .show();
58 | ```
59 |
60 | To hide a dialog, you can now create an [identifier](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogIdentifier-class.html) for a specific dialog type.
61 |
62 | From:
63 |
64 | ```dart
65 | FlutterEasyDialogs.provider.hidePositioned(EasyDialogPosition.top)
66 | ```
67 |
68 | To:
69 |
70 | ```dart
71 | FlutterEasyDialogs.hide(
72 | PositionedDialog.identifier(
73 | position: EasyDialogPosition.top,
74 | ),
75 | );
76 | ```
77 |
78 | #### Decorators
79 |
80 | Decorators and all related objects have changed too:
81 |
82 | * Decorator -> [Decoration](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogDecoration-class.html)
83 | * Animator -> [Animation](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogAnimation-class.html)
84 | * Dismissible -> [Dismiss](https://pub.dev/documentation/flutter_easy_dialogs/latest/flutter_easy_dialogs/EasyDialogDismiss-class.html)
85 |
86 | They all have become more flexible and universal.
87 |
88 | Better watch this [topic](https://pub.dev/documentation/flutter_easy_dialogs/latest/topics/Decorations-topic.html) for better a understanding.
89 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
--------------------------------------------------------------------------------
/example/.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.
5 |
6 | version:
7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
18 | - platform: android
19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
21 | - platform: ios
22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
24 | - platform: linux
25 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
26 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
27 | - platform: macos
28 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
29 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
30 | - platform: web
31 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
32 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
33 | - platform: windows
34 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
35 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | Flutter Easy Dialogs example
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 |
4 | linter:
5 | rules:
6 | # - public_member_api_docs
7 | - annotate_overrides
8 | - avoid_empty_else
9 | - avoid_function_literals_in_foreach_calls
10 | - avoid_init_to_null
11 | - avoid_null_checks_in_equality_operators
12 | - avoid_relative_lib_imports
13 | # - avoid_renaming_method_parameters
14 | - avoid_redundant_argument_values
15 | - use_function_type_syntax_for_parameters
16 | - avoid_return_types_on_setters
17 | - avoid_types_as_parameter_names
18 | - avoid_unused_constructor_parameters
19 | - await_only_futures
20 | - camel_case_types
21 | - cancel_subscriptions
22 | - cascade_invocations
23 | - comment_references
24 | - constant_identifier_names
25 | - control_flow_in_finally
26 | - directives_ordering
27 | - empty_catches
28 | - empty_constructor_bodies
29 | - empty_statements
30 | - hash_and_equals
31 | - implementation_imports
32 | - library_names
33 | - library_prefixes
34 | - no_adjacent_strings_in_list
35 | - no_duplicate_case_values
36 | - non_constant_identifier_names
37 | - null_closures
38 | - omit_local_variable_types
39 | - only_throw_errors
40 | - overridden_fields
41 | - package_api_docs
42 | - package_names
43 | - package_prefixed_library_names
44 | - prefer_adjacent_string_concatenation
45 | - prefer_collection_literals
46 | - prefer_conditional_assignment
47 | - prefer_const_constructors
48 | - prefer_contains
49 | - prefer_final_fields
50 | - prefer_initializing_formals
51 | - prefer_interpolation_to_compose_strings
52 | - prefer_is_empty
53 | - prefer_is_not_empty
54 | - prefer_single_quotes
55 | - prefer_typing_uninitialized_variables
56 | - recursive_getters
57 | - require_trailing_commas
58 | - slash_for_doc_comments
59 | - test_types_in_equals
60 | - throw_in_finally
61 | - type_init_formals
62 | - unawaited_futures
63 | - unnecessary_brace_in_string_interps
64 | - unnecessary_const
65 | - unnecessary_getters_setters
66 | - unnecessary_lambdas
67 | - unnecessary_new
68 | - unnecessary_null_aware_assignments
69 | - unnecessary_statements
70 | - unnecessary_this
71 | - unrelated_type_equality_checks
72 | - use_rethrow_when_possible
73 | - valid_regexps
74 | - cast_nullable_to_non_nullable
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.example"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/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.
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/lib/full_screen/routes.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/full_screen/screens/full_screen_dialog_customization_screen.dart';
2 | import 'package:example/widget/home_template.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | import 'screens/screens.dart';
6 |
7 | enum FullScreenDialogRoutes {
8 | basicUsage(name: 'basic usage'),
9 | home(name: 'full screen dialog manager home'),
10 | customization(name: 'customization');
11 |
12 | final String name;
13 |
14 | const FullScreenDialogRoutes({
15 | required this.name,
16 | });
17 |
18 | Widget get screen {
19 | switch (this) {
20 | case FullScreenDialogRoutes.home:
21 | return HomeTemplate(
22 | title: 'Full Screen Dialog Manager',
23 | destinations: {
24 | for (var element in FullScreenDialogRoutes.values
25 | .where(
26 | (element) => element != FullScreenDialogRoutes.home,
27 | )
28 | .toList())
29 | (element).name: () => (element).route,
30 | },
31 | );
32 | case FullScreenDialogRoutes.basicUsage:
33 | return const FullScreenDialogManagerBasicUsageScreen();
34 |
35 | case FullScreenDialogRoutes.customization:
36 | return const FullScreenDialogCustomizationScreen();
37 | }
38 | }
39 |
40 | Route get route => _buildRoute(screen);
41 |
42 | Route _buildRoute(Widget child) => MaterialPageRoute(builder: (_) => child);
43 | }
44 |
--------------------------------------------------------------------------------
/example/lib/full_screen/screens/screens.dart:
--------------------------------------------------------------------------------
1 | export 'full_screen_dialog_basic_usage_screen.dart';
2 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/screens/home_screen.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
4 |
5 | void main() {
6 | runApp(const MyApp());
7 | }
8 |
9 | class MyApp extends StatelessWidget {
10 | const MyApp({Key? key}) : super(key: key);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return MaterialApp(
15 | debugShowCheckedModeBanner: false,
16 | theme: ThemeData(
17 | colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
18 | useMaterial3: true,
19 | ),
20 | title: 'Easy Dialogs demo',
21 | home: const HomeScreen(),
22 | builder: FlutterEasyDialogs.builder(),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/lib/positioned/routes.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/widget/home_template.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import 'screens/positioned_dialog_basic_usage.dart';
5 | import 'screens/positioned_dialog_customization_screen.dart';
6 | import 'screens/positioned_dialog_flutter_animate.dart';
7 |
8 | enum PositionedDialogRoutes {
9 | basicUsage(name: 'basic usage'),
10 | home(name: 'positioned dialog manager home'),
11 | flutterAnimmate(name: 'flutter animate'),
12 | customization(name: 'customization');
13 |
14 | final String name;
15 |
16 | const PositionedDialogRoutes({required this.name});
17 |
18 | Widget get screen {
19 | switch (this) {
20 | case PositionedDialogRoutes.home:
21 | return HomeTemplate(
22 | title: 'Positioned Dialog Manager',
23 | destinations: {
24 | for (var element in PositionedDialogRoutes.values
25 | .where(
26 | (element) => element != PositionedDialogRoutes.home,
27 | )
28 | .toList())
29 | (element).name: () => (element).route,
30 | },
31 | );
32 | case PositionedDialogRoutes.basicUsage:
33 | return const PositionedDialogManagerBasicUsageScreen();
34 |
35 | case PositionedDialogRoutes.customization:
36 | return const PositionedDialogManagerCustomizationScreen();
37 |
38 | case PositionedDialogRoutes.flutterAnimmate:
39 | return const PositionedDialogFlutterAnimate();
40 | }
41 | }
42 |
43 | Route get route => _buildRoute(screen);
44 |
45 | Route _buildRoute(Widget child) => MaterialPageRoute(builder: (_) => child);
46 | }
47 |
--------------------------------------------------------------------------------
/example/lib/positioned/screens/positioned_dialog_customization_screen.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: avoid_print
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
5 |
6 | class PositionedDialogManagerCustomizationScreen extends StatelessWidget {
7 | const PositionedDialogManagerCustomizationScreen({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: AppBar(
13 | title: const Text('Positioned dialog customization'),
14 | ),
15 | body: Center(
16 | child: Column(
17 | mainAxisAlignment: MainAxisAlignment.center,
18 | children: [
19 | ElevatedButton(
20 | onPressed: _show,
21 | child: const Text('show'),
22 | ),
23 | ],
24 | ),
25 | ),
26 | );
27 | }
28 |
29 | void _show() => EasyDialog.positioned(
30 | animationConfiguration: const EasyDialogAnimationConfiguration.bounded(
31 | duration: Duration(milliseconds: 400),
32 | ),
33 | position: EasyDialogPosition.bottom,
34 | decoration: const _CustomPositionedShell()
35 | .chained(_CustomPositionedAnimation())
36 | .chained(
37 | _CustomPositionedDismiss(
38 | onDismissed: () => 6,
39 | ),
40 | ),
41 | content: const SizedBox.square(
42 | dimension: 250,
43 | child: Center(
44 | child: Text(
45 | 'custom banner',
46 | ),
47 | ),
48 | ),
49 | ).show().then((value) => print('dismissed with $value'));
50 | }
51 |
52 | final class _CustomPositionedShell extends PositionedShell {
53 | const _CustomPositionedShell();
54 |
55 | @override
56 | Widget call(PositionedDialog dialog) {
57 | return SizedBox(
58 | width: double.infinity,
59 | height: 200.0,
60 | child: ColoredBox(
61 | color: Colors.amber,
62 | child: dialog.content,
63 | ),
64 | );
65 | }
66 | }
67 |
68 | final class _CustomPositionedAnimation
69 | extends EasyDialogDecoration {
70 | @override
71 | Widget call(EasyDialog dialog) {
72 | final animation = dialog.context.animation;
73 |
74 | final offset = Tween(
75 | begin: const Offset(0.0, 1.0),
76 | end: const Offset(0.0, 0.0),
77 | ).chain(CurveTween(curve: Curves.fastOutSlowIn)).animate(animation);
78 | return AnimatedBuilder(
79 | animation: animation,
80 | builder: (_, __) => Stack(
81 | children: [
82 | Positioned.fill(
83 | child: ColoredBox(
84 | color: Colors.black.withValues(
85 | alpha: animation.value.clamp(0.0, 0.6),
86 | ),
87 | ),
88 | ),
89 | Align(
90 | alignment: Alignment.bottomCenter,
91 | child: SlideTransition(position: offset, child: dialog.content),
92 | ),
93 | ],
94 | ),
95 | );
96 | }
97 | }
98 |
99 | final class _CustomPositionedDismiss
100 | extends EasyDialogDismiss {
101 | const _CustomPositionedDismiss({
102 | required super.onDismissed,
103 | });
104 |
105 | @override
106 | Widget call(PositionedDialog dialog) {
107 | return GestureDetector(
108 | onTap: () => super.handleDismiss(dialog),
109 | child: dialog.content,
110 | );
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/example/lib/positioned/screens/positioned_dialog_flutter_animate.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animate/flutter_animate.dart';
3 | import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
4 |
5 | class PositionedDialogFlutterAnimate extends StatefulWidget {
6 | const PositionedDialogFlutterAnimate({super.key});
7 |
8 | @override
9 | State createState() =>
10 | _PositionedDialogFlutterAnimateState();
11 | }
12 |
13 | class _PositionedDialogFlutterAnimateState
14 | extends State
15 | with SingleTickerProviderStateMixin {
16 | late final _controller = AnimationController(
17 | vsync: this,
18 | duration: const Duration(
19 | milliseconds: 1500,
20 | ),
21 | );
22 | @override
23 | Widget build(BuildContext context) {
24 | return Scaffold(
25 | appBar: AppBar(
26 | title: const Text('Positioned Dialog Flutter Animate'),
27 | ),
28 | body: Center(
29 | child: ElevatedButton(
30 | onPressed: () {
31 | FlutterEasyDialogs.show(
32 | EasyDialog.positioned(
33 | animationConfiguration:
34 | EasyDialogAnimationConfiguration.withController(
35 | _controller,
36 | willReverse: true,
37 | ),
38 | decoration: EasyDialogDecoration.builder(
39 | (context, dialog) => dialog.content
40 | .animate(controller: _controller)
41 | .scale(curve: Curves.fastOutSlowIn)
42 | .shake()
43 | .elevation()
44 | .slide()
45 | .fadeIn(),
46 | ),
47 | content: Container(
48 | color: Colors.white,
49 | width: double.infinity,
50 | height: 200.0,
51 | child: Column(
52 | mainAxisAlignment: MainAxisAlignment.center,
53 | mainAxisSize: MainAxisSize.min,
54 | children: [
55 | const Text('Hello World'),
56 | ElevatedButton(
57 | onPressed: () =>
58 | FlutterEasyDialogs.hide(id: EasyDialogPosition.top),
59 | child: const Text('Close'),
60 | ),
61 | ],
62 | ),
63 | ),
64 | ),
65 | );
66 | },
67 | child: const Text('Show Dialog'),
68 | ),
69 | ),
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/example/lib/screens/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/full_screen/routes.dart';
2 | import 'package:example/positioned/routes.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class HomeScreen extends StatelessWidget {
6 | const HomeScreen({super.key});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: const Text('Easy Dialogs Example'),
13 | ),
14 | body: Center(
15 | child: Column(
16 | mainAxisAlignment: MainAxisAlignment.center,
17 | children: [
18 | ElevatedButton(
19 | onPressed: () =>
20 | Navigator.of(context).push(PositionedDialogRoutes.home.route),
21 | child: const Text('Positioned dialogs example'),
22 | ),
23 | ElevatedButton(
24 | onPressed: () =>
25 | Navigator.of(context).push(FullScreenDialogRoutes.home.route),
26 | child: const Text('Full screen dialogs example'),
27 | ),
28 | ],
29 | ),
30 | ),
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/example/lib/widget/home_template.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class HomeTemplate extends StatelessWidget {
4 | final Map destinations;
5 | final String title;
6 |
7 | const HomeTemplate({
8 | required this.destinations,
9 | required this.title,
10 | super.key,
11 | });
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: AppBar(
17 | title: Text(title),
18 | ),
19 | body: Center(
20 | child: SingleChildScrollView(
21 | child: Column(
22 | mainAxisAlignment: MainAxisAlignment.center,
23 | children: destinations.entries
24 | .map(
25 | (e) => ElevatedButton(
26 | onPressed: () => Navigator.of(context).push(e.value()),
27 | child: Text(e.key),
28 | ),
29 | )
30 | .toList(),
31 | ),
32 | ),
33 | ),
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/example/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.10)
3 | project(runner LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "example")
8 | # The unique GTK application identifier for this application. See:
9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID
10 | set(APPLICATION_ID "com.example.example")
11 |
12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13 | # versions of CMake.
14 | cmake_policy(SET CMP0063 NEW)
15 |
16 | # Load bundled libraries from the lib/ directory relative to the binary.
17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18 |
19 | # Root filesystem for cross-building.
20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27 | endif()
28 |
29 | # Define build configuration options.
30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31 | set(CMAKE_BUILD_TYPE "Debug" CACHE
32 | STRING "Flutter build mode" FORCE)
33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34 | "Debug" "Profile" "Release")
35 | endif()
36 |
37 | # Compilation settings that should be applied to most targets.
38 | #
39 | # Be cautious about adding new options here, as plugins use this function by
40 | # default. In most cases, you should add new options to specific targets instead
41 | # of modifying this function.
42 | function(APPLY_STANDARD_SETTINGS TARGET)
43 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
47 | endfunction()
48 |
49 | # Flutter library and tool build rules.
50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51 | add_subdirectory(${FLUTTER_MANAGED_DIR})
52 |
53 | # System-level dependencies.
54 | find_package(PkgConfig REQUIRED)
55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56 |
57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58 |
59 | # Define the application target. To change its name, change BINARY_NAME above,
60 | # not the value here, or `flutter run` will no longer work.
61 | #
62 | # Any new source files that you add to the application should be added here.
63 | add_executable(${BINARY_NAME}
64 | "main.cc"
65 | "my_application.cc"
66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67 | )
68 |
69 | # Apply the standard set of build settings. This can be removed for applications
70 | # that need different build settings.
71 | apply_standard_settings(${BINARY_NAME})
72 |
73 | # Add dependency libraries. Add any application-specific dependencies here.
74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
76 |
77 | # Run the Flutter tool portions of the build. This must not be removed.
78 | add_dependencies(${BINARY_NAME} flutter_assemble)
79 |
80 | # Only the install-generated bundle's copy of the executable will launch
81 | # correctly, since the resources must in the right relative locations. To avoid
82 | # people trying to run the unbundled copy, put it in a subdirectory instead of
83 | # the default top-level location.
84 | set_target_properties(${BINARY_NAME}
85 | PROPERTIES
86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
87 | )
88 |
89 | # Generated plugin build rules, which manage building the plugins and adding
90 | # them to the application.
91 | include(flutter/generated_plugins.cmake)
92 |
93 |
94 | # === Installation ===
95 | # By default, "installing" just makes a relocatable bundle in the build
96 | # directory.
97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
100 | endif()
101 |
102 | # Start with a clean build bundle directory every time.
103 | install(CODE "
104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
105 | " COMPONENT Runtime)
106 |
107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
109 |
110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
111 | COMPONENT Runtime)
112 |
113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
114 | COMPONENT Runtime)
115 |
116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
117 | COMPONENT Runtime)
118 |
119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
120 | install(FILES "${bundled_library}"
121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
122 | COMPONENT Runtime)
123 | endforeach(bundled_library)
124 |
125 | # Fully re-copy the assets directory on each build to avoid having stale files
126 | # from a previous install.
127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
128 | install(CODE "
129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
130 | " COMPONENT Runtime)
131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
133 |
134 | # Install the AOT library on non-Debug builds only.
135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137 | COMPONENT Runtime)
138 | endif()
139 |
--------------------------------------------------------------------------------
/example/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void fl_register_plugins(FlPluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/example/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/example/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen* screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "example");
44 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46 | } else {
47 | gtk_window_set_title(window, "example");
48 | }
49 |
50 | gtk_window_set_default_size(window, 1280, 720);
51 | gtk_widget_show(GTK_WIDGET(window));
52 |
53 | g_autoptr(FlDartProject) project = fl_dart_project_new();
54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
55 |
56 | FlView* view = fl_view_new(project);
57 | gtk_widget_show(GTK_WIDGET(view));
58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
59 |
60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
61 |
62 | gtk_widget_grab_focus(GTK_WIDGET(view));
63 | }
64 |
65 | // Implements GApplication::local_command_line.
66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
67 | MyApplication* self = MY_APPLICATION(application);
68 | // Strip out the first argument as it is the binary name.
69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
70 |
71 | g_autoptr(GError) error = nullptr;
72 | if (!g_application_register(application, nullptr, &error)) {
73 | g_warning("Failed to register: %s", error->message);
74 | *exit_status = 1;
75 | return TRUE;
76 | }
77 |
78 | g_application_activate(application);
79 | *exit_status = 0;
80 |
81 | return TRUE;
82 | }
83 |
84 | // Implements GObject::dispose.
85 | static void my_application_dispose(GObject* object) {
86 | MyApplication* self = MY_APPLICATION(object);
87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
89 | }
90 |
91 | static void my_application_class_init(MyApplicationClass* klass) {
92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
95 | }
96 |
97 | static void my_application_init(MyApplication* self) {}
98 |
99 | MyApplication* my_application_new() {
100 | return MY_APPLICATION(g_object_new(my_application_get_type(),
101 | "application-id", APPLICATION_ID,
102 | "flags", G_APPLICATION_NON_UNIQUE,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/example/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 |
9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10 | }
11 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: A new Flutter project.
3 |
4 | publish_to: "none"
5 | version: 1.0.0+1
6 |
7 | environment:
8 | sdk: ">=3.0.0 <4.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | flutter_easy_dialogs:
14 | path: ../
15 | flutter_animate: ^4.2.0
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 | flutter_lints: ^2.0.0
21 |
22 | flutter:
23 | uses-material-design: true
24 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | example
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/example/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.14)
3 | project(example LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "example")
8 |
9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
10 | # versions of CMake.
11 | cmake_policy(SET CMP0063 NEW)
12 |
13 | # Define build configuration option.
14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
15 | if(IS_MULTICONFIG)
16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
17 | CACHE STRING "" FORCE)
18 | else()
19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20 | set(CMAKE_BUILD_TYPE "Debug" CACHE
21 | STRING "Flutter build mode" FORCE)
22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
23 | "Debug" "Profile" "Release")
24 | endif()
25 | endif()
26 | # Define settings for the Profile build mode.
27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
31 |
32 | # Use Unicode for all projects.
33 | add_definitions(-DUNICODE -D_UNICODE)
34 |
35 | # Compilation settings that should be applied to most targets.
36 | #
37 | # Be cautious about adding new options here, as plugins use this function by
38 | # default. In most cases, you should add new options to specific targets instead
39 | # of modifying this function.
40 | function(APPLY_STANDARD_SETTINGS TARGET)
41 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
43 | target_compile_options(${TARGET} PRIVATE /EHsc)
44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
46 | endfunction()
47 |
48 | # Flutter library and tool build rules.
49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
50 | add_subdirectory(${FLUTTER_MANAGED_DIR})
51 |
52 | # Application build; see runner/CMakeLists.txt.
53 | add_subdirectory("runner")
54 |
55 | # Generated plugin build rules, which manage building the plugins and adding
56 | # them to the application.
57 | include(flutter/generated_plugins.cmake)
58 |
59 |
60 | # === Installation ===
61 | # Support files are copied into place next to the executable, so that it can
62 | # run in place. This is done instead of making a separate bundle (as on Linux)
63 | # so that building and running from within Visual Studio will work.
64 | set(BUILD_BUNDLE_DIR "$")
65 | # Make the "install" step default, as it's required to run.
66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
69 | endif()
70 |
71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
73 |
74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
75 | COMPONENT Runtime)
76 |
77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
78 | COMPONENT Runtime)
79 |
80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
81 | COMPONENT Runtime)
82 |
83 | if(PLUGIN_BUNDLED_LIBRARIES)
84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
86 | COMPONENT Runtime)
87 | endif()
88 |
89 | # Fully re-copy the assets directory on each build to avoid having stale files
90 | # from a previous install.
91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
92 | install(CODE "
93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
94 | " COMPONENT Runtime)
95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
97 |
98 | # Install the AOT library on non-Debug builds only.
99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
100 | CONFIGURATIONS Profile;Release
101 | COMPONENT Runtime)
102 |
--------------------------------------------------------------------------------
/example/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.14)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
12 |
13 | # === Flutter Library ===
14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
15 |
16 | # Published to parent scope for install step.
17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
21 |
22 | list(APPEND FLUTTER_LIBRARY_HEADERS
23 | "flutter_export.h"
24 | "flutter_windows.h"
25 | "flutter_messenger.h"
26 | "flutter_plugin_registrar.h"
27 | "flutter_texture_registrar.h"
28 | )
29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
30 | add_library(flutter INTERFACE)
31 | target_include_directories(flutter INTERFACE
32 | "${EPHEMERAL_DIR}"
33 | )
34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
35 | add_dependencies(flutter flutter_assemble)
36 |
37 | # === Wrapper ===
38 | list(APPEND CPP_WRAPPER_SOURCES_CORE
39 | "core_implementations.cc"
40 | "standard_codec.cc"
41 | )
42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
44 | "plugin_registrar.cc"
45 | )
46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
47 | list(APPEND CPP_WRAPPER_SOURCES_APP
48 | "flutter_engine.cc"
49 | "flutter_view_controller.cc"
50 | )
51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
52 |
53 | # Wrapper sources needed for a plugin.
54 | add_library(flutter_wrapper_plugin STATIC
55 | ${CPP_WRAPPER_SOURCES_CORE}
56 | ${CPP_WRAPPER_SOURCES_PLUGIN}
57 | )
58 | apply_standard_settings(flutter_wrapper_plugin)
59 | set_target_properties(flutter_wrapper_plugin PROPERTIES
60 | POSITION_INDEPENDENT_CODE ON)
61 | set_target_properties(flutter_wrapper_plugin PROPERTIES
62 | CXX_VISIBILITY_PRESET hidden)
63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
64 | target_include_directories(flutter_wrapper_plugin PUBLIC
65 | "${WRAPPER_ROOT}/include"
66 | )
67 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
68 |
69 | # Wrapper sources needed for the runner.
70 | add_library(flutter_wrapper_app STATIC
71 | ${CPP_WRAPPER_SOURCES_CORE}
72 | ${CPP_WRAPPER_SOURCES_APP}
73 | )
74 | apply_standard_settings(flutter_wrapper_app)
75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
76 | target_include_directories(flutter_wrapper_app PUBLIC
77 | "${WRAPPER_ROOT}/include"
78 | )
79 | add_dependencies(flutter_wrapper_app flutter_assemble)
80 |
81 | # === Flutter tool backend ===
82 | # _phony_ is a non-existent file to force this command to run every time,
83 | # since currently there's no way to get a full input/output list from the
84 | # flutter tool.
85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
87 | add_custom_command(
88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
90 | ${CPP_WRAPPER_SOURCES_APP}
91 | ${PHONY_OUTPUT}
92 | COMMAND ${CMAKE_COMMAND} -E env
93 | ${FLUTTER_TOOL_ENVIRONMENT}
94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
95 | windows-x64 $
96 | VERBATIM
97 | )
98 | add_custom_target(flutter_assemble DEPENDS
99 | "${FLUTTER_LIBRARY}"
100 | ${FLUTTER_LIBRARY_HEADERS}
101 | ${CPP_WRAPPER_SOURCES_CORE}
102 | ${CPP_WRAPPER_SOURCES_PLUGIN}
103 | ${CPP_WRAPPER_SOURCES_APP}
104 | )
105 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Disable Windows macros that collide with C++ standard library functions.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
25 |
26 | # Add dependency libraries and include directories. Add any application-specific
27 | # dependencies here.
28 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
29 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
30 |
31 | # Run the Flutter tool portions of the build. This must not be removed.
32 | add_dependencies(${BINARY_NAME} flutter_assemble)
33 |
--------------------------------------------------------------------------------
/example/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #ifdef FLUTTER_BUILD_NUMBER
64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0
67 | #endif
68 |
69 | #ifdef FLUTTER_BUILD_NAME
70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "example" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "example" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "example.exe" "\0"
98 | VALUE "ProductName", "example" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 | return true;
30 | }
31 |
32 | void FlutterWindow::OnDestroy() {
33 | if (flutter_controller_) {
34 | flutter_controller_ = nullptr;
35 | }
36 |
37 | Win32Window::OnDestroy();
38 | }
39 |
40 | LRESULT
41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
42 | WPARAM const wparam,
43 | LPARAM const lparam) noexcept {
44 | // Give Flutter, including plugins, an opportunity to handle window messages.
45 | if (flutter_controller_) {
46 | std::optional result =
47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
48 | lparam);
49 | if (result) {
50 | return *result;
51 | }
52 | }
53 |
54 | switch (message) {
55 | case WM_FONTCHANGE:
56 | flutter_controller_->engine()->ReloadSystemFonts();
57 | break;
58 | }
59 |
60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
61 | }
62 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.CreateAndShow(L"example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/feduke-nukem/flutter_easy_dialogs/31df444c7e8f5032e19f9aec5996cbf602825016/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | std::string utf8_string;
52 | if (target_length == 0 || target_length > utf8_string.max_size()) {
53 | return utf8_string;
54 | }
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/example/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates and shows a win32 window with |title| and position and size using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size to will treat the width height passed in to this function
35 | // as logical pixels and scale to appropriate for the default monitor. Returns
36 | // true if the window was created successfully.
37 | bool CreateAndShow(const std::wstring& title,
38 | const Point& origin,
39 | const Size& size);
40 |
41 | // Release OS resources associated with window.
42 | void Destroy();
43 |
44 | // Inserts |content| into the window tree.
45 | void SetChildContent(HWND content);
46 |
47 | // Returns the backing Window handle to enable clients to set icon and other
48 | // window properties. Returns nullptr if the window has been destroyed.
49 | HWND GetHandle();
50 |
51 | // If true, closing this window will quit the application.
52 | void SetQuitOnClose(bool quit_on_close);
53 |
54 | // Return a RECT representing the bounds of the current client area.
55 | RECT GetClientArea();
56 |
57 | protected:
58 | // Processes and route salient window messages for mouse handling,
59 | // size change and DPI. Delegates handling of these to member overloads that
60 | // inheriting classes can handle.
61 | virtual LRESULT MessageHandler(HWND window,
62 | UINT const message,
63 | WPARAM const wparam,
64 | LPARAM const lparam) noexcept;
65 |
66 | // Called when CreateAndShow is called, allowing subclass window-related
67 | // setup. Subclasses should return false if setup fails.
68 | virtual bool OnCreate();
69 |
70 | // Called when Destroy is called.
71 | virtual void OnDestroy();
72 |
73 | private:
74 | friend class WindowClassRegistrar;
75 |
76 | // OS callback called by message pump. Handles the WM_NCCREATE message which
77 | // is passed when the non-client area is being created and enables automatic
78 | // non-client DPI scaling so that the non-client area automatically
79 | // responsponds to changes in DPI. All other messages are handled by
80 | // MessageHandler.
81 | static LRESULT CALLBACK WndProc(HWND const window,
82 | UINT const message,
83 | WPARAM const wparam,
84 | LPARAM const lparam) noexcept;
85 |
86 | // Retrieves a class instance pointer for |window|
87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
88 |
89 | bool quit_on_close_ = false;
90 |
91 | // window handle for top level window.
92 | HWND window_handle_ = nullptr;
93 |
94 | // window handle for hosted content.
95 | HWND child_content_ = nullptr;
96 | };
97 |
98 | #endif // RUNNER_WIN32_WINDOW_H_
99 |
--------------------------------------------------------------------------------
/lib/flutter_easy_dialogs.dart:
--------------------------------------------------------------------------------
1 | library flutter_easy_dialogs;
2 |
3 | export 'src/core/core.dart'
4 | hide
5 | EasyDialogsOverlayBox,
6 | AnimationConfigurationWithoutController,
7 | AnimationConfigurationWithController,
8 | AnimationConfigurationBounded,
9 | AnimationConfigurationUnbounded;
10 | export 'src/util/multiply_animation.dart';
11 | export 'src/positioned/positioned.dart';
12 | export 'src/full_screen/full_screen.dart';
13 | export 'src/flutter_easy_dialogs.dart';
14 |
--------------------------------------------------------------------------------
/lib/src/core/android_back_button_interceptor_mixin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter/widgets.dart';
3 | import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
4 |
5 | /// For handling back button on Android.
6 |
7 | mixin AndroidBackButtonInterceptorMixin on EasyDialogLifecycle {
8 | @override
9 | void init() {
10 | super.init();
11 | _AndroidBackButtonInterceptor.addCallback(onAndroidPop);
12 | }
13 |
14 | @override
15 | void onShow() {
16 | super.onShow();
17 |
18 | _AndroidBackButtonInterceptor.blockBackButton();
19 | }
20 |
21 | @override
22 | void onHidden() {
23 | super.onHidden();
24 |
25 | _AndroidBackButtonInterceptor.unblockBackButton();
26 | }
27 |
28 | @override
29 | void dispose() {
30 | _AndroidBackButtonInterceptor.removeCallback(onAndroidPop);
31 | super.dispose();
32 | }
33 |
34 | /// Will be called when Android back button is pressed.
35 | @protected
36 | void onAndroidPop() {}
37 | }
38 |
39 | abstract interface class _AndroidBackButtonInterceptor
40 | implements WidgetsBinding {
41 | static bool _isBlocked = false;
42 | static bool _isMethodCallHandlerSet = false;
43 |
44 | static final _callBacks = [];
45 |
46 | static void addCallback(VoidCallback callback) {
47 | _callBacks.add(callback);
48 | }
49 |
50 | static void removeCallback(VoidCallback callback) {
51 | _callBacks.remove(callback);
52 | }
53 |
54 | /// Starts blocking Android back button events.
55 | static void blockBackButton() {
56 | if (!_isMethodCallHandlerSet) {
57 | SystemChannels.navigation
58 | .setMethodCallHandler(_handleNavigationInvocation);
59 | _isMethodCallHandlerSet = true;
60 | }
61 | _isBlocked = true;
62 | }
63 |
64 | static void unblockBackButton() {
65 | _isBlocked = false;
66 | }
67 |
68 | static Future _handleNavigationInvocation(MethodCall methodCall) {
69 | if (methodCall.method == 'popRoute') {
70 | _callBacks.forEach((callback) => callback());
71 |
72 | return _isBlocked
73 | ? Future.value()
74 | : WidgetsBinding.instance.handlePopRoute();
75 | }
76 |
77 | if (methodCall.method == 'pushRoute') {
78 | return WidgetsBinding.instance.handlePushRoute(methodCall.arguments);
79 | }
80 |
81 | return Future.value();
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/src/core/core.dart:
--------------------------------------------------------------------------------
1 | export 'easy_dialog_animation_configuration.dart';
2 | export 'easy_dialogs_controller.dart';
3 | export 'easy_overlay.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/core/easy_dialog_animation_configuration.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_easy_dialogs/src/core/easy_dialogs_controller.dart';
3 |
4 | /// {@category Dialogs}
5 | /// {@category Migration guide from 2.x to 3.x}
6 | /// {@template easy_dialog_animation_configuration}
7 | /// Configuration of [EasyDialogAnimation].
8 | ///
9 | /// This is typically used to configure the [Animation]
10 | /// that is created by [EasyDialogsController] which implies to drive any
11 | /// kind of animations that can be applied to the dialog.
12 | /// {@endtemplate}
13 | sealed class EasyDialogAnimationConfiguration {
14 | /// @nodoc
15 | const EasyDialogAnimationConfiguration();
16 |
17 | /// See [AnimationController].
18 | const factory EasyDialogAnimationConfiguration.bounded({
19 | double? startValue,
20 | Duration duration,
21 | Duration reverseDuration,
22 | double lowerBound,
23 | double upperBound,
24 | }) = AnimationConfigurationBounded;
25 |
26 | /// See [AnimationController.unbounded].
27 | const factory EasyDialogAnimationConfiguration.unbounded({
28 | double startValue,
29 | Duration duration,
30 | Duration reverseDuration,
31 | }) = AnimationConfigurationUnbounded;
32 |
33 | /// Create configuration using an [AnimationController].
34 | ///
35 | /// * The [willDispose] is whether the controller should be disposed by
36 | /// [EasyDialogsController] when the dialog is dismissed.
37 | ///
38 | /// * The [willForward] is whether the controller should be started by
39 | /// [EasyDialogsController] when the dialog is intended to be shown.
40 | ///
41 | /// * The [willReverse] is whether the controller should be reversed by
42 | /// [EasyDialogsController] when the dialog is intended to be dismissed.
43 | const factory EasyDialogAnimationConfiguration.withController(
44 | AnimationController controller, {
45 | bool willForward,
46 | bool willReverse,
47 | bool willDispose,
48 | }) = AnimationConfigurationWithController;
49 | }
50 |
51 | final class AnimationConfigurationWithController
52 | extends EasyDialogAnimationConfiguration {
53 | final AnimationController controller;
54 | final bool willForward;
55 | final bool willReverse;
56 | final bool willDispose;
57 |
58 | const AnimationConfigurationWithController(
59 | this.controller, {
60 | this.willForward = false,
61 | this.willReverse = false,
62 | this.willDispose = false,
63 | });
64 | }
65 |
66 | sealed class AnimationConfigurationWithoutController
67 | extends EasyDialogAnimationConfiguration {
68 | const AnimationConfigurationWithoutController();
69 |
70 | AnimationController createController(TickerProvider vsync);
71 | }
72 |
73 | final class AnimationConfigurationBounded
74 | extends AnimationConfigurationWithoutController {
75 | final Duration duration;
76 | final Duration reverseDuration;
77 | final double startValue;
78 | final double lowerBound;
79 | final double upperBound;
80 |
81 | const AnimationConfigurationBounded({
82 | double? startValue,
83 | Duration duration = const Duration(milliseconds: 350),
84 | Duration? reverseDuration,
85 | this.lowerBound = 0.0,
86 | this.upperBound = 1.0,
87 | }) : this.startValue = startValue ?? lowerBound,
88 | this.duration = duration,
89 | this.reverseDuration = reverseDuration ?? duration,
90 | assert(upperBound >= lowerBound);
91 |
92 | @override
93 | AnimationController createController(TickerProvider vsync) =>
94 | AnimationController(
95 | value: startValue,
96 | duration: duration,
97 | reverseDuration: reverseDuration,
98 | lowerBound: lowerBound,
99 | upperBound: upperBound,
100 | vsync: vsync,
101 | );
102 | }
103 |
104 | final class AnimationConfigurationUnbounded
105 | extends AnimationConfigurationWithoutController {
106 | final Duration duration;
107 | final Duration reverseDuration;
108 | final double startValue;
109 |
110 | const AnimationConfigurationUnbounded({
111 | this.startValue = 0.0,
112 | Duration duration = const Duration(milliseconds: 350),
113 | Duration? reverseDuration,
114 | }) : this.duration = duration,
115 | this.reverseDuration = reverseDuration ?? duration;
116 |
117 | @override
118 | AnimationController createController(TickerProvider vsync) =>
119 | AnimationController.unbounded(
120 | value: startValue,
121 | duration: duration,
122 | reverseDuration: reverseDuration,
123 | vsync: vsync,
124 | );
125 | }
126 |
--------------------------------------------------------------------------------
/lib/src/core/easy_overlay.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: prefer-match-file-name
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/scheduler.dart';
5 |
6 | import 'core.dart';
7 |
8 | /// {@category Overlay}
9 | /// {@category Custom}
10 | /// Controller for manipulating overlay with the dialogs.
11 | ///
12 | /// It defines the methods for inserting and removing dialogs
13 | /// from an [EasyDialogsOverlayBox].
14 | ///
15 | /// It extends the [TickerProvider] interface,
16 | /// which is used for providing animation tickers.
17 | ///
18 | /// It is involved to be used for creating [AnimationController]
19 | /// by [EasyDialogsController].
20 | abstract interface class IEasyOverlay implements TickerProvider {
21 | /// Insert dialog using provided [insertion].
22 | void insertDialog(EasyOverlayBoxInsertion insertion);
23 |
24 | /// Remove dialog using provided [removal].
25 | void removeDialog(EasyOverlayBoxRemoval removal);
26 | }
27 |
28 | /// {@category Overlay}
29 | /// {@category Custom}
30 | /// Box for storing dialog specific entries.
31 | final class EasyDialogsOverlayBox {
32 | @visibleForTesting
33 | final currentEntries =