prismMotion method
Returns preferred, or Duration.zero when the platform asks for reduced
motion.
Read this instead of MediaQuery.disableAnimationsOf directly: it also
handles the "no MediaQuery above me" case, which happens in tests and in
widgets rendered outside a MaterialApp.
Implementation
Duration prismMotion(Duration preferred) =>
MediaQuery.maybeDisableAnimationsOf(this) ?? false
? Duration.zero
: preferred;