import 'package:cs_resources/generated/l10n.dart';
import 'package:flutter/material.dart';

class SelectEstateState {
  //表单的校验与数据
  final Map<String, Map<String, dynamic>> formData;

  double remainingSpace;

  // ===================================  Begin  ↓  ===================================

  SelectEstateState({
    this.remainingSpace = 0,
    Map<String, Map<String, dynamic>>? formData,
  }) : formData = formData ??
            {
              'estate': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': S.current.type_here,
                'focusNode': FocusNode(),
                'obsecure': false,
              },
            };

  SelectEstateState copyWith({
    double? remainingSpace,
  }) {
    return SelectEstateState(
      remainingSpace: remainingSpace ?? this.remainingSpace,
    );
  }
}
