Commit ad496e14 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

enable lint overridden_fields (#9527)

* enable lint overridden_fields

* address review comment
parent 0d0861b3
...@@ -86,7 +86,7 @@ linter: ...@@ -86,7 +86,7 @@ linter:
# - omit_local_variable_types # opposite of always_specify_types # - omit_local_variable_types # opposite of always_specify_types
# - one_member_abstracts # too many false positives # - one_member_abstracts # too many false positives
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792 # - only_throw_errors # https://github.com/flutter/flutter/issues/5792
# - overridden_fields # not yet tested - overridden_fields
- package_api_docs - package_api_docs
- package_prefixed_library_names - package_prefixed_library_names
# - parameter_assignments # we do this commonly # - parameter_assignments # we do this commonly
......
...@@ -84,7 +84,7 @@ linter: ...@@ -84,7 +84,7 @@ linter:
# - omit_local_variable_types # opposite of always_specify_types # - omit_local_variable_types # opposite of always_specify_types
# - one_member_abstracts # too many false positives # - one_member_abstracts # too many false positives
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792 # - only_throw_errors # https://github.com/flutter/flutter/issues/5792
# - overridden_fields # not yet tested - overridden_fields
- package_api_docs - package_api_docs
- package_prefixed_library_names - package_prefixed_library_names
# - parameter_assignments # we do this commonly # - parameter_assignments # we do this commonly
......
...@@ -105,7 +105,9 @@ class FlutterErrorDetails { ...@@ -105,7 +105,9 @@ class FlutterErrorDetails {
/// Converts the [exception] to a string. /// Converts the [exception] to a string.
/// ///
/// This applies some additional logic to /// This applies some additional logic to make [AssertionError] exceptions
/// prettier, to handle exceptions that stringify to empty strings, to handle
/// objects that don't inherit from [Exception] or [Error], and so forth.
String exceptionAsString() { String exceptionAsString() {
String longMessage; String longMessage;
if (exception is AssertionError) { if (exception is AssertionError) {
...@@ -151,7 +153,7 @@ class FlutterError extends AssertionError { ...@@ -151,7 +153,7 @@ class FlutterError extends AssertionError {
/// Include as much detail as possible in the full error message, /// Include as much detail as possible in the full error message,
/// including specifics about the state of the app that might be /// including specifics about the state of the app that might be
/// relevant to debugging the error. /// relevant to debugging the error.
FlutterError(this.message); FlutterError(String message) : super(message);
/// The message associated with this error. /// The message associated with this error.
/// ///
...@@ -169,7 +171,7 @@ class FlutterError extends AssertionError { ...@@ -169,7 +171,7 @@ class FlutterError extends AssertionError {
/// All sentences in the error should be correctly punctuated (i.e., /// All sentences in the error should be correctly punctuated (i.e.,
/// do end the error message with a period). /// do end the error message with a period).
@override @override
final String message; String get message => super.message;
@override @override
String toString() => message; String toString() => message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment