Skip to content

Commit

Permalink
Tweak CitySearchBox
Browse files Browse the repository at this point in the history
  • Loading branch information
bizz84 committed Nov 23, 2023
1 parent cf864f7 commit 0815103
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions lib/src/features/weather/presentation/city_search_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class _CitySearchRowState extends ConsumerState<CitySearchBox> {
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: SizedBox(
height: 50,
child: SizedBox(
height: _radius * 2,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: TextField(
controller: _searchController,
textAlign: TextAlign.center,
Expand All @@ -46,38 +46,38 @@ class _CitySearchRowState extends ConsumerState<CitySearchBox> {
filled: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(_radius),
bottomLeft: Radius.circular(_radius)),
topLeft: Radius.circular(_radius),
bottomLeft: Radius.circular(_radius),
),
),
),
onSubmitted: (value) =>
ref.read(cityProvider.notifier).state = value,
),
),
),
InkWell(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: const BoxDecoration(
color: AppColors.accentColor,
borderRadius: BorderRadius.only(
topRight: Radius.circular(_radius),
bottomRight: Radius.circular(_radius),
InkWell(
child: Container(
alignment: Alignment.center,
decoration: const BoxDecoration(
color: AppColors.accentColor,
borderRadius: BorderRadius.only(
topRight: Radius.circular(_radius),
bottomRight: Radius.circular(_radius),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: Text('search',
style: Theme.of(context).textTheme.bodyLarge),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: Text('search',
style: Theme.of(context).textTheme.bodyLarge),
),
),
onTap: () {
FocusScope.of(context).unfocus();
ref.read(cityProvider.notifier).state = _searchController.text;
},
)
],
onTap: () {
FocusScope.of(context).unfocus();
ref.read(cityProvider.notifier).state = _searchController.text;
},
)
],
),
),
);
}
Expand Down

0 comments on commit 0815103

Please sign in to comment.