fix platform specific code not working on web pt2

This commit is contained in:
2026-02-25 12:16:53 +02:00
parent 5135629b33
commit 221030eff3
2 changed files with 2 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ class _MihPackageState extends State<MihPackage>
// _peakAnimation();
// });
// }
if (!kIsWeb && Platform.isAndroid || Platform.isIOS) {
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
// Trigger the peak animation only AFTER the route transition is complete
WidgetsBinding.instance.addPostFrameCallback((_) {
final ModalRoute? currentRoute = ModalRoute.of(context);