Skip to content

Commit

Permalink
Habits search field style
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasn committed Jun 22, 2023
1 parent ea36363 commit 7963eca
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed:
- Habits search field style

## [0.8.385] - 2023-06-22
### Changed
- Delete icon style
- Start new tag dialog with search field content
Expand Down
45 changes: 25 additions & 20 deletions lib/widgets/habits/habits_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,34 @@ class HabitsSearchWidget extends StatelessWidget {
margin: const EdgeInsets.symmetric(horizontal: 40),
height: 50,
padding: const EdgeInsets.symmetric(horizontal: 10),
child: SearchBar(
controller: controller,
leading: const Padding(
padding: EdgeInsets.only(left: 8),
child: Icon(Icons.search),
child: Theme(
data: Theme.of(context).copyWith(
inputDecorationTheme: const InputDecorationTheme(),
),
trailing: [
Visibility(
visible: cubit.state.searchString.isNotEmpty,
child: GestureDetector(
child: const Padding(
padding: EdgeInsets.only(right: 8),
child: Icon(Icons.close_rounded),
child: SearchBar(
controller: controller,
leading: const Padding(
padding: EdgeInsets.only(left: 8),
child: Icon(Icons.search),
),
trailing: [
Visibility(
visible: cubit.state.searchString.isNotEmpty,
child: GestureDetector(
child: const Padding(
padding: EdgeInsets.only(right: 8),
child: Icon(Icons.close_rounded),
),
onTap: () {
cubit.setSearchString('');
controller.clear();
FocusScope.of(context).requestFocus(FocusNode());
},
),
onTap: () {
cubit.setSearchString('');
controller.clear();
FocusScope.of(context).requestFocus(FocusNode());
},
),
),
],
onChanged: cubit.setSearchString,
],
onChanged: cubit.setSearchString,
),
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lotti
description: Achieve your goals and keep your data private with Lotti.
publish_to: 'none'
version: 0.9.385+2272
version: 0.9.386+2273

msix_config:
display_name: LottiApp
Expand Down

0 comments on commit 7963eca

Please sign in to comment.