import 'package:flutter/material.dart';
import 'package:plugin_basic/basic_export.dart';

class LoginState {
  //表单的校验与数据
  final Map<String, Map<String, dynamic>> formData = {
    'code': {
      'value': '',
      'controller': TextEditingController(),
      'focusNode': FocusNode(),
      'hintText': 'Please enter your email'.tr,
      'obsecure': false,
    },
    'password': {
      'value': '',
      'controller': TextEditingController(),
      'focusNode': FocusNode(),
      'hintText': 'Please enter your password'.tr,
      'obsecure': true,
    },
  };

  //登录的功能选项
  final loginOption = ['Sign in/Sign out'.tr, 'Admin'.tr];

  //登录选项默认选中索引为0  (0是签到签出 , 1是管理员)
  int loginOptionPosition = 0;

  //是否明文展示密码
  bool pwdVisibility = false;

  //表单的错误信息展示
  String? codeErrorText;
  String? passwordErrorText;

  //待提交的表单数据
  String? code;
  String? password;
}
