File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/flutter_box_transform/example/lib Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -330,14 +330,15 @@ class _PlaygroundState extends State<Playground> with WidgetsBindingObserver {
330330
331331 late final FocusNode focusNode = FocusNode ();
332332
333+ late final PlaygroundModel model = context.read <PlaygroundModel >();
334+
333335 @override
334336 void initState () {
335337 super .initState ();
336338
337339 // This is required to center the box based on screen size when the app
338340 // starts.
339341 SchedulerBinding .instance.addPostFrameCallback ((_) {
340- final PlaygroundModel model = context.read <PlaygroundModel >();
341342 model.reset (context);
342343 });
343344
@@ -347,7 +348,7 @@ class _PlaygroundState extends State<Playground> with WidgetsBindingObserver {
347348 @override
348349 void didChangeDependencies () {
349350 super .didChangeDependencies ();
350- // resetPlayground();
351+ if (model.playgroundArea == null ) resetPlayground ();
351352 }
352353
353354 @override
You can’t perform that action at this time.
0 commit comments