Add search tip to kanji search
This commit is contained in:
parent
6aab6d57bc
commit
fd49244b1d
|
@ -93,8 +93,16 @@ class _KanjiSearchBodyState extends State<KanjiSearchBody>
|
||||||
AnimatedSizeAndFade(
|
AnimatedSizeAndFade(
|
||||||
fadeDuration: const Duration(milliseconds: 200),
|
fadeDuration: const Duration(milliseconds: 200),
|
||||||
sizeDuration: const Duration(milliseconds: 300),
|
sizeDuration: const Duration(milliseconds: 300),
|
||||||
child: _controller.value == 1
|
child: (_controller.value == 1 && suggestions.isNotEmpty)
|
||||||
? KanjiGrid(suggestions: suggestions)
|
? KanjiGrid(suggestions: suggestions)
|
||||||
|
: (_controller.value == 1)
|
||||||
|
? const Text(
|
||||||
|
'Type a kanji to start searching',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
)
|
||||||
: const KanjiSearchOptionsBar(),
|
: const KanjiSearchOptionsBar(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -53,7 +53,6 @@ class KanjiSearchBarState extends State<KanjiSearchBar> {
|
||||||
onChanged: (text) => onChanged(),
|
onChanged: (text) => onChanged(),
|
||||||
onSubmitted: (_) => {},
|
onSubmitted: (_) => {},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
prefixIcon: const Icon(Icons.search),
|
|
||||||
hintText: 'Search',
|
hintText: 'Search',
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
|
Loading…
Reference in New Issue