1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-30 00:36:28 +00:00

Use theme

This commit is contained in:
Pierre HUBERT 2020-05-09 09:44:41 +02:00
parent e7e81da05d
commit 782e6bc978

View File

@ -36,7 +36,10 @@ Widget buildErrorCard(String message,
{List<Widget> actions, bool hide = false}) { {List<Widget> actions, bool hide = false}) {
if (hide) return Container(); if (hide) return Container();
return Card( return Theme(
data:
ThemeData(textTheme: TextTheme(body1: TextStyle(color: Colors.white))),
child: Card(
elevation: 2.0, elevation: 2.0,
color: Colors.red, color: Colors.red,
child: Padding( child: Padding(
@ -53,7 +56,6 @@ Widget buildErrorCard(String message,
Flexible( Flexible(
child: Text( child: Text(
message, message,
style: TextStyle(color: Colors.white),
maxLines: null, maxLines: null,
), ),
), ),
@ -63,6 +65,7 @@ Widget buildErrorCard(String message,
], ],
), ),
), ),
),
); );
} }