forked from eatvio/eatvio_app
fix(chat): image and clear search bar
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_cubit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ChatSearchBarWidget extends StatelessWidget {
|
||||
@@ -25,6 +26,7 @@ class ChatSearchBarWidget extends StatelessWidget {
|
||||
this.filled = true,
|
||||
this.validator,
|
||||
this.onChanged,
|
||||
required this.onSuffixIconTap,
|
||||
}) : super(key: key);
|
||||
|
||||
final Alignment? alignment;
|
||||
@@ -69,6 +71,8 @@ class ChatSearchBarWidget extends StatelessWidget {
|
||||
|
||||
final Function(String)? onChanged;
|
||||
|
||||
final Function() onSuffixIconTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return searchViewWidget(context);
|
||||
@@ -111,7 +115,10 @@ class ChatSearchBarWidget extends StatelessWidget {
|
||||
),
|
||||
suffixIcon: suffix ??
|
||||
IconButton(
|
||||
onPressed: () => controller!.clear(),
|
||||
onPressed: () {
|
||||
controller!.clear();
|
||||
onSuffixIconTap();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.clear,
|
||||
color: Colors.grey.shade600,
|
||||
|
||||
Reference in New Issue
Block a user