Intermediate
Flutter
Q72 / 100
What is a Dart extension method?
Correct! Well done.
Incorrect.
The correct answer is B) A way to add new methods, getters, or operators to existing types without subclassing or modifying the original class
B
Correct Answer
A way to add new methods, getters, or operators to existing types without subclassing or modifying the original class
Explanation
Dart extension methods allow you to add new functionality to existing types — even types you don't own — without subclassing. Defined with the extension keyword. Example: adding .isNullOrEmpty getter to String.
Progress
72/100