2021-03-05 22:12:04 +01:00
|
|
|
import 'package:flutter/material.dart';
|
2021-08-03 22:13:50 +02:00
|
|
|
import 'package:jisho_study_tool/view/components/search/language_selector.dart';
|
2021-03-05 22:12:04 +01:00
|
|
|
|
|
|
|
class SearchBar extends StatelessWidget {
|
2021-08-03 22:13:50 +02:00
|
|
|
const SearchBar();
|
|
|
|
|
2021-03-05 22:12:04 +01:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
TextField(
|
2021-09-07 00:05:33 +02:00
|
|
|
onSubmitted: (text) =>
|
|
|
|
Navigator.pushNamed(context, '/search', arguments: text),
|
2021-03-05 22:12:04 +01:00
|
|
|
controller: TextEditingController(),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
labelText: 'Search',
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 10.0,
|
|
|
|
),
|
|
|
|
LanguageSelector()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2021-09-07 00:05:33 +02:00
|
|
|
}
|