Add Auto field to search bar

JST-11
Oystein Kristoffer Tveit 2020-07-10 23:50:19 +02:00
parent e0df989359
commit bfd689162b
2 changed files with 11 additions and 15 deletions

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
class _LanguageOption extends StatelessWidget {
final String _language;
final Color _color;
@override
Widget build(BuildContext context) {
@ -16,12 +17,13 @@ class _LanguageOption extends StatelessWidget {
color: Colors.black,
width: 1.0,
),
color: _color
),
),
);
}
_LanguageOption(this._language);
_LanguageOption(this._language, this._color);
}
class SearchBar extends StatelessWidget {
@ -45,8 +47,9 @@ class SearchBar extends StatelessWidget {
),
Row(
children: [
_LanguageOption('English'),
_LanguageOption('Japanese'),
_LanguageOption('Auto', Colors.white),
_LanguageOption('English', Colors.white),
_LanguageOption('Japanese', Colors.blue),
],
),
],

View File

@ -22,13 +22,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
@ -49,7 +42,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.13"
version: "1.14.12"
csslib:
dependency: transitive
description:
@ -134,7 +127,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
version: "0.12.6"
meta:
dependency: transitive
description:
@ -237,14 +230,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
version: "0.2.16"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.1.6"
unofficial_jisho_api:
dependency: "direct main"
description:
@ -295,5 +288,5 @@ packages:
source: hosted
version: "2.0.8"
sdks:
dart: ">=2.9.0-14.0.dev <3.0.0"
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.16.0 <2.0.0"