-
Notifications
You must be signed in to change notification settings - Fork 29.7k
DRY up FakeCodec #149381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRY up FakeCodec #149381
Conversation
|
|
||
| import 'dart:ui'; | ||
|
|
||
| class NoopCodec implements Codec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like NoOpX is a more common casing convention in the Flutter repo: https://github.com/search?q=repo%3Aflutter%2Fflutter%20Noop&type=code
| class NoopCodec implements Codec { | |
| class NoOpCodec implements Codec { |
I don't feel strongly about this though
|
|
||
| import 'dart:ui'; | ||
|
|
||
| class NoopCodec implements Codec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider adding an instance static member. I don't feel strongly about this either, feel free to skip.
Example:
flutter/packages/flutter/lib/src/foundation/memory_allocations.dart
Lines 123 to 128 in 6193615
| FlutterMemoryAllocations._(); | |
| /// The shared instance of [FlutterMemoryAllocations]. | |
| /// | |
| /// Only call this when [kFlutterMemoryAllocationsEnabled] is true. | |
| static final FlutterMemoryAllocations instance = FlutterMemoryAllocations._(); |
loic-sharma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FakeCodecdefined somewhere else