PageViewModel constructor

PageViewModel({
  1. String? title,
  2. Widget? titleWidget,
  3. String? body,
  4. Widget? bodyWidget,
  5. Widget? image,
  6. Widget? footer,
  7. bool reverse = false,
  8. PageDecoration decoration = const PageDecoration(),
  9. bool useScrollView = true,
  10. ScrollViewKeyboardDismissBehavior scrollViewKeyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  11. bool useRowInLandscape = false,
})

Implementation

PageViewModel({
  this.title,
  this.titleWidget,
  this.body,
  this.bodyWidget,
  this.image,
  this.footer,
  this.reverse = false,
  this.decoration = const PageDecoration(),
  this.useScrollView = true,
  this.scrollViewKeyboardDismissBehavior =
      ScrollViewKeyboardDismissBehavior.manual,
  this.useRowInLandscape = false,
})  : assert(
        title != null || titleWidget != null,
        "You must provide either title (String) or titleWidget (Widget).",
      ),
      assert(
        (title == null) != (titleWidget == null),
        "You can not provide both title and titleWidget.",
      ),
      assert(
        body != null || bodyWidget != null,
        "You must provide either body (String) or bodyWidget (Widget).",
      ),
      assert(
        (body == null) != (bodyWidget == null),
        "You can not provide both body and bodyWidget.",
      );