buildEnterPasswordUI method

Widget buildEnterPasswordUI()

Implementation

Widget buildEnterPasswordUI() {
  return CupertinoAlertDialog(
    title: Text(Strings.meetingPassword),
    content: Container(
        margin: EdgeInsets.only(top: 10),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            CupertinoTextField(
                key: MeetingCoreValueKey.inputMeetingPassword,
                autofocus: true,
                controller: _textFieldController,
                placeholder: Strings.inputMeetingPassword,
                placeholderStyle: const TextStyle(
                  fontSize: 13,
                  color: CupertinoColors.placeholderText,
                ),
                keyboardType: TextInputType.visiblePassword,
                obscureText: true,
                onChanged: _onTextChanged,
                onEditingComplete: canRetryJoining() ? _verifyPassword : null,
                textInputAction: TextInputAction.go,
                clearButtonMode: OverlayVisibilityMode.editing,
                inputFormatters: [
                  LengthLimitingTextInputFormatter(
                      NEMeetingConstants.meetingPasswordMaxLen),
                  FilteringTextInputFormatter.allow(RegExp(r'[0-9a-zA-Z]')),
                ],
                suffix: buildSuffix()),
          ],
        )),
    actions: <Widget>[
      CupertinoDialogAction(
        child: Text(Strings.cancel),
        onPressed: cancel,
      ),
      CupertinoDialogAction(
          key: MeetingCoreValueKey.inputMeetingPasswordJoinMeeting,
          child: Text(Strings.joinMeeting),
          onPressed: canRetryJoining() ? _verifyPassword : null),
    ],
  );
}