What are the four pillars of OOP and how does Dart implement them?
Encapsulation (private fields with _prefix), Inheritance (extends), Polymorphism (override + dynamic dispat...
15 questions
Dart OOP, SOLID principles, design patterns
Encapsulation (private fields with _prefix), Inheritance (extends), Polymorphism (override + dynamic dispat...
Mixins are reusable code units that can be applied to multiple classes using 'with'. They provide implement...
Abstract classes can have method implementations and state; subclasses use extends and inherit them. Interf...
Inheritance creates tight coupling and fragile base classes — a change in the parent can break all subclass...
Flutter uses Singleton (services, GetIt), Factory (Widget.of()), Observer (Listenable, Stream, ChangeNotifi...
SOLID: Single Responsibility (one class, one reason to change), Open/Closed (extend don't modify), Liskov (...
Generics let you write type-safe, reusable code. List<T> works for any type while catching mismatches at co...
Extension methods add functionality to existing types without subclassing. 'extension StringX on String { b...
A callable class implements the call() method, letting instances be invoked like functions. Operator overlo...
Dart 2.17+ enums can have fields, methods, constructors, and implement interfaces. Dart 3 sealed classes + ...
late defers initialization of a non-nullable variable until first access. Use it for: circular dependencies...
Records are anonymous, immutable value types: (String, int) or (name: String, age: int). They have structur...
Isolates are Dart's concurrency model — independent workers with their own memory heap. They communicate on...
Streams represent asynchronous sequences of values. Single-subscription streams can have one listener (file...
DI provides dependencies from outside rather than creating them inside a class. GetIt is Flutter's go-to se...