Commit c93c03d5 by Rizal Hermawan

rollback to c724d3a1

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