@@ -50,14 +50,86 @@ import 'package:help_ukraine_widget/help_ukraine_widget.dart';
5050## Usage
5151
5252### Basic usage
53- ` HorizontalHelpWidget() `
54-
55- ### Customization
56- You can add widget floating above your app like that:
53+ Use ` OverlayWidget ` to float and align the widget above your app:
5754```
5855OverlayWidget(
56+ // e.g. Alignment.bottomRight
5957 alignment: alignment,
6058 overlayWidget: HorizontalHelpWidget(),
6159 child: MyApp(),
6260)
6361```
62+
63+ ### Customization
64+ You can also create custom variations of this widget:
65+ ```
66+ // we used that in our widget, but you do you
67+ final order = [HelpWidgetView.collapsed, HelpWidgetView.main, HelpWidgetView.options];
68+
69+ final _controller = TraverseController(order);
70+
71+ HelpWidget(
72+ controller: _controller;
73+ // view with links to resources that help Ukraine
74+ optionsView: ...
75+ // transitional view between options and collapsed
76+ mainView: ...
77+ // smallest view that doesn't obstruct user from
78+ // using the app, but still exists on the screen
79+ collapsedView: ...
80+ // axis of transition animation between views
81+ axis: ...
82+ )
83+ ```
84+
85+ To make it easier we provide some classes:
86+
87+ #### Components ####
88+
89+ ##### Buttons #####
90+
91+ ` DetailsButton ` - used in main view to go to options view.
92+
93+ ` HelpOptionButton ` - used in options view as a link to external resources.
94+
95+ ` RoundedButton ` - close button for ` CardRounded ` .
96+
97+ ##### Other #####
98+
99+ ` CardRounded ` - base widget for every view.
100+
101+ ` ChevronDown ` - flexible chevron icon.
102+
103+ ` FlagCard ` - default collapsed view.
104+
105+ ` FlagWidget ` - flexible widget with Ukraine flag colors.
106+
107+ ` HoverWrapper ` - add responses for pointer events to your widget.
108+
109+ ` XMark ` - flexible cross icon.
110+
111+ ### Controllers
112+ ` TraverseController ` is used to track current view and direction of last transition.
113+
114+ ### Helpers
115+
116+ ` defaultOptionsList ` - list of default link buttons for external resources.
117+
118+ ` Emojis ` - emoji constants just to be a little more descriptive.
119+
120+ ` HelpWidgetView ` - enum to track current view using ` TraverseController ` .
121+
122+ ### Theme
123+ ` FontConfig ` - common font settings in project.
124+
125+ ` HelpColors ` - common colors used in project.
126+
127+ ` TextThemes ` - common text theming constants.
128+
129+ ### Widgets
130+
131+ ` HelpWidget ` - base class for help widgets.
132+
133+ ` LinksCardWidget ` - base class for options view.
134+
135+ ` UkraineFlagWidget ` is the rounded square flag you see in collapsed view.
0 commit comments