Add Auto field to search bar
parent
e0df989359
commit
bfd689162b
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class _LanguageOption extends StatelessWidget {
|
class _LanguageOption extends StatelessWidget {
|
||||||
final String _language;
|
final String _language;
|
||||||
|
final Color _color;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -16,12 +17,13 @@ class _LanguageOption extends StatelessWidget {
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
|
color: _color
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_LanguageOption(this._language);
|
_LanguageOption(this._language, this._color);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchBar extends StatelessWidget {
|
class SearchBar extends StatelessWidget {
|
||||||
|
@ -45,8 +47,9 @@ class SearchBar extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
_LanguageOption('English'),
|
_LanguageOption('Auto', Colors.white),
|
||||||
_LanguageOption('Japanese'),
|
_LanguageOption('English', Colors.white),
|
||||||
|
_LanguageOption('Japanese', Colors.blue),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
17
pubspec.lock
17
pubspec.lock
|
@ -22,13 +22,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
characters:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: characters
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0"
|
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -49,7 +42,7 @@ packages:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.14.13"
|
version: "1.14.12"
|
||||||
csslib:
|
csslib:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -134,7 +127,7 @@ packages:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.8"
|
version: "0.12.6"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -237,14 +230,14 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.17"
|
version: "0.2.16"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.1.6"
|
||||||
unofficial_jisho_api:
|
unofficial_jisho_api:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -295,5 +288,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.8"
|
version: "2.0.8"
|
||||||
sdks:
|
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"
|
flutter: ">=1.16.0 <2.0.0"
|
||||||
|
|
Loading…
Reference in New Issue