Jisho-Study-Tool/lib/view/components/search/search_bar.dart

32 lines
851 B
Dart
Raw Permalink Normal View History

2021-03-05 22:12:04 +01:00
import 'package:flutter/material.dart';
2021-12-01 23:09:53 +01:00
import 'language_selector.dart';
2021-03-05 22:12:04 +01:00
class SearchBar extends StatelessWidget {
2021-12-01 23:09:53 +01:00
const SearchBar({Key? key}) : super(key: key);
2021-03-05 22:12:04 +01:00
@override
Widget build(BuildContext context) {
return Container(
2021-12-01 23:09:53 +01:00
padding: const EdgeInsets.symmetric(horizontal: 20.0),
2021-03-05 22:12:04 +01:00
child: Column(
children: [
TextField(
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),
),
),
),
2021-12-06 20:26:52 +01:00
const SizedBox(height: 10.0),
2021-12-01 23:09:53 +01:00
const LanguageSelector()
2021-03-05 22:12:04 +01:00
],
),
);
}
}