Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM not working with Animated Container when using code transform: Matrix4.identity()..scale(visible?1:0.7,) #546

Open
Mizan84 opened this issue Oct 11, 2024 · 0 comments

Comments

@Mizan84
Copy link

Mizan84 commented Oct 11, 2024

Problem description

WASM not working with Animated Container when using code transform: Matrix4.identity()..scale(visible?1:0.7,) But instead of 1 using any other number work with WASM.

Steps to reproduce

import 'package:flutter/material.dart';

class TestAnimatedContainer extends StatefulWidget {
const TestAnimatedContainer({super.key});

@OverRide
State createState() => _TestAnimatedContainerState();
}

class _TestAnimatedContainerState extends State {
bool zoom = false;

@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
AnimatedContainer(
duration: Duration(milliseconds: 400),
width: 400,
height: 300,
color: Colors.purple,
transform: Matrix4.identity()..scale(zoom ? 1 : .7),
),
TextButton(
onPressed: () {
setState(() {
zoom = !zoom;
});
},
child: Text(
'Zoom',
style: TextStyle(fontSize: 24,color: Colors.black),
))
],
),
);
}
}

Expected behavior

On pressing the zoom button repeatedly the AnimatedContainer should zoomin and zoomout

Actual behavior

Normally work fine. but when running with flutter run --wasm then it doesn't work.

Environment

flutter 3.24.3

Additional details

transform: Matrix4.identity()..scale(zoom ? 1 : .7), here instead of 1 using any other number work in WASM. Such as transform: Matrix4.identity()..scale(zoom ? 0.99 : .7), work in WASM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant