-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
Flutter version: latest master
I created an app with a dark theme, pink primary swatch and orange accent color.
When I open an AlertDialog, the action buttons are turquoise. The theme colors are ignored:
This problem started recently on the master branch.
Code to reproduce:
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.pink,
accentColor: Colors.orange,
brightness: Brightness.dark,
),
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
void _showDialog() {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text('Some Title'),
content: Text('Some content'),
actions: <Widget>[
FlatButton(
onPressed: null,
child: Text('DISABLED'),
),
FlatButton(
onPressed: () => Navigator.pop(context),
child: Text('ENABLED'),
)
],
);
},
);
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(),
body: new Center(
child: FlatButton(
textTheme: ButtonTextTheme.accent,
onPressed: _showDialog,
child: Text('SHOW DIALOG'),
),
),
);
}
}Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
