Commit c93c03d5 by Rizal Hermawan

rollback to c724d3a1

parent 62865899
......@@ -20,8 +20,6 @@ class FloatingSearchBarAction extends StatelessWidget {
this.builder,
this.showIfOpened = false,
this.showIfClosed = true,
this.runCustomFunction = false,
this.customFunction
}) : assert(builder != null || child != null);
/// A hamburger menu that when tapped opens the [Drawer]
......@@ -83,8 +81,6 @@ class FloatingSearchBarAction extends StatelessWidget {
Duration duration = const Duration(milliseconds: 900),
String searchButtonSemanticLabel = 'Search',
String clearButtonSemanticLabel = 'Clear',
bool runCustomFunction = false,
void Function()? customFunction,
}) {
return FloatingSearchBarAction(
showIfOpened: true,
......@@ -105,9 +101,6 @@ class FloatingSearchBarAction extends StatelessWidget {
onTap: () {
if (!isEmpty) {
bar.clear();
if (runCustomFunction == true) {
customFunction!;
}
} else {
bar.isOpen =
!bar.isOpen || (!bar.hasFocus && bar.isAlwaysOpened);
......@@ -203,10 +196,6 @@ class FloatingSearchBarAction extends StatelessWidget {
/// and when closed.
bool get isAlwaysShown => showIfOpened && showIfClosed;
final bool runCustomFunction;
final void Function()? customFunction;
@override
Widget build(BuildContext context) {
return child ??
......
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