Solli Moreira Honorio
Solli Moreira Honorio

Reputation: 31

What does the operator "=" means in class declaration in Dart?

In my studies of Dart languages, I found some packaged using this kind of class declaration:


class _Base = Authentication with Utilities, Validators;

I don't understand what the operator = is doing here, is it a kind of alias?

Upvotes: 0

Views: 48

Answers (1)

David
David

Reputation: 924

Is a shortcut to create inherit classes with mixins.

The example is same to:

class _Base extends Authentication with Utilities, Validators{
  _Base(): super(); // or with args
}

Utilities and validators are mixins.

Upvotes: 1

Related Questions