diff --git a/lib/src/screens/settings/widgets/settings_picker_cell.dart b/lib/src/screens/settings/widgets/settings_picker_cell.dart index 1da2d6fc1..8dd5c8c2c 100644 --- a/lib/src/screens/settings/widgets/settings_picker_cell.dart +++ b/lib/src/screens/settings/widgets/settings_picker_cell.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; -class SettingsPickerCell extends StandardListRow { +class SettingsPickerCell extends StandardListRow { SettingsPickerCell( {required String title, required this.selectedItem, diff --git a/lib/src/widgets/picker.dart b/lib/src/widgets/picker.dart index 36aafe5aa..f26ff3ee2 100644 --- a/lib/src/widgets/picker.dart +++ b/lib/src/widgets/picker.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_close_button.dart'; -class Picker extends StatefulWidget { +class Picker extends StatefulWidget { Picker({ required this.selectedAtIndex, required this.items, @@ -39,7 +39,7 @@ class Picker extends StatefulWidget { _PickerState createState() => _PickerState(items, images, onItemSelected); } -class _PickerState extends State { +class _PickerState extends State> { _PickerState(this.items, this.images, this.onItemSelected); final Function(Item) onItemSelected; @@ -59,7 +59,7 @@ class _PickerState extends State { images = []; for (int i=0;i extends State { child: Padding( padding: EdgeInsets.only(left: image != null ? 12 : 0), child: Text( - // What a hack (item as) ? - widget.displayItem?.call(item as Object) ?? item.toString(), + widget.displayItem?.call(item) ?? item.toString(), style: TextStyle( fontSize: 14, fontFamily: 'Lato',