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
Description:
I'm working on Flutter web which compiles correctly but as soon as I import flutter_html, it shows the following errors:
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/layout_grid.dart:212:20: Error: Inferred type argument 'AutoPlacement' doesn't conform to the bound 'Enum?' of the type variable 'T' on 'EnumProperty'.
'AutoPlacement' is from 'package:flutter_layout_grid/src/widgets/layout_grid.dart' ('/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/layout_grid.dart').
'Enum' is from 'dart:core'.
Try specifying type arguments explicitly so that they conform to the bounds.
properties.add(EnumProperty('autoPlacement', autoPlacement));
^
/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart:2258:20: Context: This is the type variable whose bound isn't conformed to.
class EnumProperty<T extends Enum?> extends DiagnosticsProperty {
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:82:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:83:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:84:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:132:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:133:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:134:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onTapDown: onTapDown,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:190:24: Error: The argument type 'void Function(TapUpDetails)' can't be assigned to the parameter type 'void Function(TapDragUpDetails)?'.
'TapUpDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragUpDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onSingleTapUp: onSingleTapUp,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:195:26: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDoubleTapDown: onDoubleTapDown,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:196:31: Error: The argument type 'void Function(DragStartDetails)' can't be assigned to the parameter type 'void Function(TapDragStartDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragStartDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionStart: onDragSelectionStart,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:197:32: Error: The argument type 'void Function(DragStartDetails, DragUpdateDetails)' can't be assigned to the parameter type 'void Function(TapDragUpdateDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragUpdateDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionUpdate: onDragSelectionUpdate,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:198:29: Error: The argument type 'void Function(DragEndDetails)' can't be assigned to the parameter type 'void Function(TapDragEndDetails)?'.
'DragEndDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragEndDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionEnd: onDragSelectionEnd,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/handle_overlay.dart:60:40: Error: Member not found: 'fadeDuration'.
duration: TextSelectionOverlay.fadeDuration, vsync: this);
^^^^^^^^^^^^
Failed to compile application.
I have added flutter_html: ^2.2.1 in my pubspec.yaml file.
Imported import 'package:flutter_html/flutter_html.dart';
Used HTML widget as:
Flutter Version
Flutter Doctor
Description:
I'm working on Flutter web which compiles correctly but as soon as I import
flutter_html
, it shows the following errors:Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/layout_grid.dart:212:20: Error: Inferred type argument 'AutoPlacement' doesn't conform to the bound 'Enum?' of the type variable 'T' on 'EnumProperty'.
'AutoPlacement' is from 'package:flutter_layout_grid/src/widgets/layout_grid.dart' ('/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/layout_grid.dart').
'Enum' is from 'dart:core'.
Try specifying type arguments explicitly so that they conform to the bounds.
properties.add(EnumProperty('autoPlacement', autoPlacement));
^
/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart:2258:20: Context: This is the type variable whose bound isn't conformed to.
class EnumProperty<T extends Enum?> extends DiagnosticsProperty {
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:82:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:83:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:84:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:132:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:133:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:134:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onTapDown: onTapDown,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:190:24: Error: The argument type 'void Function(TapUpDetails)' can't be assigned to the parameter type 'void Function(TapDragUpDetails)?'.
'TapUpDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragUpDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onSingleTapUp: onSingleTapUp,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:195:26: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDoubleTapDown: onDoubleTapDown,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:196:31: Error: The argument type 'void Function(DragStartDetails)' can't be assigned to the parameter type 'void Function(TapDragStartDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragStartDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionStart: onDragSelectionStart,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:197:32: Error: The argument type 'void Function(DragStartDetails, DragUpdateDetails)' can't be assigned to the parameter type 'void Function(TapDragUpdateDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragUpdateDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionUpdate: onDragSelectionUpdate,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:198:29: Error: The argument type 'void Function(DragEndDetails)' can't be assigned to the parameter type 'void Function(TapDragEndDetails)?'.
'DragEndDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragEndDetails' is from 'package:flutter/src/gestures/tap_and_drag.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/gestures/tap_and_drag.dart').
onDragSelectionEnd: onDragSelectionEnd,
^
/C:/Users/eqrak/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/handle_overlay.dart:60:40: Error: Member not found: 'fadeDuration'.
duration: TextSelectionOverlay.fadeDuration, vsync: this);
^^^^^^^^^^^^
Failed to compile application.
I have added
flutter_html: ^2.2.1
in my pubspec.yaml file.Imported
import 'package:flutter_html/flutter_html.dart';
Used
HTML
widget as:The text was updated successfully, but these errors were encountered: