mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Use theme
This commit is contained in:
		@@ -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,
 | 
			
		||||
            )
 | 
			
		||||
          ],
 | 
			
		||||
        ),
 | 
			
		||||
      ),
 | 
			
		||||
    ),
 | 
			
		||||
  );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user