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

code does not compile since method "hashValues" is not found #99

Open
vacosti opened this issue Sep 24, 2024 · 1 comment
Open

code does not compile since method "hashValues" is not found #99

vacosti opened this issue Sep 24, 2024 · 1 comment

Comments

@vacosti
Copy link

vacosti commented Sep 24, 2024

Hello guys! Hope you are doing well!

This is the first time that I'm trying to use this package but it does not even compile due to the following error ("hashValues" is not found or defined):

flutter run
Launching lib/main.dart on sdk gphone x86 in debug mode...
../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/widgets/selectable.dart:603:23: Error: The method 'hashValues' isn't defined for the class 'SelectionStyle'.
 - 'SelectionStyle' is from 'package:flutter_math_fork/src/widgets/selectable.dart' ('../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/widgets/selectable.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
  int get hashCode => hashValues(
                      ^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/ast/options.dart:400:7: Error: The method 'hashValues' isn't defined for the class 'FontOptions'.
 - 'FontOptions' is from 'package:flutter_math_fork/src/ast/options.dart' ('../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/ast/options.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
      hashValues(fontFamily.hashCode, fontWeight.hashCode, fontShape.hashCode);
      ^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/ast/options.dart:434:7: Error: The method 'hashValues' isn't defined for the class 'PartialFontOptions'.
 - 'PartialFontOptions' is from 'package:flutter_math_fork/src/ast/options.dart' ('../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.7.2/lib/src/ast/options.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
      hashValues(fontFamily.hashCode, fontWeight.hashCode, fontShape.hashCode);
      ^^^^^^^^^^
Target kernel_snapshot_program failed: Exception


FAILURE: Build failed with an exception.

My code:

import 'package:flutter_math_fork/flutter_math.dart';
...
child: choicesContainsTexEquation ? Text(text) : Math.tex(text),

The variable text above is read from a json file. With both texts (decoded as Strings) bellow, the same error above occurs (both trying to run on android emulator or chrome):

"text":"test" and "text": "e^{i\\pi}+1=0"

On pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  flutter_math_fork: ^0.7.2

What could be the issue?

Thank you very much!

@bismarabia
Copy link

flutter_math_fork:
    git: https://github.com/Telosnex/flutter_math_fork_fork.git

Credit: https://stackoverflow.com/a/79019696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants