You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Draggable Home
2
2
3
-
A draggable Flutter widget that makes implementing a Sliding up and fully-stretchable much easier! Based on the Scaffold and Sliver.
3
+
A draggable Flutter widget that makes implementing a Sliding up and fully-stretchable much easier! Based on the Scaffold and Sliver.
4
4
5
5
<br>
6
6
<p>
@@ -28,9 +28,9 @@ dependencies:
28
28
*The complete example is available [here](https://github.com/4-alok/draggable_home/blob/main/example/lib/main.dart).*
29
29
30
30
**DraggableHome** requires you to provide `title`, `headerWidget` and `body`:
31
-
* `title` widget is basically for title in AppBar. For no title in appbar, simply put an empty Contnainer.
32
-
* `headerWidget` is the expanded widget just above body when not fully expanded.
33
-
* `body` is in the form of Column which requires list of widget or a widget. Do not add any verically scrollable widge or you may just disable the scroll.
31
+
* `title` widget is basically for a title in the AppBar. For no title in AppBar, simply pass an empty Container.
32
+
* `headerWidget` is the expanded widget just above the body when not fully expanded.
33
+
* `body` is in the form of Column which requires a list of widget or a widget. Do not add any vertically scrollable widget or you may just disable the scroll.
34
34
```dart
35
35
physics: const NeverScrollableScrollPhysics()
36
36
```
@@ -39,7 +39,7 @@ dependencies:
39
39
Sample code
40
40
```dart
41
41
DraggableHome(
42
-
title: Text("Ttitle"),
42
+
title: Text("Title"),
43
43
headerWidget: headerWidget(),
44
44
body: [
45
45
Container(...),
@@ -56,19 +56,19 @@ There are several options that allow for more control:
56
56
| `leading` | A widget to display before the toolbar's title. |
57
57
| `action` | A list of Widgets to display in a row after the title widget. |
58
58
| `drawer` | Drawers are typically used with the Scaffold.drawer property. |
59
-
| `centerTitle` | Allows toggling of title from the center. By default title is in the center.|
59
+
| `centerTitle` | Allows toggling of title from the center. By default, title is in the center.|
60
60
| `headerExpandedHeight` | Height of the header widget. The height is a double between 0.0 and 1.0. The default value of height is 0.35 and should be less than **stretchMaxHeight** |
61
-
| `headerWidget` | A widget to display Header above body. |
62
-
|`alwaysShowLeadingAndAction`| This make Leading and Action always visible. Default value is false. |
61
+
| `headerWidget` | A widget to display Header above the body. |
62
+
|`alwaysShowLeadingAndAction`| This makes Leading and Action always visible. Default value is false. |
63
63
|`headerBottomBar`| AppBar or toolBar like widget just above the body. |
64
64
| `backgroundColor` | The color of the Material widget that underlies the entire DraggableHome body. |
65
-
| `curvedBodyRadius` | Creates a border topleft and topright radius of body, Default radius of the body is 20.0. For no radius simply set value to **0**.|
65
+
| `curvedBodyRadius` | Creates a border top-left and top-right radius of body, Default radius of the body is 20.0. For no radius simply set the value to **0**.|
66
66
| `fullyStretchable` | Allows toggling of fully expand draggability of the DraggableHome. Set this to true to allow the user to fully expand the header. |
67
67
| `stretchTriggerOffset` | The offset of overscroll required to fully expand the header.|
68
-
| `expandedBody` | A widget to display when fully expanded as header or expandedBody above body. |
68
+
| `expandedBody` | A widget to display when fully expanded as header or expandedBody above the body. |
69
69
| `stretchMaxHeight` | Height of the expandedBody widget. The height is a double between 0.0 and 0.95. The default value of height is 0.9 and should be greater than **headerExpandedHeight** |
70
70
| `bottomSheet` | A persistent bottom sheet shows information that supplements the primary content of the app. A persistent bottom sheet remains visible even when the user interacts with other parts of the app.|
71
-
|`bottomNavigationBarHeight`| This is requires when using custom height to adjust body height. This make no effect on **bottomNavigationBar**.|
71
+
|`bottomNavigationBarHeight`| This is required when using custom height to adjust body height. This makes no effect on **bottomNavigationBar**.|
72
72
|`bottomNavigationBar` | Snack bars slide from underneath the bottom navigation bar while bottom sheets are stacked on top. |
73
73
| `floatingActionButton` | A floating action button is a circular icon button that hovers over content to promote a primary action in the application. |
74
74
| `floatingActionButtonLocation` | An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.|
@@ -83,13 +83,13 @@ There are several options that allow for more control:
83
83
84
84
```dart
85
85
DraggableHome(
86
-
title: Text("Ttitle"),
86
+
title: Text("Title"),
87
87
headerWidget: headerWidget(),
88
88
body: [
89
89
Container(...),
90
90
91
91
// shrinkWrap true required for ListView.builder()
92
-
// disable the scroll for any verically scrollable widget
92
+
// disable the scroll for any vertically scrollable widget
93
93
// provide top padding 0 to fix extra space in listView
94
94
ListView.builder(
95
95
padding: EdgeInsets.only(top: 0),
@@ -125,21 +125,21 @@ DraggableHome(
125
125
126
126
## Contributions
127
127
128
-
Contributions are welcomed!
128
+
Contributions are welcome!
129
129
130
-
If you feel that a hook is missing, feel free to open a pull-request.
130
+
If you feel that a hook is missing, feel free to open a Pull Request.
131
131
132
-
For a custom-hook to be merged, you will need to do the following:
132
+
For a customhook to be merged, you will need to do the following:
133
133
134
-
- Describe the use-case.
134
+
- Describe the usecase.
135
135
136
136
- Open an issue explaining why we need this hook, how to use it, ...
137
-
This is important as a hook will not get merged if the hook doens't appeal to
137
+
This is important as a hook will not get merged if the hook doesn't appeal to
138
138
a large number of people.
139
139
140
140
- If your hook is rejected, don't worry! A rejection doesn't mean that it won't
141
-
be merged later in the future if more people shows an interest in it.
142
-
In the mean-time, feel free to publish your hook as a package on https://pub.dev.
141
+
be merged later in the future if more people show an interest in it.
142
+
In the meantime, feel free to publish your hook as a package on https://pub.dev.
143
143
144
-
- A hook will not be merged unles fully tested, to avoid breaking it inadvertendly
144
+
- A hook will not be merged unless fully tested, to avoid breaking it inadvertently
0 commit comments