How can I perform Multiple Constraints in Generic class in dart lang
class ClassA<T implements ClassB<T> & ClassC<T>> {
}
Like C# Code
class EmployeeList<T> where T : Employee, IEmployee, System.IComparable<T>, new()
{
// ...
}
That is not possible.
The best thing you can have is to make an abstract class that implement both interfaces at once, and use that as constraints instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With