notustohtml icon indicating copy to clipboard operation
notustohtml copied to clipboard

The argument type 'Delta' can't be assigned to the parameter type 'Delta*'.

Open Seeeev opened this issue 2 years ago • 2 comments

notustohtml: ^0.0.8

var notus = NotusDocument.fromJson(json);
final converter = NotusHtmlCodec();
String html = converter.encode(notus.toDelta());

Seeeev avatar Sep 18 '22 00:09 Seeeev

This happens maybe because you are using zefyrka instead of zefyr The Delta object/class is not the same you can try this work around but only run your app with no null safety

import 'package:notus/notus.dart' as notuslib;
import 'package:notustohtml/notustohtml.dart';
import 'package:quill_delta/quill_delta.dart';

var notus = notuslib.NotusDocument.fromJson(json);
final converter = NotusHtmlCodec();
String html = converter.encode(notus.toDelta());

Andoresu250 avatar Sep 20 '22 14:09 Andoresu250

Also note that notustohtml: 1.0.0-rc.2 does support null safety

JacobWrenn avatar Oct 28 '22 17:10 JacobWrenn