''Size' is imported from both 'dart:ffi' and 'dart:ui' Flutter 3

After upgrading my flutter from 2.10.5 to 3.0.0, I have those errors on my android studio and the project don't build anymore on windows 10. How can I solve this problems. Thanks

'Size' is imported from both 'dart:ffi' and 'dart:ui'.

enter image description here



Solution 1:[1]

bitsdojo_window package seems to have issues when Flutter 3 was introduced. One of possible ways is to run this command on your terminal

dart fix --apply

and

flutter pub upgrade 

Solution 2:[2]

This happens because of Flutter 3.0. This package needs to get updated for Flutter 3.0 check This Link for the answer it requires an update which the developer said he's working on it

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Hayder Ali