typedef OnTap = void Function(
String? url,
RenderContext context,
Map<String, String> attributes,
dom.Element? element,
);
...
/// A function that defines what to do when a link is tapped
final OnTap? onLinkTap;
Dart allow to use methods but not only closures in functional properties. So I can write such code
"That's unacceptable." is a bit harsh but you point is certainly valid and it's great you gave the solution. If you want you can make a PR or not and we will take care of it.
Dart allow to use methods but not only closures in functional properties. So I can write such code
And I have to put the
html
dependency in my project'spubspec.yaml
just to be able to use method instead of closure. That's unacceptable. This is the same mistake as the one described here https://dart-lang.github.io/linter/lints/library_private_types_in_public_api.htmlAs a solution you can write
export 'package:html/dom.dart' as dom;
in theflutter_html.dart
.