Remove ThemeData.primarySwatch
In the dark theme, there isn't really a primary swatch, so this API was a sandtrap. Instead, be explicit about the colors we need for various widgets in the theme. Fixes #1277
This commit is contained in:
@@ -300,7 +300,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
onResized: () { _invalidator(<int>[index]); },
|
||||
onDismissed: () { dismissCard(cardModel); },
|
||||
child: new Card(
|
||||
color: Theme.of(context).primarySwatch[cardModel.color],
|
||||
color: _primaryColor[cardModel.color],
|
||||
child: new Container(
|
||||
height: cardModel.height,
|
||||
padding: const EdgeDims.all(kCardMargins),
|
||||
@@ -428,7 +428,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
|
||||
Widget body = new Container(
|
||||
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
|
||||
decoration: new BoxDecoration(backgroundColor: Theme.of(context).primarySwatch[50]),
|
||||
decoration: new BoxDecoration(backgroundColor: _primaryColor[50]),
|
||||
child: cardCollection
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user