Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Alrey-xxl opened this issue Jul 6, 2021 · 1 comment

Comments

@Alrey-xxl
Copy link

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

@Alrey-xxl Alrey-xxl changed the title Problems encountered when running the sample project Problems encountered when running the sample project(运行示例项目碰到的问题) Jul 6, 2021
@Alrey-xxl
Copy link
Author

Alrey-xxl commented Jul 12, 2021

Q3:If you are running the flutter app, the [mark] of [chart] can be displayed normally, but the [mark] cannot be displayed normally after being integrated into Android, you may need to make the following changes:
Source file: line 197 of core/utils/screen_utils.dart, the variable [_screenDensity] is changed to [_screenWidth]
(如果你在运行flutter app时,[chart]的[mark]能正常显示,但是集成到Android后却无法正常显示[mark],可能要做如下修改:
源文件:core/utils/screen_utils.dart的第197行,的变量[_screenDensity]改为[_screenWidth])

Alystrasz added a commit to Alystrasz/apolline-flutter that referenced this issue Jul 15, 2021
As the package repository is maintained no more, and needs bug
fixes in its published code (see SunPointed/MPFlutterChart#171),
we move the dependency to a fork that is up to date and functional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant