*= operator is the multiplication assignment operator. It is a compound assignment operator that multiplies the current value of the variable on the left-hand side (LHS) by the value of the expression on the right-hand side (RHS) and assigns the product back to the LHS variable.
Syntax
Operational Equivalence
The expressiona *= b is semantically equivalent to:
list[i]), it is not re-evaluated during the assignment step.
Type Constraints
For the operation to be valid, the following type rules apply:- Operator Support: The type of the LHS variable must define the multiplication operator (
*). - Assignability: The return type of the multiplication operation must be assignable to the static type of the LHS variable.
Examples
Integer Multiplicationint by a double results in a double, which cannot be assigned to an int variable.
Operator Overloading
If a custom class overloads the* operator, *= automatically utilizes that implementation.
Master Dart with Deep Grasping Methodology!Learn More





