Dipesh Tripathi
Dipesh Tripathi

Reputation: 79

how to give a null value to onPanEnd while making a drawpad using custom painter

onPanEnd: (details) {
          pointsList.add(null);
          
          pointsStream.add(pointsList);
           },

class DrawModel {
  final Offset offset;
  final Paint paint;
  

      DrawModel({required this.offset, required this.paint});

}

Error:The argument type 'Null' can't be assigned to the parameter type 'DrawModel

Upvotes: 2

Views: 414

Answers (1)

Josteve Adekanbi
Josteve Adekanbi

Reputation: 12673

Is this what you're looking for?

List<DrawModel?> pointList = [];

Upvotes: 2

Related Questions