简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM