In Dart, variables don't hold (non-trivial) objects directly, but
rather references. And the = operator binds references to variables
instead of copying values. So it doesn't make sense for dart to
consult the current value of the variable to look for a conversion
operator.
Also, because variable types have no effect on runtime behaviour, Dart
can't consult the type of the variable to look for a conversion.
So there's no way to implement the syntax you want without being
wildly inconsistent with other parts of the language.
I can't tell exactly what you're trying to do, but you can probably
express it using one of these:
// Explicitly convert using a constructor
Material myMaterial;
myMaterial = new Material.fromInt(7);
// Mutate an object using a method
Material myMaterial = new Material();
myMaterial.setValue(7);
// Mutate using a setter
Material myMaterial = new Material();
myMaterial.value = 7;
// Allow your variable to hold either an int or a Material
var myMaterial = new Material();
myMaterial = 7;