FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

material_ui TextTheme conflict after Flutter/package update - previously working [google_fonts] · Issue #191067 · flutter/flutter · GitHub

material_ui TextTheme conflict after Flutter/package update - previously working [google_fonts] #191067

Description

Steps to reproduce

  1. Try to run the following code
  2. Compilation error

Expected results

Expected result: ThemeData.textTheme should accept GoogleFonts.pangolinTextTheme() without a type mismatch, as it did previously.

Actual results

The argument type 'TextTheme' can't be assigned to the parameter type 'TextTheme?'.

Code sample

Code sample
import 'package:material_ui/material_ui.dart';
import 'package:google_fonts/google_fonts.dart';

void main() {
  runApp(
    MaterialApp(
      theme: ThemeData(
        textTheme: GoogleFonts.pangolinTextTheme(),
      ),
      home: const Scaffold(
        body: Center(
          child: Text('Hello'),
        ),
      ),
    ),
  );
}

Screenshots or Video

Screenshots / Video demonstration

Logs

Logs
The argument type 'TextTheme' can't be assigned to the parameter type 'TextTheme?'. 

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.48.0-1.0.pre-178, on macOS 26.6.1 25G76 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.6)
[✓] Chrome - develop for the web
[✓] Connected device (2 available)
[✓] Network resources                

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: google_fontsPackage to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.p: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL