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-08-03 22:13:50 +02:00
|
|
|
|
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(
|
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),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
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
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2021-09-07 00:05:33 +02:00
|
|
|
}
|