import 'package:flutter/material.dart';

class OtpViewModel extends ChangeNotifier {
  var formKey = GlobalKey<FormState>();
  var focusNode = FocusNode();
  bool buttonIsActive = false;

  TextEditingController ctrlPin = TextEditingController();

  Future<bool> validateOtp(String pin) async {
    final pinLength = pin.length;
    if (pinLength == 4) {
      return true;
    }
    return false;
  }

  void enableButton({bool isActive = true}) {
    buttonIsActive = isActive;
    notifyListeners();
  }
}
