Поля являются полями выбора, а другое - полем удостоверения личности. Это зависит от того, что вы выбираете, поле имеет другую проверку. Я получаю значение выбора, но при проверке поля оно не принимает значение
final _idController=StreamController<String>.broadcast();
String type = '';
// The controller to stream the final output to the required StreamBuilder
final _typeId = BehaviorSubject<String>();
Stream<String> get typeId => _typeId.stream;
// The controller to receive the input form the app elements
final _query = StreamController<String>();
Sink<String> get query => _query.sink;
Stream<String> get result => _query.stream;
// The business logic
OtherChargesController() {
result.listen((newType) {
// Listen for incoming input
type = newType; // Process the required data
_typeId.sink.add(type); // Stream the required output
});
//Form State
}
Stream<String> get id => _idController.stream.transform(type.contains('01') ? validPhysialId : type.contains('02') || type.contains('04') ? validaLegalAndNITEId : type.contains('03') ? validaDIMEXId : validaId);