|
1 | | -<!-- |
2 | | -This README describes the package. If you publish this package to pub.dev, |
3 | | -this README's contents appear on the landing page for your package. |
| 1 | +# Help Ukraine Widget for Flutter |
4 | 2 |
|
5 | | -For information about how to write a good package README, see the guide for |
6 | | -[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). |
| 3 | +[](https://pub.dev/packages/solid_lints) |
7 | 4 |
|
8 | | -For general information about developing packages, see the Dart guide for |
9 | | -[creating packages](https://dart.dev/guides/libraries/create-library-packages) |
10 | | -and the Flutter guide for |
11 | | -[developing packages and plugins](https://flutter.dev/developing-packages). |
12 | | ---> |
| 5 | +This is a port of [Help Ukraine Widget](https://helpukrainewinwidget.org/) - |
| 6 | +this widget helps to let users of your app know how they can help Ukraine |
| 7 | +from anywhere in the world. |
13 | 8 |
|
14 | | -TODO: Put a short description of the package here that helps potential users |
15 | | -know whether this package might be useful for them. |
| 9 | +## Showcase |
| 10 | + |
| 11 | +<details open><summary>First widget variation</summary> |
| 12 | + |
| 13 | + |
| 14 | +</details> |
| 15 | + |
| 16 | +<details><summary>Second widget variation</summary> |
| 17 | + |
| 18 | + |
| 19 | +</details> |
| 20 | + |
| 21 | +<details><summary>Third widget variation</summary> |
| 22 | + |
| 23 | + |
| 24 | +</details> |
| 25 | + |
| 26 | +<details><summary>Fourth widget variation</summary> |
| 27 | + |
| 28 | + |
| 29 | +</details> |
16 | 30 |
|
17 | 31 | ## Features |
18 | 32 |
|
19 | | -TODO: List what your package can do. Maybe include images, gifs, or videos. |
| 33 | +By installing this widget in your app, you will help to end the war in Ukraine. |
| 34 | +It will provide links for: |
| 35 | + |
| 36 | +* [donations](https://uahelp.monobank.ua/), |
| 37 | +* sharing this widget |
| 38 | +* and [other ways to support Ukraine](https://war.ukraine.ua/). |
20 | 39 |
|
21 | 40 | ## Getting started |
22 | 41 |
|
23 | | -TODO: List prerequisites and provide or point to information on how to |
24 | | -start using the package. |
| 42 | +Add the package as a dependency to your __pubspec.yaml__: |
| 43 | + |
| 44 | +``` yaml |
| 45 | +dependencies: |
| 46 | + help_ukraine_widget: <latest version> |
| 47 | +``` |
| 48 | +
|
| 49 | +in your code: |
| 50 | +
|
| 51 | +``` dart |
| 52 | +import 'package:help_ukraine_widget/help_ukraine_widget.dart'; |
| 53 | +``` |
25 | 54 |
|
26 | 55 | ## Usage |
27 | 56 |
|
28 | | -TODO: Include short and useful examples for package users. Add longer examples |
29 | | -to `/example` folder. |
| 57 | +### Basic usage |
| 58 | + |
| 59 | +Use `OverlayWidget` to float and align the widget above your app: |
| 60 | + |
| 61 | +``` dart |
| 62 | +OverlayWidget( |
| 63 | + alignment: Alignment.bottomRight, |
| 64 | + overlayWidget: HorizontalHelpWidget(), |
| 65 | + child: MyApp(), |
| 66 | +) |
| 67 | +``` |
| 68 | + |
| 69 | +### Customization |
| 70 | + |
| 71 | +You can also create custom variations of this widget: |
| 72 | + |
| 73 | +``` dart |
| 74 | +// we used that in our widget, but you do you |
| 75 | +final order = [HelpWidgetView.collapsed, HelpWidgetView.main, HelpWidgetView.options]; |
| 76 | +
|
| 77 | +final _controller = TraverseController(order); |
30 | 78 |
|
31 | | -```dart |
32 | | -const like = 'sample'; |
| 79 | +HelpWidget( |
| 80 | + controller: _controller; |
| 81 | + // view with links to resources that help Ukraine |
| 82 | + optionsView: ... |
| 83 | + // The default first view that the users see. |
| 84 | + mainView: ... |
| 85 | + // smallest view that doesn't obstruct user from |
| 86 | + // using the app, but still exists on the screen |
| 87 | + collapsedView: ... |
| 88 | + // axis of transition animation between views |
| 89 | + axis: ... |
| 90 | +) |
33 | 91 | ``` |
34 | 92 |
|
35 | | -## Additional information |
| 93 | +## Credits |
36 | 94 |
|
37 | | -TODO: Tell users more about the package: where to find more information, how to |
38 | | -contribute to the package, how to file issues, what response they can expect |
39 | | -from the package authors, and more. |
| 95 | +[jiffsy.co](https://jiffsy.co/) and [Gearheart](https://gearheart.io/) for designing and creating the [original widget](https://helpukrainewinwidget.org/). |
0 commit comments