isValid property

bool get isValid

Whether there is at least one field and every field meets its rules.

Implementation

bool get isValid =>
    _fields.isNotEmpty && _fields.values.every((check) => check());