querySelector function
- @Deprecated('Directly use document.querySelector instead.')
- String selector
Finds and returns the first element within the document
that matches the specified CSS selector string.
If no match is found, null is returned.
Deprecated in favor of querying directly on the document:
final dartDiv = document.querySelector('div.dart');
Implementation
@Deprecated('Directly use document.querySelector instead.')
Element? querySelector(String selector) => document.querySelector(selector);