Revert "Add workaround for rendering issue on Android."

This reverts commit 885fe439b6.
This commit is contained in:
Adam Velebil 2022-10-06 08:15:12 +02:00
parent b041d4cca6
commit 88fead73b2
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084

View File

@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
@ -56,20 +55,13 @@ Future<T?> showBlurDialog<T>({
barrierColor: Colors.black12,
pageBuilder: (ctx, anim1, anim2) => builder(ctx),
transitionDuration: const Duration(milliseconds: 150),
transitionBuilder: (ctx, anim1, anim2, child) {
var sigma = 20 * anim1.value;
// Flutter 3.3 has an issue with rendering this on Android.
// Workaround: Don't animate the un-blur.
if (Platform.isAndroid && anim1.status == AnimationStatus.reverse) {
sigma = 0;
}
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: sigma, sigmaY: sigma),
child: FadeTransition(
opacity: anim1,
child: child,
),
);
},
transitionBuilder: (ctx, anim1, anim2, child) => BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 20 * anim1.value, sigmaY: 20 * anim1.value),
child: FadeTransition(
opacity: anim1,
child: child,
),
),
routeSettings: routeSettings,
);