-
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: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/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 on
Description
Steps to Reproduce
- Create this app:
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(),
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
// backgroundColor: Colors.black.withOpacity(.01),
// brightness: Brightness.light,
title: Text('App Name'),
),
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Text('Hello, World!', style: Theme.of(context).textTheme.headline4);
}
}
- uncomment the two commented lines
- The title text stays white
Expected results:
I expected the title text to go dark. The icons in the status bar of the phone go dark, but not the text of the title.
Actual results:
The text in the title widget remains white

I understand that I can update the primaryColorBrightness in the main theme. However, it seems wrong to change the primary color brightness on the whole app just to adjust the color of an AppBar.
Am I over looking something simple?
hillelcoren, momvart, redsolver, cookmscott, lig and 2 morecarman247
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/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 on