LCOV - code coverage report
Current view: top level - list/paged - paged_repository.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 3 33.3 %
Date: 2019-10-16 15:54:07 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:flutter_bloc_patterns/src/list/paged/page.dart';
       2             : 
       3             : /// [PagedRepository] allows to retrieve elements using the pagination.
       4             : ///
       5             : /// [T] - the type of returned elements.
       6             : abstract class PagedRepository<T> {
       7             :   /// Retrieves elements meeting the pagination restriction provided by
       8             :   /// the [page] object.
       9             :   /// When elements are exceeded should return an empty list or throw
      10             :   /// the [PageNotFoundException].
      11             :   Future<List<T>> getAll(Page page);
      12             : }
      13             : 
      14             : // Exception thrown when page with given number doesn't exist.
      15             : class PageNotFoundException implements Exception {
      16             :   final pageNumber;
      17             : 
      18           1 :   PageNotFoundException(this.pageNumber);
      19             : 
      20           0 :   @override
      21             :   String toString() =>
      22           0 :       'PageNotFoundException: $pageNumber page does not exist.';
      23             : }

Generated by: LCOV version 1.14