Try correcting the name to the name of an existing method, or defining a method named 'then'.
.then((value) {
^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/mp_chart-0.3.1/lib/mp/core/utils/painter_utils.dart:15:34: Error: The getter 'text' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'text'.
var preText = painter.text.text;