mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 12:07:58 -06:00
WIP - Reimplemented document search
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:paperless_mobile/core/widgets/material/search/m3_search.dart';
|
||||
import 'package:paperless_mobile/features/document_search/cubit/document_search_cubit.dart';
|
||||
import 'package:paperless_mobile/features/document_search/document_search_delegate.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class DocumentSearchBar extends StatelessWidget {
|
||||
const DocumentSearchBar({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
onTap: () => showMaterial3Search(
|
||||
context: context,
|
||||
delegate: DocumentSearchDelegate(
|
||||
DocumentSearchCubit(context.read()),
|
||||
searchFieldStyle: Theme.of(context).textTheme.bodyLarge,
|
||||
hintText: "Search documents",
|
||||
),
|
||||
),
|
||||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search documents",
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyLarge
|
||||
?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).colorScheme.surfaceVariant,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(56),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
prefixIcon: IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
},
|
||||
),
|
||||
constraints: const BoxConstraints(maxHeight: 48),
|
||||
),
|
||||
// title: Text(
|
||||
// "${S.of(context).documentsPageTitle} (${_formatDocumentCount(state.count)})",
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user