-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
HtmlElementView.fromTagName currently has the following example in its dartdoc:
import 'package:flutter/widgets.dart';
import 'package:web/web.dart' as web;
// ...
class MyWidget extends StatelessWidget {
const MyWidget({super.key});
@override
Widget build(BuildContext context) {
return HtmlElementView.fromTagName(
tagName: 'div',
onElementCreated: (Object element) {
element as web.HTMLElement;
element.style
..backgroundColor = 'blue'
..border = '1px solid red';
},
);
}
}| /// Creates a platform view that creates a DOM element specified by [tagName]. |
#139696 is planning on removing the dependency to package:web in Flutter, so while the above code example is valid, it does not pass analysis as Flutter no longer depends on package:web. This example should now instead move to flutter.dev once that PR removes it from the dartdoc.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team