Bug fixs.

This commit is contained in:
stonegate 2020-07-29 20:12:07 +08:00
parent 814628ce3d
commit 579bcd7125
2 changed files with 3 additions and 3 deletions

View File

@ -318,9 +318,9 @@ class DBHelper {
List<Map> list = await dbClient.rawQuery(
"SELECT seconds FROM PlayHistory WHERE add_date > ? AND add_date < ?",
[start, end]);
var sum = 0;
var sum = 0.0;
if (list.isEmpty) {
sum = 0;
sum = 0.0;
} else {
for (var record in list) {
sum += record['seconds'];

View File

@ -521,7 +521,7 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
// it. This scroll offset is only accurate for fixed height menu items
// (the default).
final scrollOffset = preferredMenuHeight <= maxMenuHeight
? 0
? 0.0
: math.max(0.0, selectedItemOffset - (buttonTop - menuTop));
return _MenuLimits(menuTop, menuBottom, menuHeight, scrollOffset);