LCOV - code coverage report
Current view: top level - lib/src/image - orientation.g.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 28 123 22.8 %
Date: 2020-10-22 14:54:13 Functions: 0 0 -

          Line data    Source code
       1             : // GENERATED CODE - DO NOT MODIFY BY HAND
       2             : 
       3             : part of 'orientation.dart';
       4             : 
       5             : // **************************************************************************
       6             : // SuperEnumGenerator
       7             : // **************************************************************************
       8             : 
       9             : @immutable
      10             : abstract class Orientation extends Equatable {
      11           0 :   const Orientation(this._type);
      12             : 
      13             :   factory Orientation.toDefault() = ToDefault;
      14             : 
      15             :   factory Orientation.horizontally() = Horizontally;
      16             : 
      17             :   factory Orientation.horizontallyAndVertically() = HorizontallyAndVertically;
      18             : 
      19             :   factory Orientation.vertically() = Vertically;
      20             : 
      21             :   factory Orientation.horizontallyAndRotate90DegreeLeft() =
      22             :       HorizontallyAndRotate90DegreeLeft;
      23             : 
      24             :   factory Orientation.degrees90TowardsRight() = Degrees90TowardsRight;
      25             : 
      26             :   factory Orientation.horizontallyAndRotate90DegreesRight() =
      27             :       HorizontallyAndRotate90DegreesRight;
      28             : 
      29             :   factory Orientation.rotate90DegreesLeft() = Rotate90DegreesLeft;
      30             : 
      31             :   final _Orientation _type;
      32             : 
      33             : //ignore: missing_return
      34           1 :   R when<R>(
      35             :       {@required
      36             :           R Function(ToDefault) toDefault,
      37             :       @required
      38             :           R Function(Horizontally) horizontally,
      39             :       @required
      40             :           R Function(HorizontallyAndVertically) horizontallyAndVertically,
      41             :       @required
      42             :           R Function(Vertically) vertically,
      43             :       @required
      44             :           R Function(HorizontallyAndRotate90DegreeLeft)
      45             :               horizontallyAndRotate90DegreeLeft,
      46             :       @required
      47             :           R Function(Degrees90TowardsRight) degrees90TowardsRight,
      48             :       @required
      49             :           R Function(HorizontallyAndRotate90DegreesRight)
      50             :               horizontallyAndRotate90DegreesRight,
      51             :       @required
      52             :           R Function(Rotate90DegreesLeft) rotate90DegreesLeft}) {
      53           1 :     assert(() {
      54             :       if (toDefault == null ||
      55             :           horizontally == null ||
      56             :           horizontallyAndVertically == null ||
      57             :           vertically == null ||
      58             :           horizontallyAndRotate90DegreeLeft == null ||
      59             :           degrees90TowardsRight == null ||
      60             :           horizontallyAndRotate90DegreesRight == null ||
      61             :           rotate90DegreesLeft == null) {
      62             :         throw 'check for all possible cases';
      63             :       }
      64             :       return true;
      65           1 :     }());
      66           1 :     switch (this._type) {
      67           1 :       case _Orientation.ToDefault:
      68           1 :         return toDefault(this as ToDefault);
      69           1 :       case _Orientation.Horizontally:
      70           1 :         return horizontally(this as Horizontally);
      71           1 :       case _Orientation.HorizontallyAndVertically:
      72           1 :         return horizontallyAndVertically(this as HorizontallyAndVertically);
      73           1 :       case _Orientation.Vertically:
      74           1 :         return vertically(this as Vertically);
      75           1 :       case _Orientation.HorizontallyAndRotate90DegreeLeft:
      76           1 :         return horizontallyAndRotate90DegreeLeft(
      77             :             this as HorizontallyAndRotate90DegreeLeft);
      78           1 :       case _Orientation.Degrees90TowardsRight:
      79           1 :         return degrees90TowardsRight(this as Degrees90TowardsRight);
      80           1 :       case _Orientation.HorizontallyAndRotate90DegreesRight:
      81           1 :         return horizontallyAndRotate90DegreesRight(
      82             :             this as HorizontallyAndRotate90DegreesRight);
      83           1 :       case _Orientation.Rotate90DegreesLeft:
      84           1 :         return rotate90DegreesLeft(this as Rotate90DegreesLeft);
      85             :     }
      86             :   }
      87             : 
      88             : //ignore: missing_return
      89           0 :   Future<R> asyncWhen<R>(
      90             :       {@required
      91             :           FutureOr<R> Function(ToDefault) toDefault,
      92             :       @required
      93             :           FutureOr<R> Function(Horizontally) horizontally,
      94             :       @required
      95             :           FutureOr<R> Function(HorizontallyAndVertically)
      96             :               horizontallyAndVertically,
      97             :       @required
      98             :           FutureOr<R> Function(Vertically) vertically,
      99             :       @required
     100             :           FutureOr<R> Function(HorizontallyAndRotate90DegreeLeft)
     101             :               horizontallyAndRotate90DegreeLeft,
     102             :       @required
     103             :           FutureOr<R> Function(Degrees90TowardsRight) degrees90TowardsRight,
     104             :       @required
     105             :           FutureOr<R> Function(HorizontallyAndRotate90DegreesRight)
     106             :               horizontallyAndRotate90DegreesRight,
     107             :       @required
     108             :           FutureOr<R> Function(Rotate90DegreesLeft) rotate90DegreesLeft}) {
     109           0 :     assert(() {
     110             :       if (toDefault == null ||
     111             :           horizontally == null ||
     112             :           horizontallyAndVertically == null ||
     113             :           vertically == null ||
     114             :           horizontallyAndRotate90DegreeLeft == null ||
     115             :           degrees90TowardsRight == null ||
     116             :           horizontallyAndRotate90DegreesRight == null ||
     117             :           rotate90DegreesLeft == null) {
     118             :         throw 'check for all possible cases';
     119             :       }
     120             :       return true;
     121           0 :     }());
     122           0 :     switch (this._type) {
     123           0 :       case _Orientation.ToDefault:
     124           0 :         return toDefault(this as ToDefault);
     125           0 :       case _Orientation.Horizontally:
     126           0 :         return horizontally(this as Horizontally);
     127           0 :       case _Orientation.HorizontallyAndVertically:
     128           0 :         return horizontallyAndVertically(this as HorizontallyAndVertically);
     129           0 :       case _Orientation.Vertically:
     130           0 :         return vertically(this as Vertically);
     131           0 :       case _Orientation.HorizontallyAndRotate90DegreeLeft:
     132           0 :         return horizontallyAndRotate90DegreeLeft(
     133             :             this as HorizontallyAndRotate90DegreeLeft);
     134           0 :       case _Orientation.Degrees90TowardsRight:
     135           0 :         return degrees90TowardsRight(this as Degrees90TowardsRight);
     136           0 :       case _Orientation.HorizontallyAndRotate90DegreesRight:
     137           0 :         return horizontallyAndRotate90DegreesRight(
     138             :             this as HorizontallyAndRotate90DegreesRight);
     139           0 :       case _Orientation.Rotate90DegreesLeft:
     140           0 :         return rotate90DegreesLeft(this as Rotate90DegreesLeft);
     141             :     }
     142             :   }
     143             : 
     144           0 :   R whenOrElse<R>(
     145             :       {R Function(ToDefault) toDefault,
     146             :       R Function(Horizontally) horizontally,
     147             :       R Function(HorizontallyAndVertically) horizontallyAndVertically,
     148             :       R Function(Vertically) vertically,
     149             :       R Function(HorizontallyAndRotate90DegreeLeft)
     150             :           horizontallyAndRotate90DegreeLeft,
     151             :       R Function(Degrees90TowardsRight) degrees90TowardsRight,
     152             :       R Function(HorizontallyAndRotate90DegreesRight)
     153             :           horizontallyAndRotate90DegreesRight,
     154             :       R Function(Rotate90DegreesLeft) rotate90DegreesLeft,
     155             :       @required R Function(Orientation) orElse}) {
     156           0 :     assert(() {
     157             :       if (orElse == null) {
     158             :         throw 'Missing orElse case';
     159             :       }
     160             :       return true;
     161           0 :     }());
     162           0 :     switch (this._type) {
     163           0 :       case _Orientation.ToDefault:
     164             :         if (toDefault == null) break;
     165           0 :         return toDefault(this as ToDefault);
     166           0 :       case _Orientation.Horizontally:
     167             :         if (horizontally == null) break;
     168           0 :         return horizontally(this as Horizontally);
     169           0 :       case _Orientation.HorizontallyAndVertically:
     170             :         if (horizontallyAndVertically == null) break;
     171           0 :         return horizontallyAndVertically(this as HorizontallyAndVertically);
     172           0 :       case _Orientation.Vertically:
     173             :         if (vertically == null) break;
     174           0 :         return vertically(this as Vertically);
     175           0 :       case _Orientation.HorizontallyAndRotate90DegreeLeft:
     176             :         if (horizontallyAndRotate90DegreeLeft == null) break;
     177           0 :         return horizontallyAndRotate90DegreeLeft(
     178             :             this as HorizontallyAndRotate90DegreeLeft);
     179           0 :       case _Orientation.Degrees90TowardsRight:
     180             :         if (degrees90TowardsRight == null) break;
     181           0 :         return degrees90TowardsRight(this as Degrees90TowardsRight);
     182           0 :       case _Orientation.HorizontallyAndRotate90DegreesRight:
     183             :         if (horizontallyAndRotate90DegreesRight == null) break;
     184           0 :         return horizontallyAndRotate90DegreesRight(
     185             :             this as HorizontallyAndRotate90DegreesRight);
     186           0 :       case _Orientation.Rotate90DegreesLeft:
     187             :         if (rotate90DegreesLeft == null) break;
     188           0 :         return rotate90DegreesLeft(this as Rotate90DegreesLeft);
     189             :     }
     190           0 :     return orElse(this);
     191             :   }
     192             : 
     193           0 :   Future<R> asyncWhenOrElse<R>(
     194             :       {FutureOr<R> Function(ToDefault) toDefault,
     195             :       FutureOr<R> Function(Horizontally) horizontally,
     196             :       FutureOr<R> Function(HorizontallyAndVertically) horizontallyAndVertically,
     197             :       FutureOr<R> Function(Vertically) vertically,
     198             :       FutureOr<R> Function(HorizontallyAndRotate90DegreeLeft)
     199             :           horizontallyAndRotate90DegreeLeft,
     200             :       FutureOr<R> Function(Degrees90TowardsRight) degrees90TowardsRight,
     201             :       FutureOr<R> Function(HorizontallyAndRotate90DegreesRight)
     202             :           horizontallyAndRotate90DegreesRight,
     203             :       FutureOr<R> Function(Rotate90DegreesLeft) rotate90DegreesLeft,
     204             :       @required FutureOr<R> Function(Orientation) orElse}) {
     205           0 :     assert(() {
     206             :       if (orElse == null) {
     207             :         throw 'Missing orElse case';
     208             :       }
     209             :       return true;
     210           0 :     }());
     211           0 :     switch (this._type) {
     212           0 :       case _Orientation.ToDefault:
     213             :         if (toDefault == null) break;
     214           0 :         return toDefault(this as ToDefault);
     215           0 :       case _Orientation.Horizontally:
     216             :         if (horizontally == null) break;
     217           0 :         return horizontally(this as Horizontally);
     218           0 :       case _Orientation.HorizontallyAndVertically:
     219             :         if (horizontallyAndVertically == null) break;
     220           0 :         return horizontallyAndVertically(this as HorizontallyAndVertically);
     221           0 :       case _Orientation.Vertically:
     222             :         if (vertically == null) break;
     223           0 :         return vertically(this as Vertically);
     224           0 :       case _Orientation.HorizontallyAndRotate90DegreeLeft:
     225             :         if (horizontallyAndRotate90DegreeLeft == null) break;
     226           0 :         return horizontallyAndRotate90DegreeLeft(
     227             :             this as HorizontallyAndRotate90DegreeLeft);
     228           0 :       case _Orientation.Degrees90TowardsRight:
     229             :         if (degrees90TowardsRight == null) break;
     230           0 :         return degrees90TowardsRight(this as Degrees90TowardsRight);
     231           0 :       case _Orientation.HorizontallyAndRotate90DegreesRight:
     232             :         if (horizontallyAndRotate90DegreesRight == null) break;
     233           0 :         return horizontallyAndRotate90DegreesRight(
     234             :             this as HorizontallyAndRotate90DegreesRight);
     235           0 :       case _Orientation.Rotate90DegreesLeft:
     236             :         if (rotate90DegreesLeft == null) break;
     237           0 :         return rotate90DegreesLeft(this as Rotate90DegreesLeft);
     238             :     }
     239           0 :     return orElse(this);
     240             :   }
     241             : 
     242             : //ignore: missing_return
     243           0 :   Future<void> whenPartial(
     244             :       {FutureOr<void> Function(ToDefault) toDefault,
     245             :       FutureOr<void> Function(Horizontally) horizontally,
     246             :       FutureOr<void> Function(HorizontallyAndVertically)
     247             :           horizontallyAndVertically,
     248             :       FutureOr<void> Function(Vertically) vertically,
     249             :       FutureOr<void> Function(HorizontallyAndRotate90DegreeLeft)
     250             :           horizontallyAndRotate90DegreeLeft,
     251             :       FutureOr<void> Function(Degrees90TowardsRight) degrees90TowardsRight,
     252             :       FutureOr<void> Function(HorizontallyAndRotate90DegreesRight)
     253             :           horizontallyAndRotate90DegreesRight,
     254             :       FutureOr<void> Function(Rotate90DegreesLeft) rotate90DegreesLeft}) {
     255           0 :     assert(() {
     256             :       if (toDefault == null &&
     257             :           horizontally == null &&
     258             :           horizontallyAndVertically == null &&
     259             :           vertically == null &&
     260             :           horizontallyAndRotate90DegreeLeft == null &&
     261             :           degrees90TowardsRight == null &&
     262             :           horizontallyAndRotate90DegreesRight == null &&
     263             :           rotate90DegreesLeft == null) {
     264             :         throw 'provide at least one branch';
     265             :       }
     266             :       return true;
     267           0 :     }());
     268           0 :     switch (this._type) {
     269           0 :       case _Orientation.ToDefault:
     270             :         if (toDefault == null) break;
     271           0 :         return toDefault(this as ToDefault);
     272           0 :       case _Orientation.Horizontally:
     273             :         if (horizontally == null) break;
     274           0 :         return horizontally(this as Horizontally);
     275           0 :       case _Orientation.HorizontallyAndVertically:
     276             :         if (horizontallyAndVertically == null) break;
     277           0 :         return horizontallyAndVertically(this as HorizontallyAndVertically);
     278           0 :       case _Orientation.Vertically:
     279             :         if (vertically == null) break;
     280           0 :         return vertically(this as Vertically);
     281           0 :       case _Orientation.HorizontallyAndRotate90DegreeLeft:
     282             :         if (horizontallyAndRotate90DegreeLeft == null) break;
     283           0 :         return horizontallyAndRotate90DegreeLeft(
     284             :             this as HorizontallyAndRotate90DegreeLeft);
     285           0 :       case _Orientation.Degrees90TowardsRight:
     286             :         if (degrees90TowardsRight == null) break;
     287           0 :         return degrees90TowardsRight(this as Degrees90TowardsRight);
     288           0 :       case _Orientation.HorizontallyAndRotate90DegreesRight:
     289             :         if (horizontallyAndRotate90DegreesRight == null) break;
     290           0 :         return horizontallyAndRotate90DegreesRight(
     291             :             this as HorizontallyAndRotate90DegreesRight);
     292           0 :       case _Orientation.Rotate90DegreesLeft:
     293             :         if (rotate90DegreesLeft == null) break;
     294           0 :         return rotate90DegreesLeft(this as Rotate90DegreesLeft);
     295             :     }
     296             :   }
     297             : 
     298           0 :   @override
     299             :   List get props => const [];
     300             : }
     301             : 
     302             : @immutable
     303             : class ToDefault extends Orientation {
     304           0 :   const ToDefault._() : super(_Orientation.ToDefault);
     305             : 
     306           1 :   factory ToDefault() {
     307             :     _instance ??= const ToDefault._();
     308             :     return _instance;
     309             :   }
     310             : 
     311             :   static ToDefault _instance;
     312             : }
     313             : 
     314             : @immutable
     315             : class Horizontally extends Orientation {
     316           0 :   const Horizontally._() : super(_Orientation.Horizontally);
     317             : 
     318           1 :   factory Horizontally() {
     319             :     _instance ??= const Horizontally._();
     320             :     return _instance;
     321             :   }
     322             : 
     323             :   static Horizontally _instance;
     324             : }
     325             : 
     326             : @immutable
     327             : class HorizontallyAndVertically extends Orientation {
     328           0 :   const HorizontallyAndVertically._()
     329           0 :       : super(_Orientation.HorizontallyAndVertically);
     330             : 
     331           1 :   factory HorizontallyAndVertically() {
     332             :     _instance ??= const HorizontallyAndVertically._();
     333             :     return _instance;
     334             :   }
     335             : 
     336             :   static HorizontallyAndVertically _instance;
     337             : }
     338             : 
     339             : @immutable
     340             : class Vertically extends Orientation {
     341           0 :   const Vertically._() : super(_Orientation.Vertically);
     342             : 
     343           1 :   factory Vertically() {
     344             :     _instance ??= const Vertically._();
     345             :     return _instance;
     346             :   }
     347             : 
     348             :   static Vertically _instance;
     349             : }
     350             : 
     351             : @immutable
     352             : class HorizontallyAndRotate90DegreeLeft extends Orientation {
     353           0 :   const HorizontallyAndRotate90DegreeLeft._()
     354           0 :       : super(_Orientation.HorizontallyAndRotate90DegreeLeft);
     355             : 
     356           1 :   factory HorizontallyAndRotate90DegreeLeft() {
     357             :     _instance ??= const HorizontallyAndRotate90DegreeLeft._();
     358             :     return _instance;
     359             :   }
     360             : 
     361             :   static HorizontallyAndRotate90DegreeLeft _instance;
     362             : }
     363             : 
     364             : @immutable
     365             : class Degrees90TowardsRight extends Orientation {
     366           0 :   const Degrees90TowardsRight._() : super(_Orientation.Degrees90TowardsRight);
     367             : 
     368           1 :   factory Degrees90TowardsRight() {
     369             :     _instance ??= const Degrees90TowardsRight._();
     370             :     return _instance;
     371             :   }
     372             : 
     373             :   static Degrees90TowardsRight _instance;
     374             : }
     375             : 
     376             : @immutable
     377             : class HorizontallyAndRotate90DegreesRight extends Orientation {
     378           0 :   const HorizontallyAndRotate90DegreesRight._()
     379           0 :       : super(_Orientation.HorizontallyAndRotate90DegreesRight);
     380             : 
     381           1 :   factory HorizontallyAndRotate90DegreesRight() {
     382             :     _instance ??= const HorizontallyAndRotate90DegreesRight._();
     383             :     return _instance;
     384             :   }
     385             : 
     386             :   static HorizontallyAndRotate90DegreesRight _instance;
     387             : }
     388             : 
     389             : @immutable
     390             : class Rotate90DegreesLeft extends Orientation {
     391           0 :   const Rotate90DegreesLeft._() : super(_Orientation.Rotate90DegreesLeft);
     392             : 
     393           1 :   factory Rotate90DegreesLeft() {
     394             :     _instance ??= const Rotate90DegreesLeft._();
     395             :     return _instance;
     396             :   }
     397             : 
     398             :   static Rotate90DegreesLeft _instance;
     399             : }

Generated by: LCOV version 1.15