Skip to content

Commit 45f7512

Browse files
committed
v1.0.2
1 parent 2539ddc commit 45f7512

File tree

5 files changed

+52
-6
lines changed

5 files changed

+52
-6
lines changed

example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class HomePage extends StatelessWidget {
2121
@override
2222
Widget build(BuildContext context) {
2323
return DraggableHome(
24+
leading: Icon(Icons.arrow_back_ios),
2425
title: Text("Draggable Home"),
2526
actions: [
2627
IconButton(onPressed: () {}, icon: Icon(Icons.settings)),

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ packages:
5656
path: ".."
5757
relative: true
5858
source: path
59-
version: "1.0.1"
59+
version: "1.0.2"
6060
fake_async:
6161
dependency: transitive
6262
description:

lib/draggable_home.dart

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,72 @@ class DraggableHome extends StatefulWidget {
88
@override
99
_DraggableHomeState createState() => _DraggableHomeState();
1010

11+
/// Leading: A widget to display before the toolbar's title.
1112
final Widget? leading;
13+
14+
/// Title: A Widget to display title in AppBar
1215
final Widget title;
16+
17+
/// Center Title: Allows toggling of title from the center. By default title is in the center.
1318
final bool centerTitle;
19+
20+
/// Action: A list of Widgets to display in a row after the title widget.
1421
final List<Widget>? actions;
22+
23+
/// Always Show Leading And Action : This make Leading and Action always visible. Default value is false.
1524
final bool alwaysShowLeadingAndAction;
25+
26+
/// Drawer: Drawers are typically used with the Scaffold.drawer property.
1627
final Widget? drawer;
28+
29+
/// Header Expanded Height : 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 stretchMaxHeigh
1730
final double headerExpandedHeight;
31+
32+
/// Header Widget: A widget to display Header above body.
1833
final Widget headerWidget;
34+
35+
/// headerBottomBar: AppBar or toolBar like widget just above the body.
36+
1937
final Widget? headerBottomBar;
38+
39+
/// backgroundColor: The color of the Material widget that underlies the entire DraggableHome body.
2040
final Color? backgroundColor;
41+
42+
/// 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 value to 0.
2143
final double curvedBodyRadius;
44+
45+
/// body: A widget to Body
2246
final List<Widget> body;
47+
48+
/// fullyStretchable: Allows toggling of fully expand draggability of the DraggableHome. Set this to true to allow the user to fully expand the header.
2349
final bool fullyStretchable;
50+
51+
/// stretchTriggerOffset: The offset of overscroll required to fully expand the header.
2452
final double stretchTriggerOffset;
53+
54+
/// expandedBody: A widget to display when fully expanded as header or expandedBody above body.
2555
final Widget? expandedBody;
56+
57+
/// 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
2658
final double stretchMaxHeight;
59+
60+
/// floatingActionButton: An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.
2761
final Widget? floatingActionButton;
62+
63+
/// 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.
2864
final Widget? bottomSheet;
65+
66+
/// bottomNavigationBarHeight: This is requires when using custom height to adjust body height. This make no effect on bottomNavigationBar.
2967
final double? bottomNavigationBarHeight;
68+
69+
/// bottomNavigationBar: Snack bars slide from underneath the bottom navigation bar while bottom sheets are stacked on top.
3070
final Widget? bottomNavigationBar;
71+
72+
/// floatingActionButtonLocation: An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.
73+
3174
final FloatingActionButtonLocation? floatingActionButtonLocation;
75+
76+
/// floatingActionButtonAnimator: Provider of animations to move the FloatingActionButton between FloatingActionButtonLocations.
3277
final FloatingActionButtonAnimator? floatingActionButtonAnimator;
3378

3479
/// This will create DraggableHome.

pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0"
10+
version: "2.6.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -99,7 +99,7 @@ packages:
9999
name: source_span
100100
url: "https://pub.dartlang.org"
101101
source: hosted
102-
version: "1.8.0"
102+
version: "1.8.1"
103103
stack_trace:
104104
dependency: transitive
105105
description:
@@ -134,7 +134,7 @@ packages:
134134
name: test_api
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137-
version: "0.2.19"
137+
version: "0.3.0"
138138
typed_data:
139139
dependency: transitive
140140
description:

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: draggable_home
22
description: Draggable is a library for adding a beautiful draggable home page
3-
version: 1.0.1
3+
version: 1.0.2
44
repository: https://github.com/4-alok/draggable_home
5-
documentation: https://github.com/4-alok/draggable_home/edit/master/README.md
5+
documentation: https://github.com/4-alok/draggable_home/blob/main/README.md
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"

0 commit comments

Comments
 (0)