Commit b0bd7f6a by Rizal Hermawan

add new parameters

parent 6ead27a4
......@@ -39,6 +39,8 @@ class AnimSearchBar extends StatefulWidget {
final List<TextInputFormatter>? inputFormatters;
final bool boxShadow;
final Function(String) onSubmitted;
final TextStyle? helpTextStyle;
final double helpTextContentPadding;
const AnimSearchBar({
Key? key,
......@@ -88,6 +90,12 @@ class AnimSearchBar extends StatefulWidget {
/// can add list of inputformatters to control the input
this.inputFormatters,
this.helpTextStyle = const TextStyle(
color: Color(0xff5B5B5B),
fontSize: 17.0,
fontWeight: FontWeight.w500,
),
this.helpTextContentPadding = 5.0,
}) : super(key: key);
@override
......@@ -274,15 +282,11 @@ class _AnimSearchBarState extends State<AnimSearchBar>
: TextStyle(color: Colors.black),
cursorColor: Colors.black,
decoration: InputDecoration(
contentPadding: const EdgeInsets.only(bottom: 5),
contentPadding: EdgeInsets.only(bottom: widget.helpTextContentPadding),
isDense: true,
floatingLabelBehavior: FloatingLabelBehavior.never,
labelText: widget.helpText,
labelStyle: TextStyle(
color: Color(0xff5B5B5B),
fontSize: 17.0,
fontWeight: FontWeight.w500,
),
labelStyle: widget.helpTextStyle,
alignLabelWithHint: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(20.0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment