├── .flutter-plugins
├── .flutter-plugins-dependencies
├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── libraries
│ ├── Dart_Packages.xml
│ ├── Dart_SDK.xml
│ └── Flutter_Plugins.xml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── doc
└── screenshots
│ ├── changelog.png
│ └── changes.png
├── docs
├── assets
│ ├── AssetManifest.json
│ ├── CHANGELOG.md
│ ├── FontManifest.json
│ ├── LICENSE
│ ├── fonts
│ │ └── MaterialIcons-Regular.ttf
│ └── packages
│ │ └── cupertino_icons
│ │ └── assets
│ │ └── CupertinoIcons.ttf
├── favicon.png
├── flutter_service_worker.js
├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
├── index.html
├── main.dart.js
├── main.dart.js.map
└── manifest.json
├── example
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── README.md
├── analysis_options.yaml
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── web
│ ├── favicon.png
│ ├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
├── flutter_whatsnew.iml
├── lib
├── flutter_whatsnew.dart
└── src
│ ├── base.dart
│ ├── changelog.dart
│ └── scheduled.dart
├── pubspec.lock
└── pubspec.yaml
/.flutter-plugins:
--------------------------------------------------------------------------------
1 | # This is a generated file; do not edit or check into version control.
2 | path_provider_linux=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/
3 | path_provider_windows=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/
4 | shared_preferences=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences-2.0.15/
5 | shared_preferences_android=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_android-2.0.13/
6 | shared_preferences_ios=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/
7 | shared_preferences_linux=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-2.1.1/
8 | shared_preferences_macos=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-2.0.4/
9 | shared_preferences_web=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-2.0.4/
10 | shared_preferences_windows=/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.1.1/
11 |
--------------------------------------------------------------------------------
/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_android-2.0.13/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-2.0.4/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-2.1.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.1.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-2.0.4/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-31 19:15:52.915634","version":"3.4.0-30.0.pre.12"}
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: github pages
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | deploy:
10 | runs-on: ubuntu-18.04
11 | steps:
12 | - uses: actions/checkout@v2
13 |
14 | - name: Setup Flutter
15 | uses: subosito/flutter-action@v1
16 | with:
17 | channel: 'dev'
18 |
19 | - name: Install
20 | run: |
21 | flutter config --enable-web
22 | flutter pub get
23 | - name: Build
24 | run: cd example && flutter build web
25 |
26 | - name: Deploy
27 | uses: peaceiris/actions-gh-pages@v3
28 | with:
29 | # github_token: ${{ secrets.GITHUB_TOKEN }}
30 | # personal_token: ${{ secrets.PERSONAL_TOKEN }}
31 | deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
32 | publish_dir: ./example/build/web
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 | ios/.generated/
9 | ios/Flutter/Generated.xcconfig
10 | ios/Runner/GeneratedPluginRegistrant.*
11 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_Packages.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
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 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 | 1531243825786
312 |
313 |
314 | 1531243825786
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.0.5
2 |
3 | * Adding adaptive option
4 | * Updating example
5 | * Adding delay option
6 |
7 | ## 1.0.4
8 |
9 | * Null safety
10 | * Updating styles
11 | * Adding ScheduledWhatsNewPage with delay or app version check
12 | * Making more methods optional
13 | * Web compatible
14 |
15 | ## 1.0.3
16 |
17 | * Adding Web Support
18 |
19 | ## 1.0.2
20 |
21 | * Adding Path Option
22 | * Removing Native Widgets
23 |
24 | ## 1.0.1
25 |
26 | * Bumping Version
27 |
28 | ## 1.0.0
29 |
30 | * Addign Cupertino UI
31 |
32 | ## 0.3.0 - 04.06.2019
33 |
34 | * Making Example Desktop Aware
35 |
36 | ## 0.2.1 - 04.05.2019
37 |
38 | * `tb2761` Added Button Colors
39 |
40 | ## [0.2.0] - Breaking Changes
41 |
42 | * Updated Example
43 | * Added Ability to Read from Changelog
44 | * Removed Method WhatsNewPage.show()
45 | * Adding `flutter_markdown`
46 |
47 | ## [0.1.0] - Breaking Change
48 |
49 | * Updated Example
50 | * Removed `get_version`
51 | * Plugin is now pure dart
52 | * Added Method WhatsNewPage.show()
53 |
54 | ## [0.0.7] - New Button Action
55 |
56 | * Updated Example
57 |
58 | ## [0.0.6] - New Button Action
59 |
60 | * Added Optional Callback for Button Press.
61 | * By Defualt it will Push to the Passed Widget.
62 | * Updating Dart Dependency
63 |
64 | ## [0.0.5] - Updating for Flutter
65 |
66 | * Increased button width on android.
67 | * Updated native_widgets 0.1.0
68 |
69 | ## [0.0.4] - Bug Fixes
70 |
71 | * Fixed Loading Bug.
72 |
73 | ## [0.0.3] - Bug Fixes
74 |
75 | * Updating Startup Behavior.
76 |
77 | ## [0.0.2] - Bug Fixes
78 |
79 | * Updating Startup Behavior.
80 |
81 | ## [0.0.1] - Whats New Widget
82 |
83 | * Added Components, Version Check and Example.
84 | * Added `native_widgets`
85 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Rhodes Davis Jr.
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/fluttercommunity/community)
2 |
3 | [](https://www.buymeacoffee.com/rodydavis)
4 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WSH3GVC49GNNJ)
5 | 
6 |
7 | # flutter_whatsnew
8 |
9 | [](https://pub.dartlang.org/packages/flutter_whatsnew)
10 |
11 | A Flutter Plugin to Show a Whats New page.
12 |
13 | Online Demo: https://fluttercommunity.github.io/flutter_whatsnew/
14 |
15 | ## Usage
16 |
17 | To use this plugin, add `flutter_whatsnew` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).
18 |
19 | ``` dart
20 | // Import package
21 | import 'package:flutter_whatsnew/flutter_whatsnew.dart';
22 | ```
23 |
24 | 
25 |
26 | If using `WhatsNewPage.changelog` and you want it to pickup the `CHANGELOG.md' add it to the Flutter asset directory, otherwise manually pass in the .md file with the changes. This uses the full markdown previewer.
27 |
28 | ``` yaml
29 | assets:
30 | - CHANGELOG.md
31 | ```
32 |
33 | 
34 |
35 | ## Example
36 |
37 | ``` dart
38 | import 'package:flutter/material.dart';
39 | import 'package:flutter/cupertino.dart';
40 | import 'package:flutter_whatsnew/flutter_whatsnew.dart';
41 |
42 | void main() {
43 | runApp(MaterialApp(home: ShowWhatsNew()));
44 | }
45 |
46 | class ShowWhatsNew extends StatelessWidget {
47 | final double textScaleFactor = 1.0;
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | return new Scaffold(
52 | body: SafeArea(
53 | child: Center(
54 | child: Column(
55 | mainAxisAlignment: MainAxisAlignment.center,
56 | crossAxisAlignment: CrossAxisAlignment.center,
57 | children: [
58 | RaisedButton(
59 | child: Text("Show Changelog"),
60 | onPressed: () {
61 | Navigator.push(
62 | context,
63 | MaterialPageRoute(
64 | builder: (context) => WhatsNewPage.changelog(
65 | title: Text(
66 | "What's New",
67 | textScaleFactor: textScaleFactor,
68 | textAlign: TextAlign.center,
69 | style: const TextStyle(
70 | // Text Style Needed to Look like iOS 11
71 | fontSize: 22.0,
72 | fontWeight: FontWeight.bold,
73 | ),
74 | ),
75 | buttonText: Text(
76 | 'Continue',
77 | textScaleFactor: textScaleFactor,
78 | style: const TextStyle(color: Colors.white),
79 | ),
80 | ),
81 | fullscreenDialog: true,
82 | ),
83 | );
84 | },
85 | ),
86 | Container(height: 50.0),
87 | RaisedButton(
88 | child: Text("Show Changes"),
89 | onPressed: () {
90 | Navigator.push(
91 | context,
92 | MaterialPageRoute(
93 | builder: (context) => WhatsNewPage(
94 | title: Text(
95 | "What's New",
96 | textScaleFactor: textScaleFactor,
97 | textAlign: TextAlign.center,
98 | style: const TextStyle(
99 | // Text Style Needed to Look like iOS 11
100 | fontSize: 22.0,
101 | fontWeight: FontWeight.bold,
102 | ),
103 | ),
104 | buttonText: Text(
105 | 'Continue',
106 | textScaleFactor: textScaleFactor,
107 | style: const TextStyle(color: Colors.white),
108 | ),
109 | // Create a List of WhatsNewItem for use in the Whats New Page
110 | // Create as many as you need, it will be scrollable
111 | items: [
112 | ListTile(
113 | leading: const Icon(Icons.color_lens),
114 | title: Text(
115 | 'Dark Theme',
116 | textScaleFactor: textScaleFactor,
117 | ), //Title is the only Required Item
118 | subtitle: Text(
119 | 'Black and grey theme (Tap to Change)',
120 | textScaleFactor: textScaleFactor,
121 | ),
122 | onTap: () {
123 | // You Can Navigate to Locations in the App
124 | Navigator.of(context).pushNamed("/settings");
125 | },
126 | ),
127 | ListTile(
128 | leading: const Icon(Icons.map),
129 | title: Text(
130 | 'Google Maps',
131 | textScaleFactor: textScaleFactor,
132 | ),
133 | subtitle: Text(
134 | 'Open Address Links in Google Maps instead of Apple Maps (Tap to Change)',
135 | textScaleFactor: textScaleFactor,
136 | ),
137 | onTap: () {
138 | // You Can Navigate to Locations in the App
139 | Navigator.of(context).pushNamed("/settings");
140 | },
141 | ),
142 | ListTile(
143 | leading: const Icon(Icons.notifications_active),
144 | title: Text(
145 | 'Push Notifications',
146 | textScaleFactor: textScaleFactor,
147 | ),
148 | subtitle: Text(
149 | 'Stay tuned for important information that can be pushed to you',
150 | textScaleFactor: textScaleFactor,
151 | ),
152 | onTap: () {
153 | WhatsNewPage.showDetailPopUp(
154 | context,
155 | 'Info',
156 | "You can turn off push notifications any time in your application settings.",
157 | );
158 | },
159 | ),
160 | ], //Required
161 | ),
162 | fullscreenDialog: true,
163 | ),
164 | );
165 | },
166 | ),
167 | ],
168 | ),
169 | )),
170 | );
171 | }
172 | }
173 |
174 | ```
175 |
--------------------------------------------------------------------------------
/doc/screenshots/changelog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/doc/screenshots/changelog.png
--------------------------------------------------------------------------------
/doc/screenshots/changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/doc/screenshots/changes.png
--------------------------------------------------------------------------------
/docs/assets/AssetManifest.json:
--------------------------------------------------------------------------------
1 | {"CHANGELOG.md":["CHANGELOG.md"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}
--------------------------------------------------------------------------------
/docs/assets/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.2.0] - Breaking Changes
2 |
3 | * Updated Example
4 | * Added Ability to Read from Changelog
5 | * Removed Method WhatsNewPage.show()
6 | * Adding `flutter_markdown`
7 |
8 | ## [0.1.0] - Breaking Change
9 |
10 | * Updated Example
11 | * Removed `get_version`
12 | * Plugin is now pure dart
13 | * Added Method WhatsNewPage.show()
14 |
15 | ## [0.0.7] - New Button Action
16 |
17 | * Updated Example
18 |
19 | ## [0.0.6] - New Button Action
20 |
21 | * Added Optional Callback for Button Press.
22 | * By Defualt it will Push to the Passed Widget.
23 | * Updating Dart Dependency
24 |
25 | ## [0.0.5] - Updating for Flutter
26 |
27 | * Increased button width on android.
28 | * Updated native_widgets 0.1.0
29 |
30 | ## [0.0.4] - Bug Fixes
31 |
32 | * Fixed Loading Bug.
33 |
34 | ## [0.0.3] - Bug Fixes
35 |
36 | * Updating Startup Behavior.
37 |
38 | ## [0.0.2] - Bug Fixes
39 |
40 | * Updating Startup Behavior.
41 |
42 | ## [0.0.1] - Whats New Widget
43 |
44 | * Added Components, Version Check and Example.
45 |
--------------------------------------------------------------------------------
/docs/assets/FontManifest.json:
--------------------------------------------------------------------------------
1 | [{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]
--------------------------------------------------------------------------------
/docs/assets/fonts/MaterialIcons-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/docs/assets/fonts/MaterialIcons-Regular.ttf
--------------------------------------------------------------------------------
/docs/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/docs/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
--------------------------------------------------------------------------------
/docs/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/docs/favicon.png
--------------------------------------------------------------------------------
/docs/flutter_service_worker.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const CACHE_NAME = 'flutter-app-cache';
3 | const RESOURCES = {
4 | "/index.html": "e36211d86e9c70409c58295974f749a1",
5 | "/main.dart.js": "c1e1c2e5ea16c188c22975a9166f5a72",
6 | "/favicon.png": "5dcef449791fa27946b3d35ad8803796",
7 | "/icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
8 | "/icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
9 | "/manifest.json": "00e0b69b49487ce4f9ff0c5fac8fda49",
10 | "/assets/LICENSE": "f8ebb17df69514cfec71dfa66e490471",
11 | "/assets/CHANGELOG.md": "b6d57b5714b9ce36fb30ce40a715b2ca",
12 | "/assets/AssetManifest.json": "cc5894ec3c840a4a6ca93b27b8e8178a",
13 | "/assets/FontManifest.json": "01700ba55b08a6141f33e168c4a6c22f",
14 | "/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "9a62a954b81a1ad45a58b9bcea89b50b",
15 | "/assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16"
16 | };
17 |
18 | self.addEventListener('activate', function (event) {
19 | event.waitUntil(
20 | caches.keys().then(function (cacheName) {
21 | return caches.delete(cacheName);
22 | }).then(function (_) {
23 | return caches.open(CACHE_NAME);
24 | }).then(function (cache) {
25 | return cache.addAll(Object.keys(RESOURCES));
26 | })
27 | );
28 | });
29 |
30 | self.addEventListener('fetch', function (event) {
31 | event.respondWith(
32 | caches.match(event.request)
33 | .then(function (response) {
34 | if (response) {
35 | return response;
36 | }
37 | return fetch(event.request, {
38 | credentials: 'include'
39 | });
40 | })
41 | );
42 | });
43 |
--------------------------------------------------------------------------------
/docs/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/docs/icons/Icon-192.png
--------------------------------------------------------------------------------
/docs/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/docs/icons/Icon-512.png
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | example
18 |
19 |
20 |
21 |
24 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/docs/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "minimal-ui",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/example/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_ios-2.1.1/","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_android-2.0.13/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-2.0.4/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-2.1.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.1.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-2.0.4/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-31 19:15:52.967674","version":"3.4.0-30.0.pre.12"}
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # Visual Studio Code related
19 | .vscode/
20 |
21 | # Flutter/Dart/Pub related
22 | **/doc/api/
23 | .dart_tool/
24 | .flutter-plugins
25 | .packages
26 | .pub-cache/
27 | .pub/
28 | /build/
29 |
30 | # Android related
31 | **/android/**/gradle-wrapper.jar
32 | **/android/.gradle
33 | **/android/captures/
34 | **/android/gradlew
35 | **/android/gradlew.bat
36 | **/android/local.properties
37 | **/android/**/GeneratedPluginRegistrant.java
38 |
39 | # iOS/XCode related
40 | **/ios/**/*.mode1v3
41 | **/ios/**/*.mode2v3
42 | **/ios/**/*.moved-aside
43 | **/ios/**/*.pbxuser
44 | **/ios/**/*.perspectivev3
45 | **/ios/**/*sync/
46 | **/ios/**/.sconsign.dblite
47 | **/ios/**/.tags*
48 | **/ios/**/.vagrant/
49 | **/ios/**/DerivedData/
50 | **/ios/**/Icon?
51 | **/ios/**/Pods/
52 | **/ios/**/.symlinks/
53 | **/ios/**/profile
54 | **/ios/**/xcuserdata
55 | **/ios/.generated/
56 | **/ios/Flutter/App.framework
57 | **/ios/Flutter/Flutter.framework
58 | **/ios/Flutter/Generated.xcconfig
59 | **/ios/Flutter/app.flx
60 | **/ios/Flutter/app.zip
61 | **/ios/Flutter/flutter_assets/
62 | **/ios/ServiceDefinitions.json
63 | **/ios/Runner/GeneratedPluginRegistrant.*
64 |
65 | # Exceptions to above rules.
66 | !**/ios/**/default.mode1v3
67 | !**/ios/**/default.mode2v3
68 | !**/ios/**/default.pbxuser
69 | !**/ios/**/default.perspectivev3
70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
71 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: 7679b8c37130170ddcf60afac00954dfdccd2763
8 | channel: master
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
17 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
18 | - platform: android
19 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
20 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
21 | - platform: ios
22 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
23 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
24 | - platform: linux
25 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
26 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
27 | - platform: macos
28 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
29 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
30 | - platform: web
31 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
32 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
33 | - platform: windows
34 | create_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
35 | base_revision: 7679b8c37130170ddcf60afac00954dfdccd2763
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.2.0] - Breaking Changes
2 |
3 | * Updated Example
4 | * Added Ability to Read from Changelog
5 | * Removed Method WhatsNewPage.show()
6 | * Adding `flutter_markdown`
7 |
8 | ## [0.1.0] - Breaking Change
9 |
10 | * Updated Example
11 | * Removed `get_version`
12 | * Plugin is now pure dart
13 | * Added Method WhatsNewPage.show()
14 |
15 | ## [0.0.7] - New Button Action
16 |
17 | * Updated Example
18 |
19 | ## [0.0.6] - New Button Action
20 |
21 | * Added Optional Callback for Button Press.
22 | * By Defualt it will Push to the Passed Widget.
23 | * Updating Dart Dependency
24 |
25 | ## [0.0.5] - Updating for Flutter
26 |
27 | * Increased button width on android.
28 | * Updated native_widgets 0.1.0
29 |
30 | ## [0.0.4] - Bug Fixes
31 |
32 | * Fixed Loading Bug.
33 |
34 | ## [0.0.3] - Bug Fixes
35 |
36 | * Updating Startup Behavior.
37 |
38 | ## [0.0.2] - Bug Fixes
39 |
40 | * Updating Startup Behavior.
41 |
42 | ## [0.0.1] - Whats New Widget
43 |
44 | * Added Components, Version Check and Example.
45 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_whatsnew_example
2 |
3 | Demonstrates how to use the flutter_whatsnew plugin.
4 |
5 | ```dart
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/cupertino.dart';
8 | import 'package:flutter_whatsnew/flutter_whatsnew.dart';
9 |
10 | void main() {
11 | runApp(MaterialApp(home: ShowWhatsNew()));
12 | }
13 |
14 | class ShowWhatsNew extends StatelessWidget {
15 | final double textScaleFactor = 1.0;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return new Scaffold(
20 | body: SafeArea(
21 | child: Center(
22 | child: Column(
23 | mainAxisAlignment: MainAxisAlignment.center,
24 | crossAxisAlignment: CrossAxisAlignment.center,
25 | children: [
26 | RaisedButton(
27 | child: Text("Show Changelog"),
28 | onPressed: () {
29 | Navigator.push(
30 | context,
31 | MaterialPageRoute(
32 | builder: (context) => WhatsNewPage.changelog(
33 | title: Text(
34 | "What's New",
35 | textScaleFactor: textScaleFactor,
36 | textAlign: TextAlign.center,
37 | style: const TextStyle(
38 | // Text Style Needed to Look like iOS 11
39 | fontSize: 22.0,
40 | fontWeight: FontWeight.bold,
41 | ),
42 | ),
43 | buttonText: Text(
44 | 'Continue',
45 | textScaleFactor: textScaleFactor,
46 | style: const TextStyle(color: Colors.white),
47 | ),
48 | ),
49 | fullscreenDialog: true,
50 | ),
51 | );
52 | },
53 | ),
54 | Container(height: 50.0),
55 | RaisedButton(
56 | child: Text("Show Changes"),
57 | onPressed: () {
58 | Navigator.push(
59 | context,
60 | MaterialPageRoute(
61 | builder: (context) => WhatsNewPage(
62 | title: Text(
63 | "What's New",
64 | textScaleFactor: textScaleFactor,
65 | textAlign: TextAlign.center,
66 | style: const TextStyle(
67 | // Text Style Needed to Look like iOS 11
68 | fontSize: 22.0,
69 | fontWeight: FontWeight.bold,
70 | ),
71 | ),
72 | buttonText: Text(
73 | 'Continue',
74 | textScaleFactor: textScaleFactor,
75 | style: const TextStyle(color: Colors.white),
76 | ),
77 | // Create a List of WhatsNewItem for use in the Whats New Page
78 | // Create as many as you need, it will be scrollable
79 | items: [
80 | ListTile(
81 | leading: const Icon(Icons.color_lens),
82 | title: Text(
83 | 'Dark Theme',
84 | textScaleFactor: textScaleFactor,
85 | ), //Title is the only Required Item
86 | subtitle: Text(
87 | 'Black and grey theme (Tap to Change)',
88 | textScaleFactor: textScaleFactor,
89 | ),
90 | onTap: () {
91 | // You Can Navigate to Locations in the App
92 | Navigator.of(context).pushNamed("/settings");
93 | },
94 | ),
95 | ListTile(
96 | leading: const Icon(Icons.map),
97 | title: Text(
98 | 'Google Maps',
99 | textScaleFactor: textScaleFactor,
100 | ),
101 | subtitle: Text(
102 | 'Open Address Links in Google Maps instead of Apple Maps (Tap to Change)',
103 | textScaleFactor: textScaleFactor,
104 | ),
105 | onTap: () {
106 | // You Can Navigate to Locations in the App
107 | Navigator.of(context).pushNamed("/settings");
108 | },
109 | ),
110 | ListTile(
111 | leading: const Icon(Icons.notifications_active),
112 | title: Text(
113 | 'Push Notifications',
114 | textScaleFactor: textScaleFactor,
115 | ),
116 | subtitle: Text(
117 | 'Stay tuned for important information that can be pushed to you',
118 | textScaleFactor: textScaleFactor,
119 | ),
120 | onTap: () {
121 | WhatsNewPage.showDetailPopUp(
122 | context,
123 | 'Info',
124 | "You can turn off push notifications any time in your application settings.",
125 | );
126 | },
127 | ),
128 | ], //Required
129 | ),
130 | fullscreenDialog: true,
131 | ),
132 | );
133 | },
134 | ),
135 | ],
136 | ),
137 | )),
138 | );
139 | }
140 | }
141 |
142 | ```
--------------------------------------------------------------------------------
/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
30 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter_whatsnew/flutter_whatsnew.dart';
4 |
5 | import 'dart:io' show Platform;
6 | import 'package:flutter/foundation.dart';
7 |
8 | // The existing imports
9 | // !! Keep your existing impots here !!
10 |
11 | /// main is entry point of Flutter application
12 | void main() {
13 | // Desktop platforms aren't a valid platform.
14 | if (!kIsWeb) _setTargetPlatformForDesktop();
15 | return runApp(MyApp());
16 | }
17 |
18 | /// If the current platform is desktop, override the default platform to
19 | /// a supported platform (iOS for macOS, Android for Linux and Windows).
20 | /// Otherwise, do nothing.
21 | void _setTargetPlatformForDesktop() {
22 | TargetPlatform targetPlatform;
23 | if (Platform.isMacOS) {
24 | targetPlatform = TargetPlatform.iOS;
25 | } else if (Platform.isLinux || Platform.isWindows) {
26 | targetPlatform = TargetPlatform.android;
27 | }
28 | if (targetPlatform != null) {
29 | debugDefaultTargetPlatformOverride = targetPlatform;
30 | }
31 | }
32 |
33 | class MyApp extends StatelessWidget {
34 | final double textScaleFactor = 1.0;
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return MaterialApp(
39 | debugShowCheckedModeBanner: false,
40 | home: HomeScreen(textScaleFactor: textScaleFactor),
41 | );
42 | }
43 | }
44 |
45 | class HomeScreen extends StatelessWidget {
46 | const HomeScreen({
47 | Key key,
48 | @required this.textScaleFactor,
49 | }) : super(key: key);
50 |
51 | final double textScaleFactor;
52 |
53 | @override
54 | Widget build(BuildContext context) {
55 | return ScheduledWhatsNewPage(
56 | details: WhatsNewPage.changelog(),
57 | delay: Duration(seconds: 7),
58 | child: Scaffold(
59 | body: SafeArea(
60 | child: Center(
61 | child: Column(
62 | mainAxisAlignment: MainAxisAlignment.center,
63 | crossAxisAlignment: CrossAxisAlignment.center,
64 | children: [
65 | ElevatedButton(
66 | child: Text("Show Changelog"),
67 | onPressed: () {
68 | Navigator.push(
69 | context,
70 | MaterialPageRoute(
71 | builder: (context) => WhatsNewPage.changelog(
72 | title: Text(
73 | "What's New",
74 | textScaleFactor: textScaleFactor,
75 | textAlign: TextAlign.center,
76 | style: const TextStyle(
77 | // Text Style Needed to Look like iOS 11
78 | fontSize: 22.0,
79 | fontWeight: FontWeight.bold,
80 | ),
81 | ),
82 | buttonText: Text(
83 | 'Continue',
84 | textScaleFactor: textScaleFactor,
85 | style: const TextStyle(color: Colors.white),
86 | ),
87 | ),
88 | fullscreenDialog: true,
89 | ),
90 | );
91 | },
92 | ),
93 | Container(height: 50.0),
94 | ElevatedButton(
95 | child: Text("Show Changes"),
96 | onPressed: () {
97 | Navigator.push(
98 | context,
99 | MaterialPageRoute(
100 | builder: (context) => WhatsNewPage(
101 | title: Text(
102 | "What's New",
103 | textScaleFactor: textScaleFactor,
104 | textAlign: TextAlign.center,
105 | style: const TextStyle(
106 | // Text Style Needed to Look like iOS 11
107 | fontSize: 22.0,
108 | fontWeight: FontWeight.bold,
109 | ),
110 | ),
111 | buttonText: Text(
112 | 'Continue',
113 | textScaleFactor: textScaleFactor,
114 | style: const TextStyle(color: Colors.white),
115 | ),
116 | // Create a List of WhatsNewItem for use in the Whats New Page
117 | // Create as many as you need, it will be scrollable
118 | items: [
119 | ListTile(
120 | leading: const Icon(Icons.color_lens),
121 | title: Text(
122 | 'Dark Theme',
123 | textScaleFactor: textScaleFactor,
124 | ), //Title is the only Required Item
125 | subtitle: Text(
126 | 'Black and grey theme (Tap to Change)',
127 | textScaleFactor: textScaleFactor,
128 | ),
129 | onTap: () {
130 | // You Can Navigate to Locations in the App
131 | Navigator.of(context).pushNamed("/settings");
132 | },
133 | ),
134 | ListTile(
135 | leading: const Icon(Icons.map),
136 | title: Text(
137 | 'Google Maps',
138 | textScaleFactor: textScaleFactor,
139 | ),
140 | subtitle: Text(
141 | 'Open Address Links in Google Maps instead of Apple Maps (Tap to Change)',
142 | textScaleFactor: textScaleFactor,
143 | ),
144 | onTap: () {
145 | // You Can Navigate to Locations in the App
146 | Navigator.of(context).pushNamed("/settings");
147 | },
148 | ),
149 | ListTile(
150 | leading: const Icon(Icons.notifications_active),
151 | title: Text(
152 | 'Push Notifications',
153 | textScaleFactor: textScaleFactor,
154 | ),
155 | subtitle: Text(
156 | 'Stay tuned for important information that can be pushed to you',
157 | textScaleFactor: textScaleFactor,
158 | ),
159 | onTap: () {
160 | WhatsNewPage.showDetailPopUp(
161 | context,
162 | 'Info',
163 | "You can turn off push notifications any time in your application settings.",
164 | );
165 | },
166 | ),
167 | ], //Required
168 | ),
169 | fullscreenDialog: true,
170 | ),
171 | );
172 | },
173 | ),
174 | ],
175 | ),
176 | ),
177 | ),
178 | ),
179 | );
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | args:
5 | dependency: transitive
6 | description:
7 | name: args
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.3.1"
11 | async:
12 | dependency: transitive
13 | description:
14 | name: async
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.9.0"
18 | boolean_selector:
19 | dependency: transitive
20 | description:
21 | name: boolean_selector
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.1.0"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.1"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.16.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.1.3"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.3.1"
60 | ffi:
61 | dependency: transitive
62 | description:
63 | name: ffi
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.0.1"
67 | file:
68 | dependency: transitive
69 | description:
70 | name: file
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "6.1.4"
74 | flutter:
75 | dependency: "direct main"
76 | description: flutter
77 | source: sdk
78 | version: "0.0.0"
79 | flutter_markdown:
80 | dependency: transitive
81 | description:
82 | name: flutter_markdown
83 | url: "https://pub.dartlang.org"
84 | source: hosted
85 | version: "0.6.12"
86 | flutter_test:
87 | dependency: "direct dev"
88 | description: flutter
89 | source: sdk
90 | version: "0.0.0"
91 | flutter_web_plugins:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.0"
96 | flutter_whatsnew:
97 | dependency: "direct dev"
98 | description:
99 | path: ".."
100 | relative: true
101 | source: path
102 | version: "1.0.5+2"
103 | js:
104 | dependency: transitive
105 | description:
106 | name: js
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "0.6.4"
110 | markdown:
111 | dependency: transitive
112 | description:
113 | name: markdown
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "6.0.0"
117 | matcher:
118 | dependency: transitive
119 | description:
120 | name: matcher
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "0.12.12"
124 | material_color_utilities:
125 | dependency: transitive
126 | description:
127 | name: material_color_utilities
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.2.0"
131 | meta:
132 | dependency: transitive
133 | description:
134 | name: meta
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "1.8.0"
138 | path:
139 | dependency: transitive
140 | description:
141 | name: path
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.8.2"
145 | path_provider_linux:
146 | dependency: transitive
147 | description:
148 | name: path_provider_linux
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.1.7"
152 | path_provider_platform_interface:
153 | dependency: transitive
154 | description:
155 | name: path_provider_platform_interface
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "2.0.4"
159 | path_provider_windows:
160 | dependency: transitive
161 | description:
162 | name: path_provider_windows
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.1.3"
166 | platform:
167 | dependency: transitive
168 | description:
169 | name: platform
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "3.1.0"
173 | plugin_platform_interface:
174 | dependency: transitive
175 | description:
176 | name: plugin_platform_interface
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "2.1.3"
180 | process:
181 | dependency: transitive
182 | description:
183 | name: process
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "4.2.4"
187 | shared_preferences:
188 | dependency: transitive
189 | description:
190 | name: shared_preferences
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "2.0.15"
194 | shared_preferences_android:
195 | dependency: transitive
196 | description:
197 | name: shared_preferences_android
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.0.13"
201 | shared_preferences_ios:
202 | dependency: transitive
203 | description:
204 | name: shared_preferences_ios
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.1.1"
208 | shared_preferences_linux:
209 | dependency: transitive
210 | description:
211 | name: shared_preferences_linux
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "2.1.1"
215 | shared_preferences_macos:
216 | dependency: transitive
217 | description:
218 | name: shared_preferences_macos
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "2.0.4"
222 | shared_preferences_platform_interface:
223 | dependency: transitive
224 | description:
225 | name: shared_preferences_platform_interface
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "2.1.0"
229 | shared_preferences_web:
230 | dependency: transitive
231 | description:
232 | name: shared_preferences_web
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "2.0.4"
236 | shared_preferences_windows:
237 | dependency: transitive
238 | description:
239 | name: shared_preferences_windows
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "2.1.1"
243 | sky_engine:
244 | dependency: transitive
245 | description: flutter
246 | source: sdk
247 | version: "0.0.99"
248 | source_span:
249 | dependency: transitive
250 | description:
251 | name: source_span
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "1.9.1"
255 | stack_trace:
256 | dependency: transitive
257 | description:
258 | name: stack_trace
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "1.10.0"
262 | stream_channel:
263 | dependency: transitive
264 | description:
265 | name: stream_channel
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "2.1.1"
269 | string_scanner:
270 | dependency: transitive
271 | description:
272 | name: string_scanner
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "1.1.1"
276 | term_glyph:
277 | dependency: transitive
278 | description:
279 | name: term_glyph
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "1.2.1"
283 | test_api:
284 | dependency: transitive
285 | description:
286 | name: test_api
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "0.4.14"
290 | vector_math:
291 | dependency: transitive
292 | description:
293 | name: vector_math
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "2.1.4"
297 | win32:
298 | dependency: transitive
299 | description:
300 | name: win32
301 | url: "https://pub.dartlang.org"
302 | source: hosted
303 | version: "3.0.0"
304 | xdg_directories:
305 | dependency: transitive
306 | description:
307 | name: xdg_directories
308 | url: "https://pub.dartlang.org"
309 | source: hosted
310 | version: "0.2.0+2"
311 | sdks:
312 | dart: ">=2.19.0-168.0.dev <3.0.0"
313 | flutter: ">=3.0.0"
314 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_whatsnew_example
2 | description: Demonstrates how to use the flutter_whatsnew plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 | cupertino_icons: ^0.1.2
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 |
17 | flutter_whatsnew:
18 | path: ../
19 |
20 | flutter:
21 | uses-material-design: true
22 |
23 | assets:
24 | - CHANGELOG.md
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttercommunity/flutter_whatsnew/b242f4babc73b3a4ae2c52f3d18c569f2e9bbca6/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | example
18 |
19 |
20 |
21 |
24 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "minimal-ui",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/flutter_whatsnew.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/flutter_whatsnew.dart:
--------------------------------------------------------------------------------
1 | library flutter_whatsnew;
2 |
3 | export 'src/base.dart';
4 | export 'src/changelog.dart';
5 | export 'src/scheduled.dart';
6 |
--------------------------------------------------------------------------------
/lib/src/base.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_markdown/flutter_markdown.dart';
5 |
6 | import 'changelog.dart';
7 |
8 | class WhatsNewPage extends StatelessWidget {
9 | final Widget title;
10 | final Widget buttonText;
11 | final List? items;
12 | final VoidCallback? onButtonPressed;
13 | final bool changelog;
14 | final String? changes;
15 | final Color? backgroundColor;
16 | final Color? buttonColor;
17 | final String? path;
18 | final MarkdownTapLinkCallback? onTapLink;
19 | final bool adaptive;
20 |
21 | const WhatsNewPage({
22 | required this.items,
23 | required this.title,
24 | required this.buttonText,
25 | this.onButtonPressed,
26 | this.backgroundColor,
27 | this.buttonColor,
28 | this.onTapLink,
29 | this.adaptive = true,
30 | }) : changelog = false,
31 | changes = null,
32 | path = null;
33 |
34 | const WhatsNewPage.changelog({
35 | this.title = const Text(
36 | 'Changelog',
37 | textAlign: TextAlign.center,
38 | style: const TextStyle(
39 | fontSize: 22.0,
40 | fontWeight: FontWeight.bold,
41 | ),
42 | ),
43 | this.buttonText = const Text(
44 | 'Continue',
45 | style: const TextStyle(color: Colors.white),
46 | ),
47 | this.onButtonPressed,
48 | this.changes,
49 | this.backgroundColor,
50 | this.buttonColor,
51 | this.path,
52 | this.onTapLink,
53 | this.adaptive = true,
54 | }) : changelog = true,
55 | items = null;
56 |
57 | static void showDetailPopUp(
58 | BuildContext context,
59 | String title,
60 | String detail,
61 | ) async {
62 | void showDemoDialog({
63 | required BuildContext context,
64 | required Widget child,
65 | }) {
66 | showDialog(
67 | context: context,
68 | barrierDismissible: false,
69 | builder: (BuildContext context) => child,
70 | );
71 | }
72 |
73 | return showDemoDialog(
74 | context: context,
75 | child: AlertDialog(
76 | title: Text(title),
77 | content: Text(detail),
78 | actions: [
79 | TextButton(
80 | child: Text('OK'),
81 | onPressed: () {
82 | Navigator.pop(context);
83 | },
84 | ),
85 | ],
86 | ),
87 | );
88 | }
89 |
90 | @override
91 | Widget build(BuildContext context) {
92 | assert(items != null || changelog);
93 | if (adaptive &&
94 | !kIsWeb &&
95 | (defaultTargetPlatform == TargetPlatform.iOS ||
96 | defaultTargetPlatform == TargetPlatform.macOS)) {
97 | return _buildIOS(context);
98 | }
99 | return _buildAndroid(context);
100 | }
101 |
102 | Widget _buildAndroid(BuildContext context) {
103 | final buttonStyle = ElevatedButton.styleFrom(
104 | backgroundColor: buttonColor ?? Theme.of(context).colorScheme.primary,
105 | foregroundColor: buttonColor != null
106 | ? (buttonColor!.computeLuminance() > 0.5
107 | ? Colors.black
108 | : Colors.white)
109 | : Theme.of(context).colorScheme.onPrimary,
110 | );
111 | if (changelog) {
112 | return Scaffold(
113 | backgroundColor:
114 | backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
115 | body: SafeArea(
116 | child: Stack(
117 | fit: StackFit.loose,
118 | children: [
119 | Positioned(
120 | top: 10.0,
121 | left: 0.0,
122 | right: 0.0,
123 | child: title,
124 | ),
125 | Positioned(
126 | left: 0.0,
127 | right: 0.0,
128 | top: 50.0,
129 | bottom: 80.0,
130 | child: ChangeLogView(
131 | changes: changes,
132 | path: path,
133 | onTapLink: onTapLink,
134 | adaptive: adaptive,
135 | ),
136 | ),
137 | Positioned(
138 | bottom: 5.0,
139 | right: 10.0,
140 | left: 10.0,
141 | child: ListTile(
142 | title: ElevatedButton(
143 | child: buttonText,
144 | style: buttonStyle,
145 | onPressed: onButtonPressed != null
146 | ? onButtonPressed
147 | : () {
148 | Navigator.pop(context);
149 | },
150 | ),
151 | ),
152 | ),
153 | ],
154 | ),
155 | ),
156 | );
157 | } else if (items != null) {
158 | return Scaffold(
159 | backgroundColor:
160 | backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
161 | body: SafeArea(
162 | child: Stack(
163 | fit: StackFit.loose,
164 | children: [
165 | Positioned(
166 | top: 10.0,
167 | left: 0.0,
168 | right: 0.0,
169 | child: title,
170 | ),
171 | Positioned(
172 | left: 0.0,
173 | right: 0.0,
174 | top: 50.0,
175 | bottom: 80.0,
176 | child: ListView(
177 | children: items!
178 | .map(
179 | (ListTile item) => ListTile(
180 | title: item.title,
181 | subtitle: item.subtitle,
182 | leading: item.leading,
183 | trailing: item.trailing,
184 | onTap: item.onTap,
185 | onLongPress: item.onLongPress,
186 | ),
187 | )
188 | .toList(),
189 | ),
190 | ),
191 | Positioned(
192 | bottom: 5.0,
193 | right: 10.0,
194 | left: 10.0,
195 | child: ListTile(
196 | title: ElevatedButton(
197 | child: buttonText,
198 | style: buttonStyle,
199 | onPressed: onButtonPressed != null
200 | ? onButtonPressed
201 | : () => Navigator.pop(context),
202 | ),
203 | ),
204 | ),
205 | ],
206 | ),
207 | ),
208 | );
209 | }
210 | return Container();
211 | }
212 |
213 | Widget _buildIOS(BuildContext context) {
214 | Widget? child;
215 | if (changelog) {
216 | child = ChangeLogView(
217 | changes: changes,
218 | path: path,
219 | onTapLink: onTapLink,
220 | adaptive: adaptive,
221 | );
222 | } else if (items != null) {
223 | child = Material(
224 | child: ListView(
225 | children: items!,
226 | ),
227 | );
228 | }
229 | return CupertinoPageScaffold(
230 | navigationBar: CupertinoNavigationBar(
231 | middle: title,
232 | ),
233 | child: SafeArea(
234 | child: child ?? Container(),
235 | ),
236 | );
237 | }
238 | }
239 |
--------------------------------------------------------------------------------
/lib/src/changelog.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 | import 'package:flutter_markdown/flutter_markdown.dart';
6 |
7 | class ChangeLogView extends StatefulWidget {
8 | const ChangeLogView({
9 | this.onTapLink,
10 | this.path,
11 | this.changes,
12 | required this.adaptive,
13 | });
14 | final String? changes;
15 | final String? path;
16 | final bool adaptive;
17 | final MarkdownTapLinkCallback? onTapLink;
18 | @override
19 | _ChangeLogViewState createState() => _ChangeLogViewState();
20 | }
21 |
22 | class _ChangeLogViewState extends State {
23 | String? _changelog;
24 |
25 | @override
26 | void initState() {
27 | if (widget.changes == null) {
28 | rootBundle.loadString(widget.path ?? "CHANGELOG.md").then((data) {
29 | setState(() {
30 | _changelog = data;
31 | });
32 | });
33 | } else {
34 | setState(() {
35 | _changelog = widget.changes;
36 | });
37 | }
38 | super.initState();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | if (_changelog == null) {
44 | if (widget.adaptive &&
45 | (defaultTargetPlatform == TargetPlatform.iOS ||
46 | defaultTargetPlatform == TargetPlatform.macOS)) {
47 | return Center(child: CupertinoActivityIndicator());
48 | } else {
49 | return Center(child: CircularProgressIndicator());
50 | }
51 | }
52 | return Markdown(
53 | data: _changelog!,
54 | onTapLink: widget.onTapLink,
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/src/scheduled.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shared_preferences/shared_preferences.dart';
3 |
4 | import 'base.dart';
5 |
6 | class ScheduledWhatsNewPage extends StatefulWidget {
7 | const ScheduledWhatsNewPage({
8 | Key? key,
9 | required this.details,
10 | this.delay,
11 | this.appVersion,
12 | required this.child,
13 | }) : super(key: key);
14 |
15 | final WhatsNewPage details;
16 | final Widget child;
17 |
18 | /// Wait a set duration and show the dialog
19 | final Duration? delay;
20 |
21 | /// Check the last saved version and show the dialog if different (or fresh)
22 | final String? appVersion;
23 |
24 | @override
25 | State createState() => _ScheduledWhatsNewPageState();
26 | }
27 |
28 | class _ScheduledWhatsNewPageState extends State {
29 | late SharedPreferences prefs;
30 |
31 | @override
32 | void initState() {
33 | SharedPreferences.getInstance().then((value) {
34 | prefs = value;
35 | check();
36 | });
37 | super.initState();
38 | }
39 |
40 | void check() async {
41 | if (widget.appVersion != null) {
42 | final settingsKey = 'last-app-version';
43 | final lastVersion = prefs.getString(settingsKey);
44 | if (lastVersion == widget.appVersion) {
45 | return;
46 | }
47 | await prefs.setString(settingsKey, widget.appVersion!);
48 | }
49 | if (widget.delay != null) {
50 | await Future.delayed(widget.delay!);
51 | }
52 | show(context);
53 | }
54 |
55 | void show(BuildContext context) {
56 | if (!mounted) return;
57 | final nav = Navigator.of(context, rootNavigator: true);
58 | nav.push(MaterialPageRoute(
59 | builder: (context) => widget.details,
60 | fullscreenDialog: true,
61 | ));
62 | }
63 |
64 | @override
65 | Widget build(BuildContext context) {
66 | return widget.child;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | args:
5 | dependency: transitive
6 | description:
7 | name: args
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.3.1"
11 | async:
12 | dependency: transitive
13 | description:
14 | name: async
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.9.0"
18 | boolean_selector:
19 | dependency: transitive
20 | description:
21 | name: boolean_selector
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.1.0"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.1"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.16.0"
46 | fake_async:
47 | dependency: transitive
48 | description:
49 | name: fake_async
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.3.1"
53 | ffi:
54 | dependency: transitive
55 | description:
56 | name: ffi
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.0.1"
60 | file:
61 | dependency: transitive
62 | description:
63 | name: file
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "6.1.4"
67 | flutter:
68 | dependency: "direct main"
69 | description: flutter
70 | source: sdk
71 | version: "0.0.0"
72 | flutter_markdown:
73 | dependency: "direct main"
74 | description:
75 | name: flutter_markdown
76 | url: "https://pub.dartlang.org"
77 | source: hosted
78 | version: "0.6.12"
79 | flutter_test:
80 | dependency: "direct dev"
81 | description: flutter
82 | source: sdk
83 | version: "0.0.0"
84 | flutter_web_plugins:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.0"
89 | js:
90 | dependency: transitive
91 | description:
92 | name: js
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "0.6.4"
96 | markdown:
97 | dependency: transitive
98 | description:
99 | name: markdown
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "6.0.0"
103 | matcher:
104 | dependency: transitive
105 | description:
106 | name: matcher
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "0.12.12"
110 | material_color_utilities:
111 | dependency: transitive
112 | description:
113 | name: material_color_utilities
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "0.2.0"
117 | meta:
118 | dependency: transitive
119 | description:
120 | name: meta
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.8.0"
124 | path:
125 | dependency: transitive
126 | description:
127 | name: path
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.8.2"
131 | path_provider_linux:
132 | dependency: transitive
133 | description:
134 | name: path_provider_linux
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.1.7"
138 | path_provider_platform_interface:
139 | dependency: transitive
140 | description:
141 | name: path_provider_platform_interface
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "2.0.4"
145 | path_provider_windows:
146 | dependency: transitive
147 | description:
148 | name: path_provider_windows
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.1.3"
152 | platform:
153 | dependency: transitive
154 | description:
155 | name: platform
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "3.1.0"
159 | plugin_platform_interface:
160 | dependency: transitive
161 | description:
162 | name: plugin_platform_interface
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.1.3"
166 | process:
167 | dependency: transitive
168 | description:
169 | name: process
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "4.2.4"
173 | shared_preferences:
174 | dependency: "direct main"
175 | description:
176 | name: shared_preferences
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "2.0.15"
180 | shared_preferences_android:
181 | dependency: transitive
182 | description:
183 | name: shared_preferences_android
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "2.0.13"
187 | shared_preferences_ios:
188 | dependency: transitive
189 | description:
190 | name: shared_preferences_ios
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "2.1.1"
194 | shared_preferences_linux:
195 | dependency: transitive
196 | description:
197 | name: shared_preferences_linux
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.1.1"
201 | shared_preferences_macos:
202 | dependency: transitive
203 | description:
204 | name: shared_preferences_macos
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "2.0.4"
208 | shared_preferences_platform_interface:
209 | dependency: transitive
210 | description:
211 | name: shared_preferences_platform_interface
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "2.1.0"
215 | shared_preferences_web:
216 | dependency: transitive
217 | description:
218 | name: shared_preferences_web
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "2.0.4"
222 | shared_preferences_windows:
223 | dependency: transitive
224 | description:
225 | name: shared_preferences_windows
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "2.1.1"
229 | sky_engine:
230 | dependency: transitive
231 | description: flutter
232 | source: sdk
233 | version: "0.0.99"
234 | source_span:
235 | dependency: transitive
236 | description:
237 | name: source_span
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "1.9.1"
241 | stack_trace:
242 | dependency: transitive
243 | description:
244 | name: stack_trace
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "1.10.0"
248 | stream_channel:
249 | dependency: transitive
250 | description:
251 | name: stream_channel
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "2.1.1"
255 | string_scanner:
256 | dependency: transitive
257 | description:
258 | name: string_scanner
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "1.1.1"
262 | term_glyph:
263 | dependency: transitive
264 | description:
265 | name: term_glyph
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "1.2.1"
269 | test_api:
270 | dependency: transitive
271 | description:
272 | name: test_api
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "0.4.14"
276 | vector_math:
277 | dependency: transitive
278 | description:
279 | name: vector_math
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "2.1.4"
283 | win32:
284 | dependency: transitive
285 | description:
286 | name: win32
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "3.0.0"
290 | xdg_directories:
291 | dependency: transitive
292 | description:
293 | name: xdg_directories
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "0.2.0+2"
297 | sdks:
298 | dart: ">=2.19.0-168.0.dev <3.0.0"
299 | flutter: ">=3.0.0"
300 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_whatsnew
2 | description: A new Flutter package to show updates to users.
3 | version: 1.0.5+2
4 | # author: Rody Davis
5 | homepage: https://github.com/fluttercommunity/flutter_whatsnew
6 | maintainer: Rody Davis (@rodydavis)
7 |
8 | environment:
9 | sdk: ">=2.19.0-168.0.dev <3.0.0"
10 | flutter: ">=1.17.0"
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 | flutter_markdown: ^0.6.12
16 | shared_preferences: ^2.0.15
17 |
18 | dev_dependencies:
19 | flutter_test:
20 | sdk: flutter
21 |
22 | # For information on the generic Dart part of this file, see the
23 | # following page: https://www.dartlang.org/tools/pub/pubspec
24 |
25 | # The following section is specific to Flutter.
26 | flutter:
27 |
--------------------------------------------------------------------------------