fromJson method

  1. @override
PageTransitionsTheme? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

@override
PageTransitionsTheme? fromJson(Map<String, dynamic>? json) {
  if (json == null) return null;

  var builders = <TargetPlatform, PageTransitionsBuilder>{};
  json['builders']?.forEach(
    (key, json) =>
        builders[const NullableTargetPlatformConverter().fromJson(key)!] =
            const PageTransitionsBuilderConverter().fromJson(json),
  );

  return PageTransitionsTheme(
    builders: builders,
  );
}