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:async';
import 'dart:io';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -56,20 +55,13 @@ Future<T?> showBlurDialog<T>({
barrierColor: Colors.black12, barrierColor: Colors.black12,
pageBuilder: (ctx, anim1, anim2) => builder(ctx), pageBuilder: (ctx, anim1, anim2) => builder(ctx),
transitionDuration: const Duration(milliseconds: 150), transitionDuration: const Duration(milliseconds: 150),
transitionBuilder: (ctx, anim1, anim2, child) { transitionBuilder: (ctx, anim1, anim2, child) => BackdropFilter(
var sigma = 20 * anim1.value; filter: ImageFilter.blur(
// Flutter 3.3 has an issue with rendering this on Android. sigmaX: 20 * anim1.value, sigmaY: 20 * anim1.value),
// 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( child: FadeTransition(
opacity: anim1, opacity: anim1,
child: child, child: child,
), ),
); ),
},
routeSettings: routeSettings, routeSettings: routeSettings,
); );