[google_fonts] support material ui - #12489
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces standard Flutter SDK imports (package:flutter/material.dart and package:flutter/cupertino.dart) with external third-party packages (package:material_ui/material_ui.dart and package:cupertino_ui/cupertino_ui.dart) and adds them as dependencies in pubspec.yaml. The reviewer flags these changes as critical security and correctness issues, noting that replacing built-in Flutter SDK libraries with external packages introduces supply chain risks and breaks compatibility, and recommends reverting back to the standard Flutter SDK libraries.
| cupertino_ui: ^1.0.0 | ||
| flutter: | ||
| sdk: flutter | ||
| http: ^1.0.0 | ||
| material_ui: ^1.0.0 |
There was a problem hiding this comment.
Replacing the standard Flutter SDK dependencies with external third-party packages like cupertino_ui and material_ui is a critical security and correctness issue. Flutter's Material and Cupertino libraries are built directly into the Flutter SDK. Using external packages instead of the official SDK libraries introduces severe security risks (such as supply chain attacks or typosquatting) and breaks compatibility.
flutter:
sdk: flutter
http: ^1.0.0| import 'package:crypto/crypto.dart'; | ||
| import 'package:flutter/foundation.dart' show kIsWeb; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:material_ui/material_ui.dart'; |
| import 'package:cupertino_ui/cupertino_ui.dart'; | ||
| import 'package:material_ui/material_ui.dart'; |
There was a problem hiding this comment.
Do not import cupertino_ui or material_ui from external packages. Use the standard Flutter SDK Cupertino and Material libraries instead.
| import 'package:cupertino_ui/cupertino_ui.dart'; | |
| import 'package:material_ui/material_ui.dart'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; |
Added Material UI support to Google Fonts.
List which issues are fixed by this PR. You must list at least one issue.
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