Skip to content

Commit

Permalink
removed memories search bar component
Browse files Browse the repository at this point in the history
  • Loading branch information
josancamon19 committed Sep 15, 2024
1 parent 88dc38c commit 7d1410b
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions app/lib/pages/memories/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,62 +112,6 @@ class _MemoriesPageState extends State<MemoriesPage> with AutomaticKeepAliveClie
},
child: CustomScrollView(
slivers: [
SliverToBoxAdapter(child: SizedBox(height: isEmpty || !displaySearchBar ? 0 : 32)),
isEmpty || !displaySearchBar
? const SliverToBoxAdapter(child: SizedBox())
: SliverToBoxAdapter(
child: Container(
width: double.maxFinite,
padding: const EdgeInsets.fromLTRB(16, 8, 8, 0),
margin: const EdgeInsets.fromLTRB(18, 0, 18, 0),
decoration: const BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.all(Radius.circular(16)),
border: GradientBoxBorder(
gradient: LinearGradient(colors: [
Color.fromARGB(127, 208, 208, 208),
Color.fromARGB(127, 188, 99, 121),
Color.fromARGB(127, 86, 101, 182),
Color.fromARGB(127, 126, 190, 236)
]),
width: 1,
),
shape: BoxShape.rectangle,
),
child: Consumer<HomeProvider>(builder: (context, home, child) {
return TextField(
enabled: true,
controller: textController,
onChanged: (s) {
memoryProvider.filterMemories(s);
},
obscureText: false,
autofocus: false,
focusNode: home.memoryFieldFocusNode,
decoration: InputDecoration(
hintText: 'Search for memories...',
hintStyle: const TextStyle(fontSize: 14.0, color: Colors.grey),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
suffixIcon: textController.text.isEmpty
? const SizedBox.shrink()
: IconButton(
icon: const Icon(
Icons.cancel,
color: Color(0xFFF7F4F4),
size: 28.0,
),
onPressed: () {
textController.clear();
memoryProvider.initFilteredMemories();
},
),
),
style: TextStyle(fontSize: 14.0, color: Colors.grey.shade200),
);
}),
),
),
const SliverToBoxAdapter(child: SizedBox(height: 32)),
SliverToBoxAdapter(child: getMemoryCaptureWidget()),
if (memoryProvider.memoriesWithDates.isEmpty && !memoryProvider.isLoadingMemories)
Expand Down

0 comments on commit 7d1410b

Please sign in to comment.