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

33 lines
891 B
Dart

import 'package:flutter/material.dart';
import '../../routing/routes.dart';
import 'language_selector.dart';
class SearchBar extends StatelessWidget {
const SearchBar({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Column(
children: [
TextField(
onSubmitted: (text) =>
Navigator.pushNamed(context, Routes.search, arguments: text),
controller: TextEditingController(),
decoration: InputDecoration(
labelText: 'Search',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),
),
),
),
const SizedBox(height: 10.0),
const LanguageSelector()
],
),
);
}
}