Steps to reproduce
- Try to run the following code
- 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!
Reactions are currently unavailable
Steps to reproduce
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 sampleScreenshots or Video
Screenshots / Video demonstrationLogs
LogsThe argument type 'TextTheme' can't be assigned to the parameter type 'TextTheme?'.Flutter Doctor output
Doctor output