restore options date display ui fix

This commit is contained in:
julian 2022-10-20 11:09:15 -06:00
parent a9e3b7696e
commit 6d77ecad3f
2 changed files with 8 additions and 9 deletions

View file

@ -273,6 +273,7 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
// if (!isDesktop) // if (!isDesktop)
RestoreFromDatePicker( RestoreFromDatePicker(
onTap: chooseDate, onTap: chooseDate,
controller: _dateController,
), ),
// if (isDesktop) // if (isDesktop)

View file

@ -5,10 +5,14 @@ import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
class RestoreFromDatePicker extends StatefulWidget { class RestoreFromDatePicker extends StatefulWidget {
const RestoreFromDatePicker({Key? key, required this.onTap}) const RestoreFromDatePicker({
: super(key: key); Key? key,
required this.onTap,
required this.controller,
}) : super(key: key);
final VoidCallback onTap; final VoidCallback onTap;
final TextEditingController controller;
@override @override
State<RestoreFromDatePicker> createState() => _RestoreFromDatePickerState(); State<RestoreFromDatePicker> createState() => _RestoreFromDatePickerState();
@ -21,17 +25,11 @@ class _RestoreFromDatePickerState extends State<RestoreFromDatePicker> {
@override @override
void initState() { void initState() {
onTap = widget.onTap; onTap = widget.onTap;
_dateController = TextEditingController(); _dateController = widget.controller;
super.initState(); super.initState();
} }
@override
void dispose() {
_dateController.dispose();
super.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(