Skip to content

Commit d579939

Browse files
Merge pull request #30 from solid-software/10-add-readme
Resolves #10
2 parents 231e538 + feef4e1 commit d579939

File tree

5 files changed

+79
-23
lines changed

5 files changed

+79
-23
lines changed

README.md

Lines changed: 79 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,95 @@
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
42

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+
[![style: solid](https://img.shields.io/badge/style-solid-orange)](https://pub.dev/packages/solid_lints)
74

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.
138

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+
![First widget example](gifs/widget1.gif)
14+
</details>
15+
16+
<details><summary>Second widget variation</summary>
17+
18+
![Second widget example](gifs/widget2.gif)
19+
</details>
20+
21+
<details><summary>Third widget variation</summary>
22+
23+
![Third widget example](gifs/widget3.gif)
24+
</details>
25+
26+
<details><summary>Fourth widget variation</summary>
27+
28+
![Fourth widget example](gifs/widget4.gif)
29+
</details>
1630

1731
## Features
1832

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/).
2039

2140
## Getting started
2241

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+
```
2554

2655
## Usage
2756

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);
3078
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+
)
3391
```
3492

35-
## Additional information
93+
## Credits
3694

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/).

gifs/widget1.gif

111 KB
Loading

gifs/widget2.gif

92.7 KB
Loading

gifs/widget3.gif

122 KB
Loading

gifs/widget4.gif

97.4 KB
Loading

0 commit comments

Comments
 (0)