Closed developerjamiu closed 1 year ago
The statement
All variables MUST be strongly typed: Do final RichTextEditorController controller = RichTextEditorController(); instead of final controller = RichTextEditorController();
is not entirely true, when this is a local variable it is not advisable to have what you recommended here as it is redundant. Check the Effective Dart for more info: https://dart.dev/guides/language/effective-dart/design#dont-redundantly-type-annotate-initialized-local-variables.
This final controller = RichTextEditorController(); is clear enough and the controller type is inferred from the value.
final controller = RichTextEditorController();
Nice spot. It only applies to local variables.
I will work on this.
The statement
All variables MUST be strongly typed: Do final RichTextEditorController controller = RichTextEditorController(); instead of final controller = RichTextEditorController();
is not entirely true, when this is a local variable it is not advisable to have what you recommended here as it is redundant. Check the Effective Dart for more info: https://dart.dev/guides/language/effective-dart/design#dont-redundantly-type-annotate-initialized-local-variables.
This
final controller = RichTextEditorController();
is clear enough and the controller type is inferred from the value.