skip to Main Content

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


  1. That’s a redirecting constructor in the same class. Look at BorderRadius.only for its definition.

    Login or Signup to reply.
  2. It’s a redirecting constructor.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search