IbrahimDevp / flutter_auth

0 stars 0 forks source link

Explicitly define variable types if Dart cannot infer it #9

Open adnsawas opened 1 year ago

adnsawas commented 1 year ago

https://github.com/ikema77/flutter_auth/blob/0b86b7d22c968fdd363c173abcfbd6dd2510f919/lib/providers/info.dart#L67-L71

In general, when defining variables, it is better to explicitly specify a variable type if Dart cannot infer it by itself. To check this, hover over the variable, if it is dynamic, try to explicitly specify the variable type. Having many dynamic variables can lead to unexpected code behaviors and errors.