Skip to content

[google_fonts] support material ui - #12489

Open
Segatti wants to merge 1 commit into
flutter:mainfrom
Segatti:main
Open

[google_fonts] support material ui#12489
Segatti wants to merge 1 commit into
flutter:mainfrom
Segatti:main

Conversation

@Segatti

@Segatti Segatti commented Aug 17, 2026

Copy link
Copy Markdown

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

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-assist bot 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

  1. 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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +13 to +17
cupertino_ui: ^1.0.0
flutter:
sdk: flutter
http: ^1.0.0
material_ui: ^1.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

Do not import material_ui from an external package. Use the standard Flutter SDK Material library instead.

Suggested change
import 'package:material_ui/material_ui.dart';
import 'package:flutter/material.dart';

Comment on lines +5 to +6
import 'package:cupertino_ui/cupertino_ui.dart';
import 'package:material_ui/material_ui.dart';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

Do not import cupertino_ui or material_ui from external packages. Use the standard Flutter SDK Cupertino and Material libraries instead.

Suggested change
import 'package:cupertino_ui/cupertino_ui.dart';
import 'package:material_ui/material_ui.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

@github-actions github-actions Bot added p: google_fonts triage-framework Should be looked at in framework triage labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: google_fonts triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant