site-www icon indicating copy to clipboard operation
site-www copied to clipboard

Add Documentation on redirecting factory constructor

Open shihaohong opened this issue 6 years ago • 2 comments

The Language spec defines implementation for the following syntax: factory Listenable.merge(List<Listenable> listenables) = _MergingListenable

This can be found in the Dart Language Specification, but not in the language tour. This syntax could be made more visible.

Related: https://github.com/flutter/flutter/issues/35727

shihaohong avatar Jul 08 '19 17:07 shihaohong

Thanks for the issue, @shihaohong. I hadn't seen this syntax before.

kwalrath avatar Oct 21 '19 23:10 kwalrath

This section of the language tour only shows the syntax for redirecting generative constructors.

https://github.com/dart-lang/site-www/blob/main/src/_guides/language/language-tour.md#redirecting-constructors

swch01 avatar Sep 28 '22 03:09 swch01

Looks like this can be added at this page location: https://dart.dev/language/constructors#factory-constructors

atsansone avatar Apr 06 '23 16:04 atsansone