LCOV - code coverage report
Current view: top level - lib/presentation/blocs/mobility/maps - maps_state.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 10 0.0 %
Date: 2020-06-26 11:36:11 Functions: 0 0 -

          Line data    Source code
       1             : part of 'maps_bloc.dart';
       2             : 
       3             : @freezed
       4             : abstract class MapsState with _$MapsState {
       5             :   factory MapsState({
       6             :     @required bool isLoading,
       7             :     @required bool isError,
       8             :     @required bool isBusLoaded,
       9             :     @required bool isTrainLoaded,
      10             :     Exception exception,
      11             :   }) = _MapsState;
      12             : 
      13           0 :   factory MapsState.initial() {
      14           0 :     return MapsState(
      15             :       isLoading: false,
      16             :       isError: false,
      17             :       isBusLoaded: false,
      18             :       isTrainLoaded: false,
      19             :     );
      20             :   }
      21             : }
      22             : 
      23             : extension MapsStateX on MapsState {
      24           0 :   MapsState busLoaded() {
      25           0 :     return this.copyWith(
      26             :       isLoading: false,
      27             :       isError: false,
      28             :       isBusLoaded: true,
      29             :     );
      30             :   }
      31             : 
      32           0 :   MapsState trainLoaded() {
      33           0 :     return this.copyWith(
      34             :       isLoading: false,
      35             :       isError: false,
      36             :       isTrainLoaded: true,
      37             :     );
      38             :   }
      39             : 
      40           0 :   MapsState loading() {
      41           0 :     return this.copyWith(
      42             :       isLoading: true,
      43             :       isError: false,
      44             :       isBusLoaded: false,
      45             :       isTrainLoaded: false,
      46             :     );
      47             :   }
      48             : 
      49           0 :   MapsState error(Exception exception) {
      50           0 :     return this.copyWith(
      51             :       isLoading: false,
      52             :       isError: true,
      53             :       isBusLoaded: false,
      54             :       isTrainLoaded: false,
      55             :       exception: exception,
      56             :     );
      57             :   }
      58             : }

Generated by: LCOV version 1.13