As we know we can use ternary operator like ? and : in Dart for control flow, like :
String name = 1 == 1 ? "Jhon" : "Ryan";
Is there anyway to make a parameter compulsory on condition ?
The Codes Below Did Not Work, It's Here Just For The Example
class Person{
final String name;
final int age;
const Person({ this.name, name != null ? @required this.age : this.age});
}