Skip to content

Commit f6f7605

Browse files
authored
Update element_subclasses.dart
The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't. To fix this, we need to change the argument type to 'String'. This will tell the compiler that the argument is a non-nullable string, and the error will be resolved. Here are some additional details about the error: - The argument type 'String?' is a nullable string. This means that it can either be a string or null. - The parameter type 'Object' is a non-nullable object. This means that it can only be an object. - The compiler is trying to assign the argument 'text' to the parameter 'css', but the argument type is not compatible with the parameter type. - To fix this, we need to change the argument type to 'String'. This will tell the compiler that the argument is a non-nullable string, and the error will be resolved.
1 parent 46b23aa commit f6f7605

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/src/html/dom/element_subclasses.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ class StyleElement extends HtmlElement {
27492749
return null;
27502750
}
27512751
final text = this.text;
2752-
final parsed = css.parse(text);
2752+
final parsed = css.parse(text as String);
27532753
final styleSheet = CssStyleSheet.constructor();
27542754
for (var node in parsed.topLevels) {
27552755
if (node is css.RuleSet) {

0 commit comments

Comments
 (0)