window_manager icon indicating copy to clipboard operation
window_manager copied to clipboard

Error in setBounds() method

Open iremceliksena opened this issue 2 years ago • 1 comments

I set the screen to a certain point with the setbounds function and change the page content. I get the following error when using the setbounds function. I checked the entire process using checkpoints, I get an error when I use the setbounds function.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/scroll_activity.dart': Failed assertion: line 622 pos 15: 'duration > Duration.zero': is not true.

error

I've tried many variations of the setbounds function and I get the same error in all of them. Should I use a different method to adjust the screen to a certain position?

await windowManager.setBounds( null, position: Offset((0.95).sw, (0.9).sh), size: Size(100.w, 50.h), animate: true, );

await windowManager.setBounds( Rect.fromCenter( center: Offset( (0.95).sw, (0.9).sh, ), width: 100.w, height: 50.h, ), position: Offset((0.95).sw, (0.9).sh), size: Size(100.w, 50.h), animate: true, );

await windowManager.setBounds( Rect.fromCenter( center: Offset( (0.95).sw, (0.9).sh, ), width: 100.w, height: 50.h, ), );

......

iremceliksena avatar Sep 27 '23 14:09 iremceliksena

Heya, can you give a full minimum reproducible example?

damywise avatar Sep 27 '23 15:09 damywise