VideoViewerAd constructor

VideoViewerAd({
  1. required Duration durationToSkip,
  2. required Widget child,
  3. Duration? durationToStart,
  4. double? fractionToStart,
  5. Duration durationToEnd = const Duration(seconds: 8),
})

Implementation

VideoViewerAd({
  required this.durationToSkip,
  required this.child,
  this.durationToStart,
  this.fractionToStart,
  this.durationToEnd = const Duration(seconds: 8),
})  : assert(
        (fractionToStart != null && durationToStart == null) ||
            (fractionToStart == null && durationToStart != null),
        "One of the 2 arguments must be assigned.",
      ),
      assert((fractionToStart ?? 0.0) >= 0 && (fractionToStart ?? 1.0) <= 1.0,
          "fractionToStart must be greater or equal than 0.0 and lower or equal than 1.0");