1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-25 12:28:50 +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,31 +36,34 @@ Widget buildErrorCard(String message,
{List<Widget> actions, bool hide = false}) {
if (hide) return Container();
return Card(
elevation: 2.0,
color: Colors.red,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Icon(
Icons.error,
color: Colors.white,
return Theme(
data:
ThemeData(textTheme: TextTheme(body1: TextStyle(color: Colors.white))),
child: Card(
elevation: 2.0,
color: Colors.red,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Icon(
Icons.error,
color: Colors.white,
),
),
),
Flexible(
child: Text(
message,
style: TextStyle(color: Colors.white),
maxLines: null,
Flexible(
child: Text(
message,
maxLines: null,
),
),
),
Row(
children: actions == null ? <Widget>[] : actions,
)
],
Row(
children: actions == null ? <Widget>[] : actions,
)
],
),
),
),
);