From 8d2afa2a5db643a5a3c4b96659116c14b4ae8989 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 16 Oct 2021 13:32:41 +0800 Subject: [PATCH] lint: Fix invalid assignment Fix error: A value of type 'dynamic' can't be assigned to a variable of type 'int'. (invalid_assignment at [sanmill] lib/shared/picker.dart:76) --- src/ui/flutter_app/lib/shared/picker.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/flutter_app/lib/shared/picker.dart b/src/ui/flutter_app/lib/shared/picker.dart index 3a9ac9a6..13c2f945 100644 --- a/src/ui/flutter_app/lib/shared/picker.dart +++ b/src/ui/flutter_app/lib/shared/picker.dart @@ -71,9 +71,9 @@ Future showPickerNumber( ), onConfirm: (Picker picker, List value) async { debugPrint(value.toString()); - final selectValues = picker.getSelectedValues(); + final List selectValues = picker.getSelectedValues(); debugPrint(selectValues.toString()); - selectValue = selectValues[0]; + selectValue = selectValues[0] as int; }, ).showDialog(context);