├── .all-contributorsrc
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── custom.md
│ └── feature_request.md
└── workflows
│ ├── build.yml
│ ├── deploy-preview.yml
│ ├── deploy-prod.yml
│ └── tests.yml
├── .gitignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── PULL_REQUEST_TEMPLATE.md
├── README.md
├── analysis_options.yaml
├── codecov.yml
├── display
├── display.webm
├── header.png
├── landscape2.png
├── output.gif
├── page1.png
├── page2.png
└── page3.png
├── example
├── .firebaserc
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.java
│ │ │ ├── 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.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── assets
│ ├── Fonts
│ │ └── sspu.ttf
│ ├── air-hostess.png
│ ├── airplane.png
│ ├── bus-driver.png
│ ├── bus.png
│ ├── hotel.png
│ ├── taxi-driver.png
│ ├── taxi.png
│ └── waiter.png
├── example.iml
├── example_android.iml
├── firebase.json
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── 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
│ │ └── main.m
├── lib
│ └── main.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.yaml
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ └── Icon-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
└── winuwp
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ ├── project_version
│ └── runner_uwp
│ ├── Assets
│ ├── LargeTile.scale-100.png
│ ├── LargeTile.scale-125.png
│ ├── LargeTile.scale-150.png
│ ├── LargeTile.scale-200.png
│ ├── LargeTile.scale-400.png
│ ├── LockScreenLogo.scale-200.png
│ ├── SmallTile.scale-100.png
│ ├── SmallTile.scale-125.png
│ ├── SmallTile.scale-150.png
│ ├── SmallTile.scale-200.png
│ ├── SmallTile.scale-400.png
│ ├── SplashScreen.scale-100.png
│ ├── SplashScreen.scale-125.png
│ ├── SplashScreen.scale-150.png
│ ├── SplashScreen.scale-200.png
│ ├── SplashScreen.scale-400.png
│ ├── Square150x150Logo.scale-100.png
│ ├── Square150x150Logo.scale-125.png
│ ├── Square150x150Logo.scale-150.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square150x150Logo.scale-400.png
│ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ ├── Square44x44Logo.altform-unplated_targetsize-32.png
│ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ ├── Square44x44Logo.scale-100.png
│ ├── Square44x44Logo.scale-125.png
│ ├── Square44x44Logo.scale-150.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.scale-400.png
│ ├── Square44x44Logo.targetsize-16.png
│ ├── Square44x44Logo.targetsize-24.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── Square44x44Logo.targetsize-256.png
│ ├── Square44x44Logo.targetsize-32.png
│ ├── Square44x44Logo.targetsize-48.png
│ ├── StoreLogo.png
│ ├── StoreLogo.scale-100.png
│ ├── StoreLogo.scale-125.png
│ ├── StoreLogo.scale-150.png
│ ├── StoreLogo.scale-200.png
│ ├── StoreLogo.scale-400.png
│ ├── Wide310x150Logo.scale-200.png
│ ├── WideTile.scale-100.png
│ ├── WideTile.scale-125.png
│ ├── WideTile.scale-150.png
│ ├── WideTile.scale-200.png
│ └── WideTile.scale-400.png
│ ├── CMakeLists.txt
│ ├── CMakeSettings.json
│ ├── Windows_TemporaryKey.pfx
│ ├── appxmanifest.in
│ ├── flutter_frameworkview.cpp
│ ├── main.cpp
│ └── resources.pri
├── intro_views_flutter.iml
├── lib
├── intro_views_flutter.dart
└── src
│ ├── animation_gesture
│ ├── animated_page_dragger.dart
│ ├── page_dragger.dart
│ └── page_reveal.dart
│ ├── clipper
│ └── circular_reveal_clipper.dart
│ ├── helpers
│ ├── constants.dart
│ └── extensions.dart
│ ├── models
│ ├── page_bubble_view_model.dart
│ ├── page_button_view_model.dart
│ ├── page_view_model.dart
│ ├── pager_indicator_view_model.dart
│ └── slide_update_model.dart
│ └── ui
│ ├── intro_views_flutter.dart
│ ├── page.dart
│ ├── page_bubble.dart
│ ├── page_indicator_buttons.dart
│ └── pager_indicator.dart
├── pubspec.yaml
└── test
└── intro_views_flutter_test.dart
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "contributors": [
8 | {
9 | "login": "taljacobson",
10 | "name": "Tal Jacobson",
11 | "avatar_url": "https://avatars1.githubusercontent.com/u/13042769?v=4",
12 | "profile": "https://github.com/taljacobson",
13 | "contributions": [
14 | "maintenance",
15 | "doc",
16 | "projectManagement"
17 | ]
18 | },
19 | {
20 | "login": "marloncepeda",
21 | "name": "marloncepeda",
22 | "avatar_url": "https://avatars0.githubusercontent.com/u/25042632?v=4",
23 | "profile": "https://github.com/marloncepeda",
24 | "contributions": [
25 | "bug"
26 | ]
27 | },
28 | {
29 | "login": "Gorniv",
30 | "name": "Kravchenko Igor",
31 | "avatar_url": "https://avatars0.githubusercontent.com/u/963316?v=4",
32 | "profile": "https://medium.com/it-challenge",
33 | "contributions": [
34 | "bug"
35 | ]
36 | },
37 | {
38 | "login": "SiDevesh",
39 | "name": "SiDevesh",
40 | "avatar_url": "https://avatars2.githubusercontent.com/u/17254413?v=4",
41 | "profile": "https://github.com/SiDevesh",
42 | "contributions": [
43 | "ideas"
44 | ]
45 | },
46 | {
47 | "login": "spidgorny",
48 | "name": "Slawa Pidgorny",
49 | "avatar_url": "https://avatars2.githubusercontent.com/u/1579235?v=4",
50 | "profile": "http://have-you-been-here.com/",
51 | "contributions": [
52 | "ideas"
53 | ]
54 | },
55 | {
56 | "login": "haideraltahan",
57 | "name": "Haider Al-Tahan",
58 | "avatar_url": "https://avatars1.githubusercontent.com/u/4427929?v=4",
59 | "profile": "http://haideraltahan.com",
60 | "contributions": [
61 | "ideas"
62 | ]
63 | },
64 | {
65 | "login": "newerton",
66 | "name": "Newerton",
67 | "avatar_url": "https://avatars3.githubusercontent.com/u/4175945?v=4",
68 | "profile": "http://newerton.com",
69 | "contributions": [
70 | "bug"
71 | ]
72 | },
73 | {
74 | "login": "kengu",
75 | "name": "Kenneth Gulbrandsøy",
76 | "avatar_url": "https://avatars3.githubusercontent.com/u/866528?v=4",
77 | "profile": "http://www.discoos.org",
78 | "contributions": [
79 | "bug",
80 | "test"
81 | ]
82 | },
83 | {
84 | "login": "xsahil03x",
85 | "name": "Sahil Kumar",
86 | "avatar_url": "https://avatars2.githubusercontent.com/u/25670178?v=4",
87 | "profile": "http://www.linkedin.com/in/xsahil03x",
88 | "contributions": [
89 | "test"
90 | ]
91 | },
92 | {
93 | "login": "rwrz",
94 | "name": "Rodrigo Boratto",
95 | "avatar_url": "https://avatars1.githubusercontent.com/u/2169309?v=4",
96 | "profile": "http://www.yodsoft.com",
97 | "contributions": [
98 | "bug"
99 | ]
100 | },
101 | {
102 | "login": "RKKgithub",
103 | "name": "RKKgithub",
104 | "avatar_url": "https://avatars2.githubusercontent.com/u/63288678?v=4",
105 | "profile": "https://github.com/RKKgithub",
106 | "contributions": [
107 | "code"
108 | ]
109 | },
110 | {
111 | "login": "ir2pid",
112 | "name": "Sudipta Dutta",
113 | "avatar_url": "https://avatars.githubusercontent.com/u/907075?v=4",
114 | "profile": "https://ir2pid.github.io",
115 | "contributions": [
116 | "bug"
117 | ]
118 | },
119 | {
120 | "login": "mzdm",
121 | "name": "Matěj Žídek",
122 | "avatar_url": "https://avatars.githubusercontent.com/u/67197047?v=4",
123 | "profile": "https://github.com/mzdm",
124 | "contributions": [
125 | "bug",
126 | "code",
127 | "platform",
128 | "maintenance",
129 | "ideas",
130 | "doc"
131 | ]
132 | },
133 | {
134 | "login": "ride4sun",
135 | "name": "ride4sun",
136 | "avatar_url": "https://avatars.githubusercontent.com/u/7740651?v=4",
137 | "profile": "https://github.com/ride4sun",
138 | "contributions": [
139 | "code"
140 | ]
141 | },
142 | {
143 | "login": "zognotadog",
144 | "name": "zognotadog",
145 | "avatar_url": "https://avatars.githubusercontent.com/u/12435592?v=4",
146 | "profile": "https://github.com/zognotadog",
147 | "contributions": [
148 | "code"
149 | ]
150 | },
151 | {
152 | "login": "Jayson1999",
153 | "name": "Jayson",
154 | "avatar_url": "https://avatars.githubusercontent.com/u/44394801?v=4",
155 | "profile": "https://github.com/Jayson1999",
156 | "contributions": [
157 | "bug"
158 | ]
159 | }
160 | ],
161 | "contributorsPerLine": 7,
162 | "projectName": "IntroViews-Flutter",
163 | "projectOwner": "aagarwal1012",
164 | "repoType": "github",
165 | "repoHost": "https://github.com",
166 | "skipCi": true
167 | }
168 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | # github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: aagarwal1012
5 | # open_collective: # Replace with a single Open Collective username
6 | # ko_fi: # Replace with a single Ko-fi username
7 | # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | custom: https://www.paypal.me/aagarwal1012
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Describe the bug**
8 |
9 | A clear and concise description of what the bug is.
10 |
11 | Including [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) code sample if possible.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Smartphone (please complete the following information):**
27 | - Device: [e.g. iPhone6]
28 | - OS: [e.g. iOS8.1]
29 | - Version [e.g. 22]
30 |
31 | **Current package version**
32 |
33 | x.y.z
34 |
35 | **Logs**
36 |
37 | Output of ```flutter doctor -v```
38 |
39 | **Additional context**
40 |
41 | Add any other context about the problem here.
42 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Custom issue template
3 | about: Describe this issue template's purpose here.
4 |
5 | ---
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 |
5 | ---
6 |
7 | **Is your feature request related to a problem? Please describe.**
8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 |
10 | **Describe the solution you'd like**
11 | A clear and concise description of what you want to happen.
12 |
13 | **Describe alternatives you've considered**
14 | A clear and concise description of any alternative solutions or features you've considered.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | on: [push, pull_request]
2 | name: build
3 | jobs:
4 | build:
5 | name: Run build
6 | runs-on: macos-latest
7 | steps:
8 | - uses: actions/checkout@v2
9 | - name: Flutter action
10 | uses: subosito/flutter-action@v1
11 | with:
12 | channel: 'stable'
13 | - name: Install dependencies
14 | run: flutter pub get
15 | - name: Build apk
16 | run: |
17 | cd example
18 | flutter build apk
--------------------------------------------------------------------------------
/.github/workflows/deploy-preview.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Preview Channel
2 |
3 | on:
4 | pull_request:
5 |
6 | jobs:
7 | preview:
8 | if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
9 | runs-on: ubuntu-latest
10 | defaults:
11 | run:
12 | working-directory: ./example
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - uses: subosito/flutter-action@v1
17 | - run: flutter build web
18 | - uses: FirebaseExtended/action-hosting-deploy@v0
19 | with:
20 | repoToken: "${{ secrets.GITHUB_TOKEN }}"
21 | firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
22 | expires: 30d
23 | entryPoint: "./example"
24 | projectId: introviews-flutter
25 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-prod.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Live Channel
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | live:
10 | runs-on: ubuntu-latest
11 | defaults:
12 | run:
13 | working-directory: ./example
14 |
15 | steps:
16 | - uses: actions/checkout@v2
17 | - uses: subosito/flutter-action@v1
18 | - run: flutter build web
19 | - uses: FirebaseExtended/action-hosting-deploy@v0
20 | with:
21 | repoToken: "${{ secrets.GITHUB_TOKEN }}"
22 | firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
23 | projectId: introviews-flutter
24 | entryPoint: "./example"
25 | channelId: live
26 |
--------------------------------------------------------------------------------
/.github/workflows/tests.yml:
--------------------------------------------------------------------------------
1 | on: [push, pull_request]
2 | name: tests
3 | jobs:
4 | build:
5 | name: Run tests
6 | runs-on: macos-latest
7 | steps:
8 | - uses: actions/checkout@v2
9 | - name: Flutter action
10 | uses: subosito/flutter-action@v1
11 | with:
12 | channel: 'stable'
13 | - name: Install dependencies
14 | run: flutter pub get
15 | - name: Run tests
16 | id: test
17 | run: |
18 | cd example
19 | flutter test ..
20 | cd ..
21 | - name: Check format
22 | run: flutter format --dry-run --set-exit-if-changed .
23 | - name: Analyzer
24 | run: flutter analyze --no-pub lib example
25 | - name: Generate coverage
26 | continue-on-error: true
27 | run: flutter test --no-pub --coverage
28 | - name: Upload coverage to Codecov
29 | if: steps.test.outcome == 'success'
30 | uses: codecov/codecov-action@v1
31 | with:
32 | file: coverage/lcov.info
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 | pubspec.lock
7 |
8 | build/
9 | ios/.generated/
10 | ios/Flutter/Generated.xcconfig
11 | ios/Runner/GeneratedPluginRegistrant.*
12 |
13 | # IntelliJ
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea
18 |
19 | doc/api/
20 |
21 | *.dart.js
22 | *.info.json # Produced by the --dump-info flag.
23 | *.js # When generated by dart2js. Don't specify *.js if your
24 | # project includes source files written in JavaScript.
25 | *.js_
26 | *.js.deps
27 | *.js.map
28 | .vscode/
29 | /coverage/
30 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 3.2.0
2 | * Fixed overflowing issue with the bubbles. Thanks @Jayson1999
3 | * Updated app example
4 | * Updated CI
5 |
6 | ## 3.1.1
7 | * Updated app example. Thanks @zognotadog
8 |
9 | ## 3.1.0
10 | * Added new `pageBackground` property to the `PageViewModel`, which sets a widget as a
11 | background of the whole page (`pageColor` has priority over this). Thanks @ride4sun
12 | * Arguments `title`, `body` and `mainImage` are **no longer required** and can be omitted.
13 |
14 | ## 3.0.0
15 | **Major Updates**
16 | * Migrated to null safety.
17 | * **Breaking Change**: Now only a single import is required:
18 |
19 | ```dart
20 | import 'package:intro_views_flutter/intro_views_flutter.dart';
21 | ```
22 |
23 | Other old imports from this package are now invalid and must be removed/replaced
24 | with import above in order to solve path errors.
25 |
26 | ## 2.9.0
27 | * Critical Bug Fix: Replacing deprecated `resizeToAvoidBottomPadding`.
28 |
29 | ## 2.8.2
30 | * Minor bug fixes and enhancements.
31 |
32 | ## 2.8.1
33 | * Minor bug fixes.
34 |
35 | ## 2.8.0
36 | **Bug Fixes**
37 | * Add SafeArea to align title below display cutouts.
38 | * Prevent multiple rapid clicks to overflow index bounds.
39 |
40 | ## 2.7.0
41 | **Feature Enhancement**
42 | * Allow title TextStyle and body TextStyle to be changed individually.
43 | * fix: title size for iPhone 5s
44 |
45 | ## 2.6.0
46 | * Fix problem padding top in title of pageViews.
47 | * Background property added that can be used to add full screen image to IntroViews.
48 |
49 | ## 2.5.0
50 | * Added Next Button to move to the next screen. Overriding doneButtonPersist.
51 | * Added Back Button. Overrides showSkipButton starting from the second page.
52 |
53 | ## 2.4.0
54 | **Feature Enhancement**
55 | * Exposed the way to change the distance a user needs to drag for a full transition to occur using `fullTransition` and its default value is set to `300.0`.
56 | * Added ability to insert a custom widget in the page bubble.
57 | * Changed `title`, `body`, `mainImage` PageViewModel types to be more dynamic.
58 | * Removed all `new` keywords.
59 |
60 | ## 2.3.0
61 | **Feature Enhancement**
62 | * Exposed columnMainAxisAlignment to change mainAxisAlignment.
63 | * Updated Readme.
64 |
65 | ## 2.2.4
66 | * Adjust the Scaffold in fullscreen.
67 |
68 | ## 2.2.3
69 | * General Update.
70 |
71 | ## 2.2.2
72 | * Added Widget testing.
73 | * Updated Readme.
74 |
75 |
76 | ## 2.2.1
77 | * Added feature to override Text widget styles for skip and done button.
78 | * Added doneButtonPersist to show done button throughout the session.
79 | * Updated Readme.
80 |
81 | ## 2.1.1
82 | * Fixed overflow for small screen apps.
83 |
84 | ## 2.0.1
85 | **Major Updates**
86 | * Made intro views responsive.
87 | * Refracting page view model.
88 | - Body title, expects Text Widget.
89 | - Main image, expects Image Widget.
90 | - Added TextStyle property to page view model that can be used to set styles for both title and body.
91 | * Added TextStyle property for page indicator buttons which overrides previous button properties.
92 | * Updated Readme and example.
93 |
94 | ## 1.0.3
95 |
96 | * Made intro views responsive.
97 | * Added onTapSkipButton voidCallback.
98 | * Updated Readme.
99 |
100 | ## 1.0.2
101 |
102 | * Updated Readme.
103 | * Fixed bugs.
104 | * Fixed formatting issues.
105 |
106 | ## 1.0.1
107 |
108 | * Updated Readme.
109 | * Fixed static analyzers issues.
110 | * Fixed formatting issues.
111 |
112 | ## 1.0.0
113 |
114 | * Initial Release.
115 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | ## 1. Purpose
4 |
5 | A primary goal of IntroViews for FLutter is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
6 |
7 | This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
8 |
9 | We invite all those who participate in IntroViews for FLutter to help us create safe and positive experiences for everyone.
10 |
11 | ## 2. Open Source Citizenship
12 |
13 | A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
14 |
15 | Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
16 |
17 | If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
18 |
19 | ## 3. Expected Behavior
20 |
21 | The following behaviors are expected and requested of all community members:
22 |
23 | * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24 | * Exercise consideration and respect in your speech and actions.
25 | * Attempt collaboration before conflict.
26 | * Refrain from demeaning, discriminatory, or harassing behavior and speech.
27 | * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28 | * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
29 |
30 | ## 4. Unacceptable Behavior
31 |
32 | The following behaviors are considered harassment and are unacceptable within our community:
33 |
34 | * Violence, threats of violence or violent language directed against another person.
35 | * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36 | * Posting or displaying sexually explicit or violent material.
37 | * Posting or threatening to post other people’s personally identifying information ("doxing").
38 | * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39 | * Inappropriate photography or recording.
40 | * Inappropriate physical contact. You should have someone’s consent before touching them.
41 | * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42 | * Deliberate intimidation, stalking or following (online or in person).
43 | * Advocating for, or encouraging, any of the above behavior.
44 | * Sustained disruption of community events, including talks and presentations.
45 |
46 | ## 5. Consequences of Unacceptable Behavior
47 |
48 | Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
49 |
50 | Anyone asked to stop unacceptable behavior is expected to comply immediately.
51 |
52 | If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
53 |
54 | ## 6. Reporting Guidelines
55 |
56 | If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. aagarwal9782@gmail.com.
57 |
58 |
59 |
60 | Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
61 |
62 | ## 7. Addressing Grievances
63 |
64 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Ayush Agarwal with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
65 |
66 |
67 |
68 | ## 8. Scope
69 |
70 | We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
71 |
72 | This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
73 |
74 | ## 9. Contact info
75 |
76 | aagarwal9782@gmail.com
77 |
78 | ## 10. License and attribution
79 |
80 | This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
81 |
82 | Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
83 |
84 | Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
85 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to IntroViews-Flutter
2 | ==========================
3 | :+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4 | If you'd like to report a bug or join in the development
5 | of IntroViews-Flutter, then here are some notes on how to do that.
6 |
7 | ## Contents
8 | * [Reporting bugs and opening issues](#reporting-bugs-and-opening-issues)
9 | * [Coding Guidelines](#coding-guidelines)
10 | * [Pull Requests](#pull-requests)
11 | * [MVP architecture](#mvp-architecture)
12 | * [Style Check](#style-check)
13 | * [Git Commit Messages](#git-commit-messages)
14 | * [MDG Chat Room](#mdg-chat-room)
15 | * [Security](#security)
16 |
17 | ## Reporting bugs and opening issues
18 |
19 | If you'd like a report a bug or open an issue then please:
20 |
21 | **Check if there is an existing issue.** If there is then please add
22 | any more information that you have, or give it a 👍.
23 |
24 | When submitting an issue please describe the issue as clearly as possible, including how to
25 | reproduce the bug, which situations it appears in, what you expected to happen, and what actually happens.
26 | If you can include a screenshot for front end issues that is very helpful.
27 |
28 | ## Coding Guidelines
29 |
30 | ### Pull Requests
31 | We love pull requests, so be bold with them! Don't be afraid of going ahead
32 | and changing something, or adding a new feature. We're very happy to work with you
33 | to get your changes merged into IntroViews-Flutter.
34 |
35 | If you've got an idea for a change then please discuss it in the open first,
36 | either by opening an issue, or by joining us in our
37 | [MDG public chat room](https://mdg.sdslabs.co/chat) or email me at [aagarwal9782@gmail.com](mailto:aagarwal9782@gmail.com).
38 |
39 | If you're looking for something to work on, have a look at the open issues in the repository [here](https://github.com/aagarwal1012/IntroViews-Flutter/issues).
40 |
41 | > We don't have a set format for Pull requests, but we expect you to list changes, bugs generated and other relevant things in PR message.
42 |
43 | ### MVP architecture
44 | IntroViews-Flutter is built keeping [MVP (model-view-presenter)](https://en.wikipedia.org/wiki/Model–view–presenter) architecture in mind, so any changes that are proposed to IntroViews-Flutter should follow MVP architecture. If you are confused regarding where a method should be, join us at [MDG public chat room](https://mdg.sdslabs.co/chat), we'll be happy to help.
45 |
46 | ### Style Check
47 | IntroViews-Flutter uses `dartfmt` for performing style checks on the codebase, which helps us in maintaining the quality of the code. Please check that the code is properly formatted according to `dartfmt` and also resolve all the issues, if any, shown by `dart analyze` before making a pull request. **Pull Requests will only be merged once all the violations are resolved**.
48 |
49 | ### Git Commit Messages
50 | * Use the present tense ("Add feature" not "Added feature")
51 | * Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
52 | * Limit the first line to 72 characters or less
53 | * Reference issues and pull requests liberally
54 | * When only changing documentation, include `[ci skip]` in the commit description
55 | * Consider using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
56 |
57 | ## MDG Chat Room
58 |
59 | If you want to ask any questions in real-time, or get a feel for what's going on
60 | then please drop into our [MDG public chat room](https://mdg.sdslabs.co/chat).
61 | If no one is online then you can still leave a message that will hopefully get a reply
62 | when we return.
63 |
64 | ## Security
65 |
66 | Please do not publish security vulnerabilities publicly until we've had a chance
67 | to address them. All security related issues/patches should be sent directly to
68 | [sdsmobilelabs@gmail.com](mailto:sdsmobilelabs@gmail.com) where we will attempt to address them quickly. If you're
69 | unsure whether something is a security issue or not, then please be cautious and contact us at [sdsmobilelabs@gmail.com](mailto:sdsmobilelabs@gmail.com) first.
70 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Ayush Agarwal
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.
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Pull Request Process
2 |
3 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
4 | 2. Update the README.md if needed with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
5 | 3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
6 | 4. You may merge the Pull Request in once you have the sign-off of one developer, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | project: true
4 | patch: on
--------------------------------------------------------------------------------
/display/display.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/display.webm
--------------------------------------------------------------------------------
/display/header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/header.png
--------------------------------------------------------------------------------
/display/landscape2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/landscape2.png
--------------------------------------------------------------------------------
/display/output.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/output.gif
--------------------------------------------------------------------------------
/display/page1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/page1.png
--------------------------------------------------------------------------------
/display/page2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/page2.png
--------------------------------------------------------------------------------
/display/page3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/display/page3.png
--------------------------------------------------------------------------------
/example/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "introviews-flutter"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 | .idea/
4 |
5 | .packages
6 | .pub/
7 |
8 | build/
9 |
10 | .flutter-plugins
11 | /android/app/src/main/gen/com/example/example/BuildConfig.java
12 | /android/app/src/main/gen/com/example/example/Manifest.java
13 | /android/app/src/main/gen/com/example/example/R.java
14 | /ios/Flutter/flutter_export_environment.sh
15 |
16 | .firebase/
17 | /winuwp/flutter/flutter_windows.h
18 | /winuwp/flutter/ephemeral/*
19 |
--------------------------------------------------------------------------------
/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 and should not be manually edited.
5 |
6 | version:
7 | revision: f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 |
--------------------------------------------------------------------------------
/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 | apply plugin: 'com.android.application'
15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16 |
17 | android {
18 | compileSdkVersion 28
19 |
20 | lintOptions {
21 | disable 'InvalidPackage'
22 | }
23 |
24 | defaultConfig {
25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
26 | applicationId "com.example.example"
27 | minSdkVersion 16
28 | targetSdkVersion 28
29 | versionCode 1
30 | versionName "1.0"
31 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
32 | }
33 |
34 | buildTypes {
35 | release {
36 | // TODO: Add your own signing config for the release build.
37 | // Signing with the debug keys for now, so `flutter run --release` works.
38 | signingConfig signingConfigs.debug
39 | }
40 | }
41 | }
42 |
43 | flutter {
44 | source '../..'
45 | }
46 |
47 | dependencies {
48 | testImplementation 'junit:junit:4.12'
49 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
50 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
51 | }
52 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
18 |
22 |
25 |
30 |
33 |
40 |
41 |
42 |
43 |
44 |
45 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.example;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
7 |
--------------------------------------------------------------------------------
/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:4.1.3'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 | org.gradle.jvmargs=-Xmx1536M
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 05 14:50:23 CEST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/assets/Fonts/sspu.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/Fonts/sspu.ttf
--------------------------------------------------------------------------------
/example/assets/air-hostess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/air-hostess.png
--------------------------------------------------------------------------------
/example/assets/airplane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/airplane.png
--------------------------------------------------------------------------------
/example/assets/bus-driver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/bus-driver.png
--------------------------------------------------------------------------------
/example/assets/bus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/bus.png
--------------------------------------------------------------------------------
/example/assets/hotel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/hotel.png
--------------------------------------------------------------------------------
/example/assets/taxi-driver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/taxi-driver.png
--------------------------------------------------------------------------------
/example/assets/taxi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/taxi.png
--------------------------------------------------------------------------------
/example/assets/waiter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/assets/waiter.png
--------------------------------------------------------------------------------
/example/example.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/example_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/example/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "build/web",
4 | "ignore": [
5 | "firebase.json",
6 | "**/.*",
7 | "**/node_modules/**"
8 | ],
9 | "rewrites": [
10 | {
11 | "source": "**",
12 | "destination": "/index.html"
13 | }
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/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 | 8.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 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/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.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
7 | [GeneratedPluginRegistrant registerWithRegistry:self];
8 | // Override point for customization after application launch.
9 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
10 | }
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:intro_views_flutter/intro_views_flutter.dart';
3 |
4 | /// This is the main method of app, from here execution starts.
5 | void main() => runApp(App());
6 |
7 | /// App widget class.
8 | class App extends StatelessWidget {
9 | App({Key? key}) : super(key: key);
10 |
11 | // Making list of pages needed to pass in IntroViewsFlutter constructor.
12 | final pages = [
13 | PageViewModel(
14 | pageColor: const Color(0xFF03A9F4),
15 | // iconImageAssetPath: 'assets/air-hostess.png',
16 | bubble: Image.asset('assets/air-hostess.png'),
17 | body: const Text(
18 | 'Hassle-free booking of flight tickets with full refund on cancellation',
19 | ),
20 | title: const Text(
21 | 'Flights',
22 | ),
23 | titleTextStyle:
24 | const TextStyle(fontFamily: 'MyFont', color: Colors.white),
25 | bodyTextStyle: const TextStyle(fontFamily: 'MyFont', color: Colors.white),
26 | mainImage: Image.asset(
27 | 'assets/airplane.png',
28 | height: 285.0,
29 | width: 285.0,
30 | alignment: Alignment.center,
31 | ),
32 | ),
33 | PageViewModel(
34 | pageColor: const Color(0xFF8BC34A),
35 | iconImageAssetPath: 'assets/waiter.png',
36 | body: const Text(
37 | 'We work for the comfort , enjoy your stay at our beautiful hotels',
38 | ),
39 | title: const Text('Hotels'),
40 | mainImage: Image.asset(
41 | 'assets/hotel.png',
42 | height: 285.0,
43 | width: 285.0,
44 | alignment: Alignment.center,
45 | ),
46 | titleTextStyle:
47 | const TextStyle(fontFamily: 'MyFont', color: Colors.white),
48 | bodyTextStyle: const TextStyle(fontFamily: 'MyFont', color: Colors.white),
49 | ),
50 | PageViewModel(
51 | pageBackground: Container(
52 | decoration: const BoxDecoration(
53 | gradient: LinearGradient(
54 | stops: [0.0, 1.0],
55 | begin: FractionalOffset.topCenter,
56 | end: FractionalOffset.bottomCenter,
57 | tileMode: TileMode.repeated,
58 | colors: [
59 | Colors.orange,
60 | Colors.pinkAccent,
61 | ],
62 | ),
63 | ),
64 | ),
65 | iconImageAssetPath: 'assets/taxi-driver.png',
66 | body: const Text(
67 | 'Easy cab booking at your doorstep with cashless payment system',
68 | ),
69 | title: const Text('Cabs'),
70 | mainImage: Image.asset(
71 | 'assets/taxi.png',
72 | height: 285.0,
73 | width: 285.0,
74 | alignment: Alignment.center,
75 | ),
76 | titleTextStyle:
77 | const TextStyle(fontFamily: 'MyFont', color: Colors.white),
78 | bodyTextStyle: const TextStyle(fontFamily: 'MyFont', color: Colors.white),
79 | ),
80 | ];
81 |
82 | @override
83 | Widget build(BuildContext context) {
84 | return MaterialApp(
85 | debugShowCheckedModeBanner: false,
86 | title: 'IntroViews Flutter',
87 | theme: ThemeData(
88 | primarySwatch: Colors.blue,
89 | ),
90 | home: Builder(
91 | builder: (context) => IntroViewsFlutter(
92 | pages,
93 | showNextButton: true,
94 | showBackButton: true,
95 | onTapDoneButton: () {
96 | // Use Navigator.pushReplacement if you want to dispose the latest route
97 | // so the user will not be able to slide back to the Intro Views.
98 | Navigator.push(
99 | context,
100 | MaterialPageRoute(builder: (_) => HomePage()),
101 | );
102 | },
103 | pageButtonTextStyles: const TextStyle(
104 | color: Colors.white,
105 | fontSize: 18.0,
106 | ),
107 | ),
108 | ),
109 | );
110 | }
111 | }
112 |
113 | /// Home Page of our example app.
114 | class HomePage extends StatelessWidget {
115 | // ignore: prefer_const_constructors_in_immutables
116 | HomePage({Key? key}) : super(key: key);
117 |
118 | @override
119 | Widget build(BuildContext context) {
120 | return Scaffold(
121 | appBar: AppBar(
122 | title: const Text('Home'),
123 | ),
124 | body: const Center(
125 | child: Text('This is the home page of the app'),
126 | ),
127 | );
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/example/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 | project(runner LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "example")
5 | set(APPLICATION_ID "com.example.example")
6 |
7 | cmake_policy(SET CMP0063 NEW)
8 |
9 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
10 |
11 | # Root filesystem for cross-building.
12 | if(FLUTTER_TARGET_PLATFORM_SYSROOT)
13 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
14 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
15 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
16 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
17 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
18 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
19 | endif()
20 |
21 | # Configure build options.
22 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
23 | set(CMAKE_BUILD_TYPE "Debug" CACHE
24 | STRING "Flutter build mode" FORCE)
25 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
26 | "Debug" "Profile" "Release")
27 | endif()
28 |
29 | # Compilation settings that should be applied to most targets.
30 | function(APPLY_STANDARD_SETTINGS TARGET)
31 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
32 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
33 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
34 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
35 | endfunction()
36 |
37 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
38 |
39 | # Flutter library and tool build rules.
40 | add_subdirectory(${FLUTTER_MANAGED_DIR})
41 |
42 | # System-level dependencies.
43 | find_package(PkgConfig REQUIRED)
44 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
45 |
46 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
47 |
48 | # Application build
49 | add_executable(${BINARY_NAME}
50 | "main.cc"
51 | "my_application.cc"
52 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
53 | )
54 | apply_standard_settings(${BINARY_NAME})
55 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
56 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
57 | add_dependencies(${BINARY_NAME} flutter_assemble)
58 | # Only the install-generated bundle's copy of the executable will launch
59 | # correctly, since the resources must in the right relative locations. To avoid
60 | # people trying to run the unbundled copy, put it in a subdirectory instead of
61 | # the default top-level location.
62 | set_target_properties(${BINARY_NAME}
63 | PROPERTIES
64 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
65 | )
66 |
67 | # Generated plugin build rules, which manage building the plugins and adding
68 | # them to the application.
69 | include(flutter/generated_plugins.cmake)
70 |
71 |
72 | # === Installation ===
73 | # By default, "installing" just makes a relocatable bundle in the build
74 | # directory.
75 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
76 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
77 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
78 | endif()
79 |
80 | # Start with a clean build bundle directory every time.
81 | install(CODE "
82 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
83 | " COMPONENT Runtime)
84 |
85 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
86 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
87 |
88 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
89 | COMPONENT Runtime)
90 |
91 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
92 | COMPONENT Runtime)
93 |
94 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
95 | COMPONENT Runtime)
96 |
97 | if(PLUGIN_BUNDLED_LIBRARIES)
98 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
99 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
100 | COMPONENT Runtime)
101 | endif()
102 |
103 | # Fully re-copy the assets directory on each build to avoid having stale files
104 | # from a previous install.
105 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
106 | install(CODE "
107 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
108 | " COMPONENT Runtime)
109 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
110 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
111 |
112 | # Install the AOT library on non-Debug builds only.
113 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
114 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
115 | COMPONENT Runtime)
116 | endif()
117 |
--------------------------------------------------------------------------------
/example/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
4 |
5 | # Configuration provided via flutter tool.
6 | include(${EPHEMERAL_DIR}/generated_config.cmake)
7 |
8 | # TODO: Move the rest of this into files in ephemeral. See
9 | # https://github.com/flutter/flutter/issues/57146.
10 |
11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
12 | # which isn't available in 3.10.
13 | function(list_prepend LIST_NAME PREFIX)
14 | set(NEW_LIST "")
15 | foreach(element ${${LIST_NAME}})
16 | list(APPEND NEW_LIST "${PREFIX}${element}")
17 | endforeach(element)
18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
19 | endfunction()
20 |
21 | # === Flutter Library ===
22 | # System-level dependencies.
23 | find_package(PkgConfig REQUIRED)
24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
27 |
28 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
29 |
30 | # Published to parent scope for install step.
31 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
32 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
33 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
34 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
35 |
36 | list(APPEND FLUTTER_LIBRARY_HEADERS
37 | "fl_basic_message_channel.h"
38 | "fl_binary_codec.h"
39 | "fl_binary_messenger.h"
40 | "fl_dart_project.h"
41 | "fl_engine.h"
42 | "fl_json_message_codec.h"
43 | "fl_json_method_codec.h"
44 | "fl_message_codec.h"
45 | "fl_method_call.h"
46 | "fl_method_channel.h"
47 | "fl_method_codec.h"
48 | "fl_method_response.h"
49 | "fl_plugin_registrar.h"
50 | "fl_plugin_registry.h"
51 | "fl_standard_message_codec.h"
52 | "fl_standard_method_codec.h"
53 | "fl_string_codec.h"
54 | "fl_value.h"
55 | "fl_view.h"
56 | "flutter_linux.h"
57 | )
58 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
59 | add_library(flutter INTERFACE)
60 | target_include_directories(flutter INTERFACE
61 | "${EPHEMERAL_DIR}"
62 | )
63 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
64 | target_link_libraries(flutter INTERFACE
65 | PkgConfig::GTK
66 | PkgConfig::GLIB
67 | PkgConfig::GIO
68 | )
69 | add_dependencies(flutter flutter_assemble)
70 |
71 | # === Flutter tool backend ===
72 | # _phony_ is a non-existent file to force this command to run every time,
73 | # since currently there's no way to get a full input/output list from the
74 | # flutter tool.
75 | add_custom_command(
76 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
77 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
78 | COMMAND ${CMAKE_COMMAND} -E env
79 | ${FLUTTER_TOOL_ENVIRONMENT}
80 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
81 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
82 | VERBATIM
83 | )
84 | add_custom_target(flutter_assemble DEPENDS
85 | "${FLUTTER_LIBRARY}"
86 | ${FLUTTER_LIBRARY_HEADERS}
87 | )
88 |
--------------------------------------------------------------------------------
/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 | set(PLUGIN_BUNDLED_LIBRARIES)
9 |
10 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
11 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
12 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
13 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
15 | endforeach(plugin)
16 |
--------------------------------------------------------------------------------
/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 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/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 |
64 |
65 |
71 |
73 |
79 |
80 |
81 |
82 |
84 |
85 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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 © 2021 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: An example app to show the usage of the IntroViewsFlutter package.
3 |
4 | environment:
5 | sdk: ">=2.12.0 <3.0.0"
6 |
7 | dependencies:
8 | flutter:
9 | sdk: flutter
10 | intro_views_flutter:
11 | path: ../
12 |
13 | # The following adds the Cupertino Icons font to your application.
14 | # Use with the CupertinoIcons class for iOS style icons.
15 | cupertino_icons: ^1.0.2
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 | flutter_lints: ^1.0.3
21 |
22 |
23 | # For information on the generic Dart part of this file, see the
24 | # following page: https://www.dartlang.org/tools/pub/pubspec
25 |
26 | # The following section is specific to Flutter.
27 | flutter:
28 |
29 | # The following line ensures that the Material Icons font is
30 | # included with your application, so that you can use the icons in
31 | # the material Icons class.
32 | uses-material-design: true
33 |
34 | # To add assets to your application, add an assets section, like this:
35 | # assets:
36 | # - images/a_dot_burr.jpeg
37 | # - images/a_dot_ham.jpeg
38 |
39 | assets:
40 | - assets/air-hostess.png
41 | - assets/airplane.png
42 | - assets/bus-driver.png
43 | - assets/bus.png
44 | - assets/hotel.png
45 | - assets/taxi.png
46 | - assets/taxi-driver.png
47 | - assets/waiter.png
48 |
49 | # An image asset can refer to one or more resolution-specific "variants", see
50 | # https://flutter.io/assets-and-images/#resolution-aware.
51 |
52 | # For details regarding adding assets from package dependencies, see
53 | # https://flutter.io/assets-and-images/#from-packages
54 |
55 | # To add custom fonts to your application, add a fonts section here,
56 | # in this "flutter" section. Each entry in this list should have a
57 | # "family" key with the font family name, and a "fonts" key with a
58 | # list giving the asset and other descriptors for the font. For
59 | # example:
60 | # fonts:
61 | # - family: Schyler
62 | # fonts:
63 | # - asset: fonts/Schyler-Regular.ttf
64 | # - asset: fonts/Schyler-Italic.ttf
65 | # style: italic
66 | # - family: Trajan Pro
67 | # fonts:
68 | # - asset: fonts/TrajanPro.ttf
69 | # - asset: fonts/TrajanPro_Bold.ttf
70 | # weight: 700
71 | fonts:
72 | - family: MyFont
73 | fonts:
74 | - asset: assets/Fonts/sspu.ttf
75 | #
76 | # For details regarding fonts from package dependencies,
77 | # see https://flutter.io/custom-fonts/#from-packages
78 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Introviews Example App
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Introviews Example App",
3 | "short_name": "Introviews Flutter",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "Example app for Introviews Flutter package.",
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 | }
24 |
--------------------------------------------------------------------------------
/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 | cmake_minimum_required(VERSION 3.15)
2 | project(example LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "example")
5 |
6 | cmake_policy(SET CMP0063 NEW)
7 |
8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
9 |
10 | # Configure build options.
11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
12 | if(IS_MULTICONFIG)
13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
14 | CACHE STRING "" FORCE)
15 | else()
16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
17 | set(CMAKE_BUILD_TYPE "Debug" CACHE
18 | STRING "Flutter build mode" FORCE)
19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
20 | "Debug" "Profile" "Release")
21 | endif()
22 | endif()
23 |
24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
28 |
29 | # Use Unicode for all projects.
30 | add_definitions(-DUNICODE -D_UNICODE)
31 |
32 | # Compilation settings that should be applied to most targets.
33 | function(APPLY_STANDARD_SETTINGS TARGET)
34 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
36 | target_compile_options(${TARGET} PRIVATE /EHsc)
37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
39 | endfunction()
40 |
41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
42 |
43 | # Flutter library and tool build rules.
44 | add_subdirectory(${FLUTTER_MANAGED_DIR})
45 |
46 | # Application build
47 | add_subdirectory("runner")
48 |
49 | # Generated plugin build rules, which manage building the plugins and adding
50 | # them to the application.
51 | include(flutter/generated_plugins.cmake)
52 |
53 |
54 | # === Installation ===
55 | # Support files are copied into place next to the executable, so that it can
56 | # run in place. This is done instead of making a separate bundle (as on Linux)
57 | # so that building and running from within Visual Studio will work.
58 | set(BUILD_BUNDLE_DIR "$")
59 | # Make the "install" step default, as it's required to run.
60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
63 | endif()
64 |
65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
67 |
68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
69 | COMPONENT Runtime)
70 |
71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
72 | COMPONENT Runtime)
73 |
74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
75 | COMPONENT Runtime)
76 |
77 | if(PLUGIN_BUNDLED_LIBRARIES)
78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
80 | COMPONENT Runtime)
81 | endif()
82 |
83 | # Fully re-copy the assets directory on each build to avoid having stale files
84 | # from a previous install.
85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
86 | install(CODE "
87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
88 | " COMPONENT Runtime)
89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
91 |
92 | # Install the AOT library on non-Debug builds only.
93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
94 | CONFIGURATIONS Profile;Release
95 | COMPONENT Runtime)
96 |
--------------------------------------------------------------------------------
/example/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.15)
2 |
3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
4 |
5 | # Configuration provided via flutter tool.
6 | include(${EPHEMERAL_DIR}/generated_config.cmake)
7 |
8 | # TODO: Move the rest of this into files in ephemeral. See
9 | # https://github.com/flutter/flutter/issues/57146.
10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
11 |
12 | # === Flutter Library ===
13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
14 |
15 | # Published to parent scope for install step.
16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
20 |
21 | list(APPEND FLUTTER_LIBRARY_HEADERS
22 | "flutter_export.h"
23 | "flutter_windows.h"
24 | "flutter_messenger.h"
25 | "flutter_plugin_registrar.h"
26 | "flutter_texture_registrar.h"
27 | )
28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
29 | add_library(flutter INTERFACE)
30 | target_include_directories(flutter INTERFACE
31 | "${EPHEMERAL_DIR}"
32 | )
33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
34 | add_dependencies(flutter flutter_assemble)
35 |
36 | # === Wrapper ===
37 | list(APPEND CPP_WRAPPER_SOURCES_CORE
38 | "core_implementations.cc"
39 | "standard_codec.cc"
40 | )
41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
43 | "plugin_registrar.cc"
44 | )
45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
46 | list(APPEND CPP_WRAPPER_SOURCES_APP
47 | "flutter_engine.cc"
48 | "flutter_view_controller.cc"
49 | )
50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
51 |
52 | # Wrapper sources needed for a plugin.
53 | add_library(flutter_wrapper_plugin STATIC
54 | ${CPP_WRAPPER_SOURCES_CORE}
55 | ${CPP_WRAPPER_SOURCES_PLUGIN}
56 | )
57 | apply_standard_settings(flutter_wrapper_plugin)
58 | set_target_properties(flutter_wrapper_plugin PROPERTIES
59 | POSITION_INDEPENDENT_CODE ON)
60 | set_target_properties(flutter_wrapper_plugin PROPERTIES
61 | CXX_VISIBILITY_PRESET hidden)
62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
63 | target_include_directories(flutter_wrapper_plugin PUBLIC
64 | "${WRAPPER_ROOT}/include"
65 | )
66 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
67 |
68 | # Wrapper sources needed for the runner.
69 | add_library(flutter_wrapper_app STATIC
70 | ${CPP_WRAPPER_SOURCES_CORE}
71 | ${CPP_WRAPPER_SOURCES_APP}
72 | )
73 | apply_standard_settings(flutter_wrapper_app)
74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
75 | target_include_directories(flutter_wrapper_app PUBLIC
76 | "${WRAPPER_ROOT}/include"
77 | )
78 | add_dependencies(flutter_wrapper_app flutter_assemble)
79 |
80 | # === Flutter tool backend ===
81 | # _phony_ is a non-existent file to force this command to run every time,
82 | # since currently there's no way to get a full input/output list from the
83 | # flutter tool.
84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
86 | add_custom_command(
87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
89 | ${CPP_WRAPPER_SOURCES_APP}
90 | ${PHONY_OUTPUT}
91 | COMMAND ${CMAKE_COMMAND} -E env
92 | ${FLUTTER_TOOL_ENVIRONMENT}
93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
94 | windows-x64 $
95 | VERBATIM
96 | )
97 | add_custom_target(flutter_assemble DEPENDS
98 | "${FLUTTER_LIBRARY}"
99 | ${FLUTTER_LIBRARY_HEADERS}
100 | ${CPP_WRAPPER_SOURCES_CORE}
101 | ${CPP_WRAPPER_SOURCES_PLUGIN}
102 | ${CPP_WRAPPER_SOURCES_APP}
103 | )
104 |
--------------------------------------------------------------------------------
/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 | set(PLUGIN_BUNDLED_LIBRARIES)
9 |
10 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
11 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
12 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
13 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
15 | endforeach(plugin)
16 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.15)
2 | project(runner LANGUAGES CXX)
3 |
4 | add_executable(${BINARY_NAME} WIN32
5 | "flutter_window.cpp"
6 | "main.cpp"
7 | "utils.cpp"
8 | "win32_window.cpp"
9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
10 | "Runner.rc"
11 | "runner.exe.manifest"
12 | )
13 | apply_standard_settings(${BINARY_NAME})
14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
17 | add_dependencies(${BINARY_NAME} flutter_assemble)
18 |
--------------------------------------------------------------------------------
/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", "A new Flutter project." "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "example" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2021 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/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/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 | if (target_length == 0) {
52 | return std::string();
53 | }
54 | std::string utf8_string;
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 |
--------------------------------------------------------------------------------
/example/winuwp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.8)
2 | set(CMAKE_SYSTEM_NAME WindowsStore)
3 | set(CMAKE_SYSTEM_VERSION 10.0)
4 | set(CMAKE_CXX_STANDARD 17)
5 | set(CMAKE_CXX_STANDARD_REQUIRED YES)
6 |
7 | project(runner LANGUAGES CXX)
8 |
9 | cmake_policy(SET CMP0079 NEW)
10 |
11 | set(BINARY_NAME "app")
12 |
13 | # Configure build options.
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 |
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 | function(APPLY_STANDARD_SETTINGS TARGET)
37 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
38 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100" /await)
39 | target_compile_options(${TARGET} PRIVATE /EHsc)
40 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
41 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
42 | target_compile_definitions(${TARGET} PRIVATE WINUWP)
43 | set_target_properties(${TARGET} PROPERTIES VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION 10.0.18362.0)
44 | endfunction()
45 |
46 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
47 |
48 | # Flutter library and tool build rules.
49 | add_subdirectory(${FLUTTER_MANAGED_DIR})
50 |
51 | # Application build
52 | add_subdirectory("runner_uwp")
53 |
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 |
--------------------------------------------------------------------------------
/example/winuwp/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.8)
2 | set(CMAKE_SYSTEM_NAME WindowsStore)
3 | set(CMAKE_SYSTEM_VERSION 10.0)
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | include(CMakePrintHelpers)
7 |
8 | # Configuration provided via flutter tool.
9 | include(${EPHEMERAL_DIR}/generated_config.cmake)
10 |
11 | # TODO: Move the rest of this into files in ephemeral. See
12 | # https://github.com/flutter/flutter/issues/57146.
13 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
14 |
15 | # === Flutter Library ===
16 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows_winuwp.dll")
17 |
18 | # === Assets ===
19 | set(CMAKE_INSTALL_MANIFEST "${EPHEMERAL_DIR}/install_manifest")
20 | file(STRINGS ${CMAKE_INSTALL_MANIFEST} INSTALL_MANIFEST_CONTENT)
21 |
22 | # Published to parent scope for install step.
23 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
24 | set(INSTALL_MANIFEST_CONTENT ${INSTALL_MANIFEST_CONTENT} PARENT_SCOPE)
25 |
26 | list(APPEND FLUTTER_LIBRARY_HEADERS
27 | "flutter_export.h"
28 | "flutter_windows.h"
29 | "flutter_messenger.h"
30 | "flutter_plugin_registrar.h"
31 | "flutter_texture_registrar.h"
32 | )
33 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
34 | add_library(flutter INTERFACE)
35 | target_include_directories(flutter INTERFACE
36 | "${EPHEMERAL_DIR}"
37 | )
38 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
39 | add_dependencies(flutter flutter_assemble)
40 |
41 | # === Wrapper ===
42 | list(APPEND CPP_WRAPPER_SOURCES_CORE
43 | "core_implementations.cc"
44 | "standard_codec.cc"
45 | )
46 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
47 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
48 | "plugin_registrar.cc"
49 | )
50 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
51 | list(APPEND CPP_WRAPPER_SOURCES_APP
52 | "flutter_engine.cc"
53 | "flutter_view_controller.cc"
54 | )
55 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
56 |
57 | # Wrapper sources needed for a plugin.
58 | add_library(flutter_wrapper_plugin STATIC
59 | ${CPP_WRAPPER_SOURCES_CORE}
60 | ${CPP_WRAPPER_SOURCES_PLUGIN}
61 | )
62 | apply_standard_settings(flutter_wrapper_plugin)
63 | set_target_properties(flutter_wrapper_plugin PROPERTIES
64 | POSITION_INDEPENDENT_CODE ON)
65 | set_target_properties(flutter_wrapper_plugin PROPERTIES
66 | CXX_VISIBILITY_PRESET hidden)
67 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
68 | target_include_directories(flutter_wrapper_plugin PUBLIC
69 | "${WRAPPER_ROOT}/include"
70 | )
71 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
72 |
73 | # Wrapper sources needed for the runner.
74 | add_library(flutter_wrapper_app STATIC
75 | ${CPP_WRAPPER_SOURCES_CORE}
76 | ${CPP_WRAPPER_SOURCES_APP}
77 | )
78 | apply_standard_settings(flutter_wrapper_app)
79 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
80 | target_include_directories(flutter_wrapper_app PUBLIC
81 | "${WRAPPER_ROOT}/include"
82 | )
83 | add_dependencies(flutter_wrapper_app flutter_assemble)
84 |
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | ${CPP_WRAPPER_SOURCES_CORE}
89 | ${CPP_WRAPPER_SOURCES_PLUGIN}
90 | ${CPP_WRAPPER_SOURCES_APP}
91 | )
92 |
--------------------------------------------------------------------------------
/example/winuwp/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/winuwp/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/winuwp/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | set(PLUGIN_BUNDLED_LIBRARIES)
9 |
10 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
11 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
12 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
13 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
15 | endforeach(plugin)
16 |
--------------------------------------------------------------------------------
/example/winuwp/project_version:
--------------------------------------------------------------------------------
1 | 0
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LargeTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LargeTile.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LargeTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LargeTile.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SmallTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SmallTile.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SmallTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SmallTile.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-24.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-32.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/WideTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/WideTile.scale-100.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/WideTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/WideTile.scale-125.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/WideTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/WideTile.scale-150.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/WideTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/WideTile.scale-200.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Assets/WideTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Assets/WideTile.scale-400.png
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 3.8)
2 | set(CMAKE_SYSTEM_NAME WindowsStore)
3 | set(CMAKE_SYSTEM_VERSION 10.0)
4 | set(CMAKE_CXX_STANDARD 17)
5 | set(CMAKE_CXX_STANDARD_REQUIRED YES)
6 |
7 | include(CMakePrintHelpers)
8 |
9 | project (runner LANGUAGES CXX)
10 |
11 | # UWP tile and icon assets.
12 | set(ASSET_FILES ${ASSET_FILES}
13 | Assets/LargeTile.scale-100.png
14 | Assets/LargeTile.scale-125.png
15 | Assets/LargeTile.scale-150.png
16 | Assets/LargeTile.scale-200.png
17 | Assets/LargeTile.scale-400.png
18 | Assets/LockScreenLogo.scale-200.png
19 | Assets/SmallTile.scale-100.png
20 | Assets/SmallTile.scale-125.png
21 | Assets/SmallTile.scale-150.png
22 | Assets/SmallTile.scale-200.png
23 | Assets/SmallTile.scale-400.png
24 | Assets/SplashScreen.scale-100.png
25 | Assets/SplashScreen.scale-125.png
26 | Assets/SplashScreen.scale-150.png
27 | Assets/SplashScreen.scale-200.png
28 | Assets/SplashScreen.scale-400.png
29 | Assets/Square44x44Logo.altform-unplated_targetsize-16.png
30 | Assets/Square44x44Logo.altform-unplated_targetsize-32.png
31 | Assets/Square44x44Logo.altform-unplated_targetsize-48.png
32 | Assets/Square44x44Logo.altform-unplated_targetsize-256.png
33 | Assets/Square44x44Logo.scale-100.png
34 | Assets/Square44x44Logo.scale-125.png
35 | Assets/Square44x44Logo.scale-150.png
36 | Assets/Square44x44Logo.scale-200.png
37 | Assets/Square44x44Logo.scale-400.png
38 | Assets/Square44x44Logo.targetsize-16.png
39 | Assets/Square44x44Logo.targetsize-24.png
40 | Assets/Square44x44Logo.targetsize-24_altform-unplated.png
41 | Assets/Square44x44Logo.targetsize-32.png
42 | Assets/Square44x44Logo.targetsize-48.png
43 | Assets/Square44x44Logo.targetsize-256.png
44 | Assets/Square150x150Logo.scale-100.png
45 | Assets/Square150x150Logo.scale-125.png
46 | Assets/Square150x150Logo.scale-150.png
47 | Assets/Square150x150Logo.scale-200.png
48 | Assets/Square150x150Logo.scale-400.png
49 | Assets/StoreLogo.png
50 | Assets/StoreLogo.scale-100.png
51 | Assets/StoreLogo.scale-125.png
52 | Assets/StoreLogo.scale-150.png
53 | Assets/StoreLogo.scale-200.png
54 | Assets/StoreLogo.scale-400.png
55 | Assets/Wide310x150Logo.scale-200.png
56 | Assets/WideTile.scale-100.png
57 | Assets/WideTile.scale-125.png
58 | Assets/WideTile.scale-150.png
59 | Assets/WideTile.scale-200.png
60 | Assets/WideTile.scale-400.png
61 | )
62 |
63 | # Configure package manifest file.
64 | set(APP_MANIFEST_NAME Package.appxmanifest)
65 | set(APP_MANIFEST_TARGET_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${APP_MANIFEST_NAME})
66 | set(SHORT_NAME ${BINARY_NAME})
67 | set(PACKAGE_GUID "0002B88A-DAA4-4EF6-A26A-5CF8A09593B3")
68 |
69 | configure_file(
70 | appxmanifest.in
71 | ${APP_MANIFEST_TARGET_LOCATION}
72 | @ONLY)
73 |
74 | set(CONTENT_FILES ${APP_MANIFEST_TARGET_LOCATION})
75 |
76 | # Configure package content files.
77 | set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
78 |
79 | set(RESOURCE_FILES ${ASSET_FILES} ${CONTENT_FILES} Windows_TemporaryKey.pfx)
80 | set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1)
81 | set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
82 |
83 | set(STRING_FILES Resources.pri)
84 | set_property(SOURCE ${STRING_FILES} PROPERTY VS_TOOL_OVERRIDE "PRIResource")
85 |
86 | source_group("Resource Files" FILES ${RESOURCE_FILES} ${CONTENT_FILES} ${STRING_FILES})
87 |
88 | # Configure Flutter assets using tool generated install manifest
89 | foreach(ITEM ${INSTALL_MANIFEST_CONTENT})
90 | get_filename_component(ITEM_REL ${CMAKE_BINARY_DIR} DIRECTORY)
91 | file(RELATIVE_PATH RELPATH ${ITEM_REL} ${ITEM})
92 |
93 | get_filename_component(RELPATH ${RELPATH} DIRECTORY)
94 | get_filename_component(ITEMEXT ${ITEM} LAST_EXT)
95 |
96 | if("${ITEMEXT}" STREQUAL ".dll" OR "${ITEMEXT}" STREQUAL ".pdb")
97 | string(CONCAT RELPATH "")
98 | elseif ("${ITEMEXT}" STREQUAL ".so")
99 | file(RELATIVE_PATH RELPATH "${ITEM_REL}/winuwp" ${ITEM})
100 | string(REGEX REPLACE "/" "\\\\" RELPATH ${RELPATH})
101 | string(CONCAT RELPATH "Assets\\Data")
102 | elseif("${ITEMEXT}" STREQUAL ".dat")
103 | string(CONCAT RELPATH "Assets\\Data")
104 | else()
105 | string(REGEX REPLACE "/" "\\\\" RELPATH ${RELPATH})
106 | string(CONCAT RELPATH "Assets\\Data\\" ${RELPATH})
107 | endif()
108 |
109 | cmake_print_variables(${RELPATH})
110 |
111 | set_property(SOURCE ${ITEM} PROPERTY VS_DEPLOYMENT_CONTENT 1)
112 | set_property(SOURCE ${ITEM} PROPERTY VS_DEPLOYMENT_LOCATION ${RELPATH})
113 | endforeach()
114 |
115 | add_executable (${BINARY_NAME} WIN32
116 | main.cpp
117 | flutter_frameworkview.cpp
118 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
119 | ${RESOURCE_FILES}
120 | ${INSTALL_MANIFEST_CONTENT}
121 | )
122 | apply_standard_settings(${BINARY_NAME})
123 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
124 | target_link_libraries(${BINARY_NAME} PRIVATE WindowsApp flutter flutter_wrapper_app)
125 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
126 |
127 | add_dependencies(${BINARY_NAME} flutter_assemble)
128 |
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/CMakeSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
3 | "configurations": [
4 | {
5 | "name": "Debug",
6 | "generator": "Visual Studio 15 2017 Win64",
7 | "configurationType": "Debug",
8 | "inheritEnvironments": [ "msvc_x64_x64" ],
9 | "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
10 | "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
11 | "cmakeCommandArgs": "",
12 | "buildCommandArgs": "",
13 | "ctestCommandArgs": ""
14 | },
15 | {
16 | "name": "Release",
17 | "generator": "Visual Studio 15 2017 Win64",
18 | "configurationType": "Release",
19 | "inheritEnvironments": [ "msvc_x64_x64" ],
20 | "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
21 | "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
22 | "cmakeCommandArgs": "",
23 | "buildCommandArgs": "",
24 | "ctestCommandArgs": ""
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/Windows_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/Windows_TemporaryKey.pfx
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/appxmanifest.in:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 | @SHORT_NAME@
13 | CMake Test Cert
14 | Assets/StoreLogo.png
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/flutter_frameworkview.cpp:
--------------------------------------------------------------------------------
1 | #include "winrt/Windows.ApplicationModel.Core.h"
2 | #include "winrt/Windows.Foundation.h"
3 | #include "winrt/Windows.System.Profile.h"
4 | #include "winrt/Windows.System.Threading.h"
5 | #include "winrt/Windows.UI.Core.h"
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #include
14 | #include
15 | #include
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | struct FlutterFrameworkView
23 | : winrt::implements<
24 | FlutterFrameworkView,
25 | winrt::Windows::ApplicationModel::Core::IFrameworkView> {
26 | // |winrt::Windows::ApplicationModel::Core::IFrameworkView|
27 | void
28 | Initialize(winrt::Windows::ApplicationModel::Core::CoreApplicationView const
29 | &applicationView) {
30 |
31 | // Layout scaling must be disabled in the appinitialization phase in order
32 | // to take effect correctly.
33 | if (winrt::Windows::System::Profile::AnalyticsInfo::VersionInfo()
34 | .DeviceFamily() == L"Windows.Xbox") {
35 |
36 | bool result = winrt::Windows::UI::ViewManagement::ApplicationViewScaling::
37 | TrySetDisableLayoutScaling(true);
38 | if (!result) {
39 | OutputDebugString(L"Couldn't disable layout scaling");
40 | }
41 | }
42 |
43 | main_view_ = applicationView;
44 | main_view_.Activated({this, &FlutterFrameworkView::OnActivated});
45 | }
46 |
47 | // |winrt::Windows::ApplicationModel::Core::IFrameworkView|
48 | void Uninitialize() {
49 | main_view_.Activated(nullptr);
50 | main_view_ = nullptr;
51 | }
52 |
53 | // |winrt::Windows::ApplicationModel::Core::IFrameworkView|
54 | void Load(winrt::hstring const &) {}
55 |
56 | // |winrt::Windows::ApplicationModel::Core::IFrameworkView|
57 | void Run() {
58 | winrt::Windows::UI::Core::CoreWindow window =
59 | winrt::Windows::UI::Core::CoreWindow::GetForCurrentThread();
60 |
61 | winrt::Windows::UI::Core::CoreDispatcher dispatcher = window.Dispatcher();
62 | dispatcher.ProcessEvents(
63 | winrt::Windows::UI::Core::CoreProcessEventsOption::ProcessUntilQuit);
64 | }
65 |
66 | // |winrt::Windows::ApplicationModel::Core::IFrameworkView|
67 | winrt::Windows::Foundation::IAsyncAction
68 | SetWindow(winrt::Windows::UI::Core::CoreWindow const &window) {
69 |
70 | // Capture reference to window.
71 | window_ = window;
72 |
73 | // Lay out the window's content within the region occupied by the
74 | // CoreWindow.
75 | auto appView = winrt::Windows::UI::ViewManagement::ApplicationView::
76 | GetForCurrentView();
77 |
78 | appView.SetDesiredBoundsMode(winrt::Windows::UI::ViewManagement::
79 | ApplicationViewBoundsMode::UseCoreWindow);
80 |
81 | // Configure folder paths.
82 | try {
83 | winrt::Windows::Storage::StorageFolder folder =
84 | winrt::Windows::ApplicationModel::Package::Current()
85 | .InstalledLocation();
86 |
87 | winrt::Windows::Storage::StorageFolder assets =
88 | co_await folder.GetFolderAsync(L"Assets");
89 | winrt::Windows::Storage::StorageFolder data =
90 | co_await assets.GetFolderAsync(L"data");
91 | winrt::Windows::Storage::StorageFolder flutter_assets =
92 | co_await data.GetFolderAsync(L"flutter_assets");
93 | winrt::Windows::Storage::StorageFile icu_data =
94 | co_await data.GetFileAsync(L"icudtl.dat");
95 |
96 | #if NDEBUG
97 | winrt::Windows::Storage::StorageFile aot_data =
98 | co_await data.GetFileAsync(L"app.so");
99 | #endif
100 |
101 | std::wstring flutter_assets_path{flutter_assets.Path()};
102 | std::wstring icu_data_path{icu_data.Path()};
103 | std::wstring aot_data_path {
104 | #if NDEBUG
105 | aot_data.Path()
106 | #endif
107 | };
108 |
109 | flutter::DartProject project(flutter_assets_path, icu_data_path,
110 | aot_data_path);
111 |
112 | // Construct viewcontroller using the Window and project
113 | flutter_view_controller_ = std::make_unique(
114 | static_cast(winrt::get_abi(main_view_)),
115 | static_cast(winrt::get_abi(launch_args_)),
116 | project);
117 |
118 | // If plugins present, register them.
119 | RegisterPlugins(flutter_view_controller_.get()->engine());
120 | } catch (winrt::hresult_error &err) {
121 | winrt::Windows::UI::Popups::MessageDialog md =
122 | winrt::Windows::UI::Popups::MessageDialog::MessageDialog(
123 | L"There was a problem starting the engine: " + err.message());
124 | md.ShowAsync();
125 | }
126 | }
127 |
128 | void OnActivated(
129 | winrt::Windows::ApplicationModel::Core::CoreApplicationView const
130 | &applicationView,
131 | winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs const
132 | &args) {
133 | // Activate the application window, making it visible and enabling it to
134 | // receive events.
135 | applicationView.CoreWindow().Activate();
136 |
137 | // Capture launch args to later pass to Flutter.
138 | launch_args_ = args;
139 | }
140 |
141 | // Current CoreApplicationView.
142 | winrt::Windows::ApplicationModel::Core::CoreApplicationView main_view_{
143 | nullptr};
144 |
145 | // Current CoreWindow.
146 | winrt::Windows::UI::Core::CoreWindow window_{nullptr};
147 |
148 | // Current FlutterViewController.
149 | std::unique_ptr flutter_view_controller_{
150 | nullptr};
151 |
152 | // Launch args that were passed in on activation.
153 | winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs
154 | launch_args_;
155 | };
156 |
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/main.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 |
4 | #include "winrt/Windows.ApplicationModel.Core.h"
5 | #include "winrt/Windows.Foundation.h"
6 | #include
7 | #include
8 | #include
9 |
10 | #include
11 |
12 | #include "flutter_frameworkview.cpp"
13 |
14 | struct App
15 | : winrt::implements<
16 | App, winrt::Windows::ApplicationModel::Core::IFrameworkViewSource> {
17 | App() { view_ = winrt::make_self(); }
18 |
19 | // |winrt::Windows::ApplicationModel::Core::IFrameworkViewSource|
20 | winrt::Windows::ApplicationModel::Core::IFrameworkView CreateView() {
21 | return view_.as();
22 | }
23 |
24 | winrt::com_ptr view_;
25 | };
26 |
27 | int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) {
28 | winrt::Windows::ApplicationModel::Core::CoreApplication::Run(
29 | winrt::make());
30 | }
31 |
--------------------------------------------------------------------------------
/example/winuwp/runner_uwp/resources.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aagarwal1012/IntroViews-Flutter/d257e0ad559534c8b60205962aaff028cd81845f/example/winuwp/runner_uwp/resources.pri
--------------------------------------------------------------------------------
/intro_views_flutter.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/lib/intro_views_flutter.dart:
--------------------------------------------------------------------------------
1 | library intro_views_flutter;
2 |
3 | export 'src/models/page_view_model.dart';
4 | export 'src/ui/intro_views_flutter.dart';
5 |
--------------------------------------------------------------------------------
/lib/src/animation_gesture/animated_page_dragger.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:ui';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:intro_views_flutter/src/helpers/constants.dart';
6 | import 'package:intro_views_flutter/src/models/slide_update_model.dart';
7 |
8 | /// This class provides the animation controller
9 | /// used when then user stops dragging and page
10 | /// reveal is not completed.
11 | class AnimatedPageDragger {
12 | AnimatedPageDragger({
13 | required this.slideDirection,
14 | required this.transitionGoal,
15 | required double slidePercent,
16 | required StreamController slideUpdateStream,
17 | required TickerProvider vsync,
18 | }) {
19 | final startSlidePercent = slidePercent;
20 | double endSlidePercent;
21 | Duration duration;
22 |
23 | // We have to complete the page reveal
24 | if (transitionGoal == TransitionGoal.open) {
25 | endSlidePercent = 1.0;
26 |
27 | final slideRemaining = 1.0 - slidePercent;
28 | // Standard value take for drag velocity to avoid complex calculations.
29 | duration = Duration(
30 | milliseconds: (slideRemaining / PERCENT_PER_MILLISECOND).round());
31 | }
32 | // We have to close the page reveal
33 | else {
34 | endSlidePercent = 0.0;
35 |
36 | duration = Duration(
37 | milliseconds: (slidePercent / PERCENT_PER_MILLISECOND).round());
38 | }
39 |
40 | // Adding listener to animation controller
41 | // Also value to animation controller vary from 0.0 to 1.0 according to duration.
42 | completionAnimationController = AnimationController(
43 | duration: duration, vsync: vsync)
44 | ..addListener(() {
45 | final slidePercent = lerpDouble(startSlidePercent, endSlidePercent,
46 | completionAnimationController.value) ??
47 | 0.0;
48 |
49 | // Adding to slide update stream
50 | slideUpdateStream.add(
51 | SlideUpdate(slideDirection, slidePercent, UpdateType.animating));
52 | })
53 | ..addStatusListener((AnimationStatus status) {
54 | // When animation has done executing
55 | if (status == AnimationStatus.completed) {
56 | // Adding to slide update stream
57 | slideUpdateStream.add(SlideUpdate(
58 | slideDirection, slidePercent, UpdateType.doneAnimating));
59 | }
60 | });
61 | }
62 |
63 | final SlideDirection slideDirection;
64 |
65 | /// This variable tells that whether we have to open or close the page reveal.
66 | final TransitionGoal transitionGoal;
67 |
68 | /// Animation controller.
69 | late AnimationController completionAnimationController;
70 |
71 | /// This method is used to run animation controller.
72 | void run() {
73 | completionAnimationController.forward(from: 0.0);
74 | }
75 |
76 | /// This method is used to dispose animation controller.
77 | void dispose() {
78 | completionAnimationController.dispose();
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/src/animation_gesture/page_dragger.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:intro_views_flutter/src/helpers/constants.dart';
5 | import 'package:intro_views_flutter/src/models/slide_update_model.dart';
6 |
7 | /// This class is used to get user gesture and work according to it.
8 | class PageDragger extends StatefulWidget {
9 | const PageDragger({
10 | Key? key,
11 | required this.canDragLeftToRight,
12 | required this.canDragRightToLeft,
13 | required this.slideUpdateStream,
14 | this.fullTransitionPX = FULL_TRANSITION_PX,
15 | }) : super(key: key);
16 |
17 | // These bool variables are used to check whether user can
18 | // drag left or right or none.
19 | final bool canDragLeftToRight;
20 | final bool canDragRightToLeft;
21 | final double fullTransitionPX;
22 |
23 | /// Stream controller
24 | final StreamController slideUpdateStream;
25 |
26 | @override
27 | _PageDraggerState createState() => _PageDraggerState();
28 | }
29 |
30 | class _PageDraggerState extends State {
31 | Offset? dragStart;
32 | late SlideDirection slideDirection;
33 | double slidePercent = 0.0;
34 |
35 | /// This methods executes when user starts dragging.
36 | void onDragStart(DragStartDetails details) {
37 | dragStart = details.globalPosition;
38 | }
39 |
40 | /// This methods executes while user is dragging.
41 | void onDragUpdate(DragUpdateDetails details) {
42 | if (dragStart != null) {
43 | // getting new position details
44 | final newPosition = details.globalPosition;
45 | // change in position in x
46 | final dx = dragStart!.dx - newPosition.dx;
47 |
48 | // predicting slide direction
49 | if (dx > 0.0 && widget.canDragRightToLeft) {
50 | slideDirection = SlideDirection.rightToLeft;
51 | } else if (dx < 0.0 && widget.canDragLeftToRight) {
52 | slideDirection = SlideDirection.leftToRight;
53 | } else {
54 | slideDirection = SlideDirection.none;
55 | }
56 |
57 | // predicting slide percent
58 | if (slideDirection != SlideDirection.none) {
59 | // clamp method is used to clamp the value of slidePercent from 0.0 to 1.0,
60 | // after 1.0 it set to 1.0
61 | slidePercent = (dx / widget.fullTransitionPX).abs().clamp(0.0, 1.0);
62 | } else {
63 | slidePercent = 0.0;
64 | }
65 |
66 | // adding to slideUpdateStream
67 | widget.slideUpdateStream.add(
68 | SlideUpdate(
69 | slideDirection,
70 | slidePercent,
71 | UpdateType.dragging,
72 | ),
73 | );
74 | }
75 | }
76 |
77 | /// This method executes when user ends dragging.
78 | void onDragEnd(DragEndDetails details) {
79 | // adding to slideUpdateStream
80 | widget.slideUpdateStream.add(
81 | SlideUpdate(
82 | SlideDirection.none,
83 | slidePercent,
84 | UpdateType.doneDragging,
85 | ),
86 | );
87 |
88 | // making dragStart to null for the reallocation
89 | dragStart = null;
90 | }
91 |
92 | @override
93 | Widget build(BuildContext context) {
94 | // gesture detector for horizontal drag
95 | return GestureDetector(
96 | onHorizontalDragStart: onDragStart,
97 | onHorizontalDragUpdate: onDragUpdate,
98 | onHorizontalDragEnd: onDragEnd,
99 | );
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/lib/src/animation_gesture/page_reveal.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:intro_views_flutter/src/clipper/circular_reveal_clipper.dart';
3 |
4 | /// This class reveals the next page in the circular form.
5 | class PageReveal extends StatelessWidget {
6 | const PageReveal({
7 | Key? key,
8 | required this.revealPercent,
9 | required this.child,
10 | }) : super(key: key);
11 |
12 | final double revealPercent;
13 | final Widget child;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | // ClipOval cuts the page to circular shape.
18 | return ClipOval(
19 | clipper: CircularRevealClipper(revealPercent: revealPercent),
20 | child: child,
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/clipper/circular_reveal_clipper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | /// Custom clipper for circular page reveal.
6 | class CircularRevealClipper extends CustomClipper {
7 | const CircularRevealClipper({
8 | required this.revealPercent,
9 | });
10 |
11 | final double revealPercent;
12 |
13 | @override
14 | Rect getClip(Size size) {
15 | // center of rectangle
16 | final center = Offset(size.width / 2, size.height * 0.9);
17 |
18 | // Calculate distance from center to the top left corner to make sure we fill the screen via simple trigonometry.
19 | final theta = atan(center.dy / center.dx);
20 | final distanceToCorner = center.dy / sin(theta);
21 |
22 | final radius = distanceToCorner * revealPercent;
23 | final diameter = 2 * radius;
24 |
25 | return Rect.fromLTWH(
26 | center.dx - radius,
27 | center.dy - radius,
28 | diameter,
29 | diameter,
30 | );
31 | }
32 |
33 | @override
34 | bool shouldReclip(CustomClipper oldClipper) => true;
35 | }
36 |
--------------------------------------------------------------------------------
/lib/src/helpers/constants.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: constant_identifier_names
2 | /// This package contains all the constants used.
3 |
4 | const BUBBLE_WIDTH = 55.0;
5 |
6 | const FULL_TRANSITION_PX = 300.0;
7 |
8 | const PERCENT_PER_MILLISECOND = 0.00125;
9 |
10 | enum SlideDirection {
11 | leftToRight,
12 | rightToLeft,
13 | none,
14 | }
15 |
16 | enum UpdateType {
17 | dragging,
18 | doneDragging,
19 | animating,
20 | doneAnimating,
21 | }
22 |
23 | enum TransitionGoal {
24 | open,
25 | close,
26 | }
27 |
--------------------------------------------------------------------------------
/lib/src/helpers/extensions.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 |
3 | extension BuildContextExt on BuildContext {
4 | double get screenWidth => MediaQuery.of(this).size.width;
5 | }
6 |
--------------------------------------------------------------------------------
/lib/src/models/page_bubble_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// View model for page bubble.
4 | class PageBubbleViewModel {
5 | const PageBubbleViewModel({
6 | this.bubbleInner,
7 | this.iconAssetPath,
8 | this.iconColor,
9 | required this.isHollow,
10 | required this.activePercent,
11 | this.bubbleBackgroundColor = const Color(0x88FFFFFF),
12 | });
13 |
14 | final String? iconAssetPath;
15 | final Color? iconColor;
16 | final bool isHollow;
17 | final double activePercent;
18 | final Color bubbleBackgroundColor;
19 | final Widget? bubbleInner;
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/models/page_button_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:intro_views_flutter/src/helpers/constants.dart';
2 |
3 | /// This is view model for the skip and done buttons.
4 | class PageButtonViewModel {
5 | const PageButtonViewModel({
6 | required this.slidePercent,
7 | required this.totalPages,
8 | required this.activePageIndex,
9 | required this.slideDirection,
10 | });
11 |
12 | final double slidePercent;
13 | final int totalPages;
14 | final int activePageIndex;
15 | final SlideDirection slideDirection;
16 | }
17 |
--------------------------------------------------------------------------------
/lib/src/models/page_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// View model for pages.
4 | class PageViewModel {
5 | const PageViewModel({
6 | this.pageColor,
7 | this.pageBackground = const SizedBox(),
8 | this.iconImageAssetPath,
9 | this.bubbleBackgroundColor = const Color(0x88FFFFFF),
10 | this.iconColor,
11 | this.title = const SizedBox(),
12 | this.body = const SizedBox(),
13 | this.mainImage = const SizedBox(),
14 | this.bubble,
15 | this.textStyle,
16 | this.titleTextStyle = const TextStyle(color: Colors.white, fontSize: 50.0),
17 | this.bodyTextStyle = const TextStyle(color: Colors.white, fontSize: 24.0),
18 | });
19 |
20 | /// Page background color.
21 | ///
22 | /// [pageColor] has priority over [pageBackground].
23 | final Color? pageColor;
24 |
25 | /// Widget shown in the background and can be used instead of [pageColor] or
26 | /// for the full customization of the page, e.g. having a gradient background
27 | /// or adding a background image.
28 | ///
29 | /// [pageColor] has priority over [pageBackground].
30 | final Widget pageBackground;
31 |
32 | /// Icon image path.
33 | final String? iconImageAssetPath;
34 |
35 | /// Icon color.
36 | final Color? iconColor;
37 |
38 | /// Color for background of progress bubbles.
39 | ///
40 | /// Defaults to light grey: `Color(0x88FFFFFF)`.
41 | final Color bubbleBackgroundColor;
42 |
43 | /// Widget for the title.
44 | ///
45 | /// _Typically a [Text] widget_.
46 | ///
47 | /// Omitted by default.
48 | final Widget title;
49 |
50 | /// Widget for the body.
51 | ///
52 | /// _Typically a [Text] widget_.
53 | ///
54 | /// Omitted by default.
55 | final Widget body;
56 |
57 | /// Sets TextStyle for [titleTextStyle] and [bodyTextStyle].
58 | ///
59 | /// [titleTextStyle] defaults to `TextStyle(color: Colors.white, fontSize: 50.0)`.
60 | ///
61 | /// [bodyTextStyle] defaults to `TextStyle(color: Colors.white, fontSize: 24.0)`.
62 | final TextStyle? textStyle;
63 |
64 | /// Set TextStyle for [title].
65 | ///
66 | /// Defaults to `TextStyle(color: Colors.white, fontSize: 50.0)`.
67 | final TextStyle titleTextStyle;
68 |
69 | /// Sets TextStyle for [body].
70 | ///
71 | /// Defaults to `TextStyle(color: Colors.white, fontSize: 24.0)`.
72 | final TextStyle bodyTextStyle;
73 |
74 | /// Main widget.
75 | ///
76 | /// _Typically an [Image] widget_.
77 | ///
78 | /// Omitted by default.
79 | final Widget mainImage;
80 |
81 | /// Inner bubble widget.
82 | ///
83 | /// _Typically an [Image] widget_.
84 | ///
85 | /// Gets overridden by [iconImageAssetPath].
86 | final Widget? bubble;
87 |
88 | TextStyle get mergedTitleTextStyle {
89 | return const TextStyle(color: Colors.white, fontSize: 50.0)
90 | .merge(textStyle)
91 | .merge(titleTextStyle);
92 | }
93 |
94 | TextStyle get mergedBodyTextStyle {
95 | return const TextStyle(color: Colors.white, fontSize: 24.0)
96 | .merge(textStyle)
97 | .merge(bodyTextStyle);
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/lib/src/models/pager_indicator_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:intro_views_flutter/src/helpers/constants.dart';
2 | import 'package:intro_views_flutter/src/models/page_view_model.dart';
3 |
4 | /// View model for page indicator.
5 | class PagerIndicatorViewModel {
6 | const PagerIndicatorViewModel(
7 | this.pages,
8 | this.activeIndex,
9 | this.slideDirection,
10 | this.slidePercent,
11 | );
12 |
13 | final List pages;
14 | final int activeIndex;
15 | final SlideDirection slideDirection;
16 | final double slidePercent;
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/models/slide_update_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:intro_views_flutter/src/helpers/constants.dart';
2 |
3 | /// Model for slide update.
4 | class SlideUpdate {
5 | const SlideUpdate(
6 | this.direction,
7 | this.slidePercent,
8 | this.updateType,
9 | );
10 |
11 | final UpdateType updateType;
12 | final SlideDirection direction;
13 | final double slidePercent;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/src/ui/page_bubble.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:intro_views_flutter/src/models/page_bubble_view_model.dart';
5 |
6 | /// This class contains the UI for page bubble.
7 | class PageBubble extends StatelessWidget {
8 | const PageBubble({
9 | Key? key,
10 | required this.viewModel,
11 | required this.width,
12 | }) : super(key: key);
13 |
14 | final PageBubbleViewModel viewModel;
15 | final double width;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return SizedBox(
20 | width: width,
21 | height: 65.0,
22 | child: Center(
23 | child: Padding(
24 | padding: const EdgeInsets.all(10.0),
25 | child: Container(
26 | // this method returns in between values according to active percent
27 | width: lerpDouble(20.0, 45.0, viewModel.activePercent),
28 | height: lerpDouble(20.0, 45.0, viewModel.activePercent),
29 | decoration: BoxDecoration(
30 | shape: BoxShape.circle,
31 | // alpha is used to create fade effect for background color
32 | color: viewModel.isHollow
33 | ? viewModel.bubbleBackgroundColor
34 | .withAlpha((0x88 * viewModel.activePercent).round())
35 | : viewModel.bubbleBackgroundColor,
36 | border: Border.all(
37 | color: viewModel.isHollow
38 | ? viewModel.bubbleBackgroundColor.withAlpha(
39 | (0x88 * (1 - viewModel.activePercent)).round())
40 | : Colors.transparent,
41 | width: 3.0,
42 | ),
43 | ),
44 | child: Opacity(
45 | opacity: viewModel.activePercent,
46 | child: (viewModel.iconAssetPath != null &&
47 | viewModel.iconAssetPath != '')
48 | ? Image.asset(
49 | viewModel.iconAssetPath!,
50 | color: viewModel.iconColor,
51 | )
52 | : viewModel.bubbleInner != null
53 | ? Transform.scale(
54 | scale: viewModel.activePercent.clamp(0.5, 1.0),
55 | child: viewModel.bubbleInner,
56 | )
57 | : const SizedBox(),
58 | ),
59 | ),
60 | ),
61 | ),
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/src/ui/pager_indicator.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:intro_views_flutter/src/helpers/constants.dart';
3 | import 'package:intro_views_flutter/src/helpers/extensions.dart';
4 | import 'package:intro_views_flutter/src/models/page_bubble_view_model.dart';
5 | import 'package:intro_views_flutter/src/models/pager_indicator_view_model.dart';
6 | import 'package:intro_views_flutter/src/ui/page_bubble.dart';
7 |
8 | /// This class contains the UI elements associated with bottom page indicator.
9 | class PagerIndicator extends StatelessWidget {
10 | const PagerIndicator({
11 | Key? key,
12 | required this.viewModel,
13 | }) : super(key: key);
14 |
15 | final PagerIndicatorViewModel viewModel;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | // extracting page bubble information from page view model
20 | final bubbles = [];
21 | final numOfPages = viewModel.pages.length;
22 |
23 | // calculates the width of the bubble to avoid the overflowing render issue #96
24 | final bubbleWidth = BUBBLE_WIDTH * numOfPages > context.screenWidth
25 | ? (context.screenWidth / numOfPages)
26 | : BUBBLE_WIDTH;
27 |
28 | for (var i = 0; i < numOfPages; i++) {
29 | final page = viewModel.pages[i];
30 |
31 | // calculating percent active
32 | double percentActive;
33 | if (i == viewModel.activeIndex) {
34 | percentActive = 1.0 - viewModel.slidePercent;
35 | } else if (i == viewModel.activeIndex - 1 &&
36 | viewModel.slideDirection == SlideDirection.leftToRight) {
37 | percentActive = viewModel.slidePercent;
38 | } else if (i == viewModel.activeIndex + 1 &&
39 | viewModel.slideDirection == SlideDirection.rightToLeft) {
40 | percentActive = viewModel.slidePercent;
41 | } else {
42 | percentActive = 0.0;
43 | }
44 |
45 | // checking is that bubble hollow
46 | final isHollow = i > viewModel.activeIndex ||
47 | (i == viewModel.activeIndex &&
48 | viewModel.slideDirection == SlideDirection.leftToRight);
49 |
50 | // adding to the list
51 | bubbles.add(PageBubble(
52 | width: bubbleWidth,
53 | viewModel: PageBubbleViewModel(
54 | iconAssetPath: page.iconImageAssetPath,
55 | iconColor: page.iconColor,
56 | isHollow: isHollow,
57 | activePercent: percentActive,
58 | bubbleBackgroundColor: page.bubbleBackgroundColor,
59 | bubbleInner: page.bubble,
60 | ),
61 | ));
62 | }
63 |
64 | // calculating the translation value of pager indicator while sliding
65 | final baseTranslation =
66 | ((viewModel.pages.length * BUBBLE_WIDTH) / 2) - (BUBBLE_WIDTH / 2);
67 | var translation = baseTranslation - (viewModel.activeIndex * BUBBLE_WIDTH);
68 |
69 | if (viewModel.slideDirection == SlideDirection.leftToRight) {
70 | translation += BUBBLE_WIDTH * viewModel.slidePercent;
71 | } else if (viewModel.slideDirection == SlideDirection.rightToLeft) {
72 | translation -= BUBBLE_WIDTH * viewModel.slidePercent;
73 | }
74 | // UI
75 | return Column(
76 | children: [
77 | const Expanded(child: SizedBox()),
78 | Row(
79 | mainAxisAlignment: MainAxisAlignment.center,
80 | children: [
81 | Transform(
82 | // used for horizontal transformation
83 | transform: Matrix4.translationValues(translation, 0.0, 0.0),
84 | child: Row(
85 | mainAxisAlignment: MainAxisAlignment.center,
86 | children: bubbles,
87 | ),
88 | ),
89 | ],
90 | ),
91 | ],
92 | );
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: intro_views_flutter
2 | description: A Flutter package for simple material design app intro screens with some cool animations.
3 | version: 3.2.0
4 | homepage: https://github.com/aagarwal1012/IntroViews-Flutter
5 |
6 | environment:
7 | sdk: ">=2.12.0 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 | flutter_lints: ^1.0.3
17 |
--------------------------------------------------------------------------------