Skip to content

Commit

Permalink
update Search border Color
Browse files Browse the repository at this point in the history
  • Loading branch information
maheshj01 committed Jun 17, 2021
1 parent 5136b38 commit 8f84d1f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/widgets/search.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:flutter/material.dart';
import 'package:vocabhub/exports.dart';
import 'package:vocabhub/main.dart';
import 'package:vocabhub/pages/home.dart';

class SearchBuilder extends StatefulWidget {
Expand All @@ -22,14 +24,20 @@ class _SearchBuilderState extends State<SearchBuilder> {

@override
Widget build(BuildContext context) {
bool isDark = darkNotifier.value;
return Container(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: TextField(
controller: searchController,
decoration: InputDecoration(
focusedBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: isDark ? Colors.white : primaryColor),
),
suffixIcon: searchController.text.isNotEmpty
? IconButton(
icon: Icon(Icons.clear),
icon: Icon(Icons.clear,
color: isDark ? Colors.white : primaryColor),
onPressed: () {
searchController.clear();
})
Expand Down

0 comments on commit 8f84d1f

Please sign in to comment.