-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: qualityA truly polished experienceA truly polished experiencecustomer: housecustomer: web10f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.18Occurs in 1.18Occurs in 1.18frameworkflutter/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
I have a very simple AppBar outside of a Scaffold, like:
class MyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: <Widget>[
AppBar(
title: Text('hi'),
flexibleSpace: Container(color: Colors.purple, height: 200,),
),
Expanded(
child: Center(
child: Text('hi again'),
),
),
],
),
);
}
}Which renders like:
The MaterialApp theme primaryColorBrightness is Brightness.light.
Now, if I change the MaterialApp theme primaryColorBrightness to Brightness.dark the status bar color AND the AppBar icons and text change to white:
But if I just want to change the Theme for MyScreen and not the whole app, the status bar changes color to white, but the AppBar doesn't:
class MyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Theme(
data: Theme.of(context).copyWith(primaryColorBrightness: Brightness.dark),
child: Scaffold(
body: Column(
children: <Widget>[
AppBar(
title: Text('hi'),
flexibleSpace: Container(color: Colors.purple, height: 200,),
),
Expanded(
child: Center(
child: Text('hi again'),
),
),
],
),
),
);
}
}As can be seen here:
This inconsistency seems like a bug to me.
rodkiewicz, bitsydarel, woutervanwijk, ezone-dev, AirborneEagle and 8 more
Metadata
Metadata
Assignees
Labels
a: qualityA truly polished experienceA truly polished experiencecustomer: housecustomer: web10f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.18Occurs in 1.18Occurs in 1.18frameworkflutter/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


