Can someone explain to me the script’s (given below) constructor, what ‘: this.only’ means:
class BorderRadius extends BorderRadiusGeometry {
const BorderRadius.all(Radius radius) : this.only(
topLeft: radius,
topRight: radius,
bottomLeft: radius,
bottomRight: radius,
);
I am learning Dart and trying to understand the class/widgets of flutter and it’s built code.
Thank you.
2
Answers
That’s a redirecting constructor in the same class. Look at BorderRadius.only for its definition.
It’s a redirecting constructor.