How to invoke operator from C++ in DART_API?

Issue

I get error when invoke this function:

Dart_Invoke(dh_value, Dart_NewStringFromCString("&="), 1, mask);

Here is error message:

Breaking on exception: Class 'int' has no instance method '&='.

How Dart programmers invoke operators in C++?

P.S.

I use Dart SDK version 1.2.0-dev.1.0

Maybe I need to switch to the stable version instead of using development version?

Solution

I don’t think this is an operator of int. This is syntactic sugar for for x = x & y

Answered By – Günter Zöchbauer

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *