Skip to content

Commit 06ed8e6

Browse files
authored
Enable prefer_mixin (#123159)
Enable prefer_mixin
1 parent e15c928 commit 06ed8e6

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ linter:
173173
- prefer_is_not_empty
174174
- prefer_is_not_operator
175175
- prefer_iterable_whereType
176-
# - prefer_mixin # has false positives, see https://github.com/dart-lang/linter/issues/3018
176+
- prefer_mixin
177177
# - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
178178
- prefer_null_aware_operators
179179
- prefer_relative_imports

packages/flutter_tools/lib/src/base/error_handling_io.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ class ErrorHandlingFileSystem extends ForwardingFileSystem {
156156

157157
class ErrorHandlingFile
158158
extends ForwardingFileSystemEntity<File, io.File>
159-
with ForwardingFile {
159+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
160+
with ForwardingFile { // ignore: prefer_mixin
160161
ErrorHandlingFile({
161162
required Platform platform,
162163
required this.fileSystem,
@@ -368,7 +369,8 @@ class ErrorHandlingFile
368369

369370
class ErrorHandlingDirectory
370371
extends ForwardingFileSystemEntity<Directory, io.Directory>
371-
with ForwardingDirectory<Directory> {
372+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
373+
with ForwardingDirectory<Directory> { // ignore: prefer_mixin
372374
ErrorHandlingDirectory({
373375
required Platform platform,
374376
required this.fileSystem,
@@ -504,7 +506,8 @@ class ErrorHandlingDirectory
504506

505507
class ErrorHandlingLink
506508
extends ForwardingFileSystemEntity<Link, io.Link>
507-
with ForwardingLink {
509+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
510+
with ForwardingLink { // ignore: prefer_mixin
508511
ErrorHandlingLink({
509512
required Platform platform,
510513
required this.fileSystem,

packages/flutter_tools/lib/src/base/multi_root_file_system.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ abstract class MultiRootFileSystemEntity<T extends FileSystemEntity,
209209
}
210210

211211
class MultiRootFile extends MultiRootFileSystemEntity<File, io.File>
212-
with ForwardingFile {
212+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
213+
with ForwardingFile { // ignore: prefer_mixin
213214
MultiRootFile({
214215
required super.fileSystem,
215216
required super.delegate,
@@ -222,7 +223,8 @@ class MultiRootFile extends MultiRootFileSystemEntity<File, io.File>
222223

223224
class MultiRootDirectory
224225
extends MultiRootFileSystemEntity<Directory, io.Directory>
225-
with ForwardingDirectory<Directory> {
226+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
227+
with ForwardingDirectory<Directory> { // ignore: prefer_mixin
226228
MultiRootDirectory({
227229
required super.fileSystem,
228230
required super.delegate,
@@ -249,7 +251,8 @@ class MultiRootDirectory
249251
}
250252

251253
class MultiRootLink extends MultiRootFileSystemEntity<Link, io.Link>
252-
with ForwardingLink {
254+
// TODO(goderbauer): Fix this ignore when https://github.com/google/file.dart/issues/209 is resolved.
255+
with ForwardingLink { // ignore: prefer_mixin
253256
MultiRootLink({
254257
required super.fileSystem,
255258
required super.delegate,

0 commit comments

Comments
 (0)