LCOV - code coverage report
Current view: top level - src/states - error.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 11 11 100.0 %
Date: 2021-10-27 10:12:28 Functions: 0 0 -

          Line data    Source code
       1             : //TODO: improve this
       2             : import 'package:flutter/foundation.dart';
       3             : import 'package:flutter/material.dart';
       4             : 
       5             : /// The default Error State Widget to display errors
       6             : class ErrorStateWidget extends StatelessWidget {
       7             :   /// Builds an [ErrorStateWidget].
       8          13 :   const ErrorStateWidget({
       9             :     Key? key,
      10             :     this.message = 'Sorry an error has occured',
      11           1 :   }) : super(key: key);
      12             : 
      13             :   /// The error message to display
      14             :   final String message;
      15             : 
      16           1 :   @override
      17             :   Widget build(BuildContext context) {
      18           1 :     return Center(
      19           1 :       child: Column(
      20           1 :         children: [
      21             :           const Icon(
      22             :             Icons.announcement,
      23             :             color: Colors.red,
      24             :             size: 40,
      25             :           ),
      26             :           const SizedBox(height: 10),
      27           1 :           Text(
      28           1 :             message,
      29             :             textAlign: TextAlign.center,
      30             :           ),
      31             :         ],
      32             :       ),
      33             :     );
      34             :   }
      35             : 
      36           1 :   @override
      37             :   void debugFillProperties(DiagnosticPropertiesBuilder properties) {
      38           1 :     super.debugFillProperties(properties);
      39           3 :     properties.add(StringProperty('message', message));
      40             :   }
      41             : }

Generated by: LCOV version 1.15