Skip to content

Commit 75b7ed2

Browse files
authored
Added height for wrapper container (#26)
1 parent df3a8e3 commit 75b7ed2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/src/anim_search_widget.dart

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AnimSearchBar extends StatefulWidget {
2222
/// textFieldIconColor - Color ,isRequired : No
2323
2424
final double width;
25+
final double height;
2526
final TextEditingController textController;
2627
final Icon? suffixIcon;
2728
final Icon? prefixIcon;
@@ -51,7 +52,10 @@ class AnimSearchBar extends StatefulWidget {
5152
this.suffixIcon,
5253
this.prefixIcon,
5354
this.helpText = "Search...",
54-
55+
56+
/// Height of wrapper container
57+
this.height = 100,
58+
5559
/// choose your custom color
5660
this.color = Colors.white,
5761

@@ -70,7 +74,7 @@ class AnimSearchBar extends StatefulWidget {
7074

7175
/// The onSubmitted cannot be null
7276
required this.onSubmitted,
73-
77+
7478
/// make the search bar to open from right to left
7579
this.rtl = false,
7680

@@ -130,7 +134,7 @@ class _AnimSearchBarState extends State<AnimSearchBar>
130134
@override
131135
Widget build(BuildContext context) {
132136
return Container(
133-
height: 100.0,
137+
height: height,
134138

135139
///if the rtl is true, search bar will be from right to left
136140
alignment: widget.rtl ? Alignment.centerRight : Alignment(-1.0, 0.0),

0 commit comments

Comments
 (0)