Repository navigation
[in_app_purchase] Remove unnecessary Material imports - #12804
ricardodalarme wants to merge 1 commit into
Conversation
3734e10 to
dbf4958
Compare
dbf4958 to
1157a75
Compare
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the |
There was a problem hiding this comment.
Code Review
This pull request replaces unnecessary material.dart imports with widgets.dart across several files in the in_app_purchase_android and in_app_purchase_storekit packages, updating the respective changelogs. The feedback suggests further optimizing these imports by using foundation.dart instead of widgets.dart, as the affected files only require lightweight utilities like @visibleForTesting, @immutable, and Object.hash.
| // found in the LICENSE file. | ||
|
|
||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter/widgets.dart'; |
There was a problem hiding this comment.
Since this file only uses @visibleForTesting, @immutable, and Object.hash, it does not require any widgets or UI-related classes. Importing package:flutter/foundation.dart is more appropriate and lightweight than package:flutter/widgets.dart.
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter/foundation.dart'; |
| // found in the LICENSE file. | ||
|
|
||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter/widgets.dart'; |
There was a problem hiding this comment.
Since this file only uses @visibleForTesting, @immutable, and Object.hash, it does not require any widgets or UI-related classes. Importing package:flutter/foundation.dart is more appropriate and lightweight than package:flutter/widgets.dart.
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter/foundation.dart'; |
| // found in the LICENSE file. | ||
|
|
||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter/widgets.dart'; |
There was a problem hiding this comment.
Since this file only uses @visibleForTesting, @immutable, and Object.hash, it does not require any widgets or UI-related classes. Importing package:flutter/foundation.dart is more appropriate and lightweight than package:flutter/widgets.dart.
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter/foundation.dart'; |
| import 'package:flutter/services.dart'; | ||
| import 'package:flutter/widgets.dart'; |
There was a problem hiding this comment.
Since this file only uses @visibleForTesting, @immutable, and Object.hash from Flutter, it does not require any widgets or UI-related classes. Importing package:flutter/foundation.dart is more appropriate and lightweight than package:flutter/widgets.dart.
| import 'package:flutter/services.dart'; | |
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter/services.dart'; |
Removes unnecessary
materialimports fromin_app_purchase.Part of: flutter/flutter#191322
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2