parseTransitionsBuilder function

PageTransitionsBuilder parseTransitionsBuilder(
  1. String? tb,
  2. PageTransitionsBuilder defaultBuilder
)

Implementation

PageTransitionsBuilder parseTransitionsBuilder(
    String? tb, PageTransitionsBuilder defaultBuilder) {
  switch (tb?.toLowerCase()) {
    case "fadeupwards":
      return const FadeUpwardsPageTransitionsBuilder();
    case "openupwards":
      return const OpenUpwardsPageTransitionsBuilder();
    case "cupertino":
      return const CupertinoPageTransitionsBuilder();
    case "zoom":
      return const ZoomPageTransitionsBuilder();
    case "none":
      return const NoPageTransitionsBuilder();
    case "predictive":
      return const PredictiveBackPageTransitionsBuilder();
    default:
      return defaultBuilder;
  }
}