TF-249 Change ui mailbox list
This commit is contained in:
@@ -38,7 +38,8 @@ class ThreadView extends GetWidget<ThreadController> {
|
||||
children: [
|
||||
_buildAppBarThread(context),
|
||||
Obx(() => !controller.isSearchActive()
|
||||
? (SearchBarThreadViewWidget(context, imagePaths)
|
||||
? (SearchBarThreadViewWidget(imagePaths)
|
||||
..hintTextSearch(AppLocalizations.of(context).hint_search_emails)
|
||||
..addOnOpenSearchViewAction(() => controller.enableSearch(context)))
|
||||
.build()
|
||||
: SizedBox.shrink()),
|
||||
|
||||
@@ -2,24 +2,20 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
typedef OnOpenSearchViewAction = Function();
|
||||
|
||||
class SearchBarThreadViewWidget {
|
||||
OnOpenSearchViewAction? _onOpenSearchViewAction;
|
||||
|
||||
final BuildContext _context;
|
||||
final ImagePaths _imagePaths;
|
||||
|
||||
double? _heightSearchBar;
|
||||
EdgeInsets? _padding;
|
||||
EdgeInsets? _margin;
|
||||
String? _hintTextSearch;
|
||||
|
||||
SearchBarThreadViewWidget(
|
||||
this._context,
|
||||
this._imagePaths,
|
||||
);
|
||||
SearchBarThreadViewWidget(this._imagePaths);
|
||||
|
||||
void addOnOpenSearchViewAction(OnOpenSearchViewAction onOpenSearchViewAction) {
|
||||
_onOpenSearchViewAction = onOpenSearchViewAction;
|
||||
@@ -37,6 +33,10 @@ class SearchBarThreadViewWidget {
|
||||
_margin = margin;
|
||||
}
|
||||
|
||||
void hintTextSearch(String text) {
|
||||
_hintTextSearch = text;
|
||||
}
|
||||
|
||||
Widget build() {
|
||||
return GestureDetector(
|
||||
onTap: () => _onOpenSearchViewAction?.call(),
|
||||
@@ -56,7 +56,7 @@ class SearchBarThreadViewWidget {
|
||||
children: [
|
||||
_buildSearchButton(),
|
||||
Text(
|
||||
AppLocalizations.of(_context).hint_search_emails,
|
||||
_hintTextSearch ?? '',
|
||||
style: TextStyle(fontSize: 17, color: AppColor.colorHintSearchBar),)
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user