diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart index e25d80019..76e74fa14 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart @@ -273,6 +273,7 @@ class _RestoreOptionsViewState extends ConsumerState { // if (!isDesktop) RestoreFromDatePicker( onTap: chooseDate, + controller: _dateController, ), // if (isDesktop) diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_from_date_picker.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_from_date_picker.dart index 8a24e95bb..e5637cfc6 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_from_date_picker.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_from_date_picker.dart @@ -5,10 +5,14 @@ import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; class RestoreFromDatePicker extends StatefulWidget { - const RestoreFromDatePicker({Key? key, required this.onTap}) - : super(key: key); + const RestoreFromDatePicker({ + Key? key, + required this.onTap, + required this.controller, + }) : super(key: key); final VoidCallback onTap; + final TextEditingController controller; @override State createState() => _RestoreFromDatePickerState(); @@ -21,17 +25,11 @@ class _RestoreFromDatePickerState extends State { @override void initState() { onTap = widget.onTap; - _dateController = TextEditingController(); + _dateController = widget.controller; super.initState(); } - @override - void dispose() { - _dateController.dispose(); - super.dispose(); - } - @override Widget build(BuildContext context) { return Container(