Setting & Limiting the Window Size | raywenderlich.com

Learn how to set the window size of your app and set the minimum size of the window.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/21546762-flutter-desktop-apps-getting-started/lessons/4

I get an error:

The name 'Size' is defined in the libraries 'dart:ffi' and 'dart:ui'.
Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.dartambiguous_import
'Size' isn't a function.
Try correcting the name to match an existing function, or define a method or function named 'Size'.dartinvocation_of_non_function

Fixed it by changing:

import 'dart:ffi';
import 'dart:io';

to:

import 'dart:ffi' hide Size;
import 'dart:io';

Can you let me know which file you are talking about? I assume main.dart. I just opened the project (final) with the Android Studio Bumblebee and it ran fine. No issues with Size. This should be from the geometry.dart

Yes, main.dart. I’m using VSCode.

I tried opening both the starter and final projects in VSCode and didn’t see any problems. Can you compare your main.dart with the final main.dart?