feat: Integrate sync status indicators in app title bar and home screen
This commit is contained in:
@@ -7,6 +7,8 @@ class SearchAppBar extends StatefulWidget {
|
||||
this.onLeadingPressed,
|
||||
this.leadingIcon = Icons.menu,
|
||||
this.leadingTooltip = 'Menú',
|
||||
this.leadingWidget,
|
||||
this.trailingWidget,
|
||||
this.onSearchChanged,
|
||||
this.searchHint = 'Buscar notas...',
|
||||
this.showSearch = true,
|
||||
@@ -17,6 +19,8 @@ class SearchAppBar extends StatefulWidget {
|
||||
final VoidCallback? onLeadingPressed;
|
||||
final IconData leadingIcon;
|
||||
final String leadingTooltip;
|
||||
final Widget? leadingWidget;
|
||||
final Widget? trailingWidget;
|
||||
final ValueChanged<String>? onSearchChanged;
|
||||
final String searchHint;
|
||||
final bool showSearch;
|
||||
@@ -67,6 +71,10 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
splashRadius: 18,
|
||||
constraints: const BoxConstraints(minWidth: 40, minHeight: 40),
|
||||
),
|
||||
if (widget.leadingWidget != null) ...[
|
||||
const SizedBox(width: 8),
|
||||
Center(child: widget.leadingWidget!),
|
||||
],
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: widget.showSearch
|
||||
@@ -151,6 +159,10 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.trailingWidget != null) ...[
|
||||
const SizedBox(width: 8),
|
||||
Center(child: widget.trailingWidget!),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user