Skip to content

Problems encountered when running the sample project(运行示例项目碰到的问题) #171

Open
@Alrey-xxl

Description

@Alrey-xxl

Q1:../lib/mp/chart/chart.dart:51:12: Error: The method 'then' isn't defined for the class 'FutureOr<dynamic>'. Try correcting the name to the name of an existing method, or defining a method named 'then'. .then((value) {

A1:change ‘../lib/mp/chart/chart.dart:51’
before:
ImageGallerySaver.saveImage(Uint8List.fromList(imgFile.readAsBytesSync())) .then((value) { imgFile.delete(); });
after:
var result = ImageGallerySaver.saveImage(Uint8List.fromList(imgFile.readAsBytesSync())); if(result is Future<dynamic>){ result.then((value) => imgFile.delete()); }

Q2:`../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' ('/E:/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;A2:change '../lib/mp/core/utils/painter_utils.dart:15' before:var preText = painter.text.text;after:var preText = (painter.text as TextSpan).text;`

If you have other questions, you can try to leave me a message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions