Skip to content

Implement error handling #71

Description

@github-actions

https://github.com/Erengun/pati-pati-app/blob/54a1a685cc0f71eb78ed321294ed3acf277b76f9/lib/ui/features/auth/number_input_screen.dart#L75

                key: formKey,
                child: TextFormField(
                  controller: numberController,
                  inputFormatters: <TextInputFormatter>[
                    MaskTextInputFormatter(
                      initialText: '+90',
                      mask: '+__ ___ ___ ____',
                      filter: <String, RegExp>{'_': RegExp(r'[0-9]')},
                    ),
                  ],
                  validator: (String? value) {
                    if (value!.isEmpty) {
                      return 'Lütfen telefon numaranızı giriniz';
                    } else {
                      ///TODO: Implement error handling
                      ref
                          .read(loginLogicProvider.notifier)
                          .verifyPhoneNumber(value)
                          .catchError((Object e) {
                        debugPrint(e.toString());
                        return false;
                      }).then((bool result) {
                        if (result) {
                          context.push(SGRoute.otp.route);
                        }
                      });
                    }
                    return null;
                  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions