-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages team
Description
Steps to reproduce
- Run the code sample
- Observe the color of the label
Expected results
Label is green
Actual results
Label is red (global theme color, local theme is ignored)
Code sample
Code sample
import 'package:flutter/material.dart';
void main() => runApp(const ReproApp());
class ReproApp extends StatelessWidget {
const ReproApp({super.key});
@override
Widget build(BuildContext context) {
final ThemeData themeData = ThemeData(
brightness: Brightness.dark,
inputDecorationTheme: const InputDecorationTheme(
labelStyle: TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
),
);
return MaterialApp(
theme: themeData,
home: Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: SizedBox(
width: 250,
child: InputDecorationTheme(
data: const InputDecorationThemeData(
labelStyle: TextStyle(color: Colors.green, fontWeight: FontWeight.bold),
),
child: TextFormField(decoration: const InputDecoration(labelText: 'TextFormField')),
),
),
),
),
);
}
}
Screenshots or Video
Logs
Flutter Doctor output
Doctor output
Flutter (Channel [user-branch], 3.37.0-1.0.pre-381, on Ubuntu 24.04.2 LTS 6.8.0-84-generic, locale fr_FR.UTF-8)
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages team
Type
Projects
Status
Done (PR merged)