You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static or factory contructors inside extensions are not supported yet, so for now, if async constructors needed, they can only be placed inside classes.
classCLAHEextendsCvStruct<cvg.CLAHE> {
CLAHE._(cvg.CLAHEPtr ptr, [bool attach =true]) :super.fromPointer(ptr) {
if (attach) {
finalizer.attach(this, ptr.cast(), detach:this);
}
}
factoryCLAHE.empty() {
final p = calloc<cvg.CLAHE>();
CFFI.CLAHE_Create(p);
returnCLAHE._(p);
}
factoryCLAHE.emptyAsync() {...}
}
However, async non-static functions can be placed in extensions:
async object detect #115 (comment)
async object detect #115 (comment)
https://github.com/dart-lang/language/blob/main/working/0107%20-%20implicit-constructors/feature-specification.md
Static extension methods dart-lang/language#723
The text was updated successfully, but these errors were encountered: