page 43, Dart Fundamentals for this description " Some programming languages aren’t as strict and will perform conversions like this
silently. Experience shows this kind of silent, implicit conversion is a frequent source of
software bugs and often hurts code performance. Dart disallows you from assigning a
value of one type to another and avoids these issues."
dart has implicit widening type conversion like java as we can write int value for double variable
double d = 2; // it will comple.
In Dart, type safety is taken seriously to prevent unexpected bugs and performance issues caused by silent conversions. Unlike some loosely typed languages that automatically convert values between incompatible types, Dart restricts implicit conversions to maintain predictable behavior. However, Dart does allow implicit widening conversions in specific cases, similar to Java. For example, you can assign an int value to a double variable because every integer can be represented as a double without loss of information: double d = 2; compiles successfully. This is considered a safe widening conversion. On the other hand, narrowing conversions (such as assigning a double to an int) require explicit casting, ensuring developers remain fully aware of potential data loss.