Compare commits
No commits in common. "58578c734e3a1ea80d7180f169fa727768ac5ff0" and "cfa61e1a8aa1fedf88e0067422cd657943f92133" have entirely different histories.
58578c734e
...
cfa61e1a8a
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
assets/icon.png
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 3.0 KiB |
@ -26,7 +26,7 @@ class _QueryScreenState extends State<QueryScreen> {
|
||||
setState(() => _isLoading = true);
|
||||
|
||||
final FoodDataController data = Get.find();
|
||||
if (data.getApiKey() == null || data.getApiKey()!.isEmpty) {
|
||||
if (data.getApiKey() == null) {
|
||||
setState(() => _hasApiKey = false);
|
||||
return;
|
||||
}
|
||||
@ -44,11 +44,7 @@ class _QueryScreenState extends State<QueryScreen> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
final FoodDataController data = Get.find();
|
||||
data.initialize(context).then((_) {
|
||||
setState(() {
|
||||
_hasApiKey = data.getApiKey() != null && data.getApiKey()!.isNotEmpty;
|
||||
});
|
||||
});
|
||||
data.initialize(context);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -49,5 +49,5 @@ const i18nEnglish = {
|
||||
'searchHint': 'Type keywords below to search',
|
||||
'searchNoKeyHint':
|
||||
'No API key, please first set up the API key in "Settings" > "Data Source"',
|
||||
'searchResultHint': '@count records matched (showing 100)',
|
||||
'searchResultHint': '@count records matched (up to the first 100)',
|
||||
};
|
||||
|
@ -42,5 +42,5 @@ const i18nSimplifiedChinese = {
|
||||
'loading': '加载中',
|
||||
'searchHint': '在下方键入关键词来搜索',
|
||||
'searchNoKeyHint': '无 API 令牌,请先在「设置」>「数据源」设置 API 密钥',
|
||||
'searchResultHint': '共命中 @count 条记录(显示前 100 条)',
|
||||
'searchResultHint': '共命中 @count 条记录(截取前 100 条)',
|
||||
};
|
||||
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
web/favicon.png
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.8 KiB |