We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2906df7 commit 868ce0eCopy full SHA for 868ce0e
example/lib/main.dart
@@ -265,11 +265,10 @@ class _ContentViewState extends State<ContentView> with WidgetsBindingObserver {
265
266
SchedulerBinding.instance.addPostFrameCallback((_) {
267
controller.setClampingRect(getArea(), notify: false);
268
- controller.setRect(Rect.fromLTWH(
269
- controller.clampingRect.left,
270
- controller.clampingRect.top,
271
- min(500, controller.clampingRect.width),
272
- controller.clampingRect.height,
+ controller.setRect(Rect.fromCenter(
+ center: controller.clampingRect.center,
+ width: min(500, controller.clampingRect.width),
+ height: controller.clampingRect.height,
273
));
274
if (mounted) setState(() {});
275
});
0 commit comments