title: How can I fix this error: Struct 'Utf8' is empty. Support for empty structs is deprecated... Use Opaque instead
body: <p>I recently started getting this error when I run my app. It doesn't seem to affect everything, but it is very noisy and annoying in the logs. I didn't change anything or add anything to my app that would cause something like this, the only thing I did recently was upgrade to the latest version of Flutter (I upgrade frequently, so it was only a few days since my last update).</p>
  <pre><code>../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1111:7: Info: Struct 'ENUMLOGFONTEX' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class ENUMLOGFONTEX extends Struct {
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2835:7: Info: Struct 'BLUETOOTH_PIN_INFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class BLUETOOTH_PIN_INFO extends Struct {
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2960:7: Info: Struct 'EXCEPINFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class EXCEPINFO extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2966:7: Info: Struct 'PROPERTYKEY' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class PROPERTYKEY extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2973:7: Info: Struct 'PROPVARIANT' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class PROPVARIANT extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2978:7: Info: Struct 'SAFEARRAY' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class SAFEARRAY extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2985:7: Info: Struct 'CLSID' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class CLSID extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2992:7: Info: Struct 'STATSTG' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class STATSTG extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2999:7: Info: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class NLM_SIMULATED_PROFILE_INFO extends Struct {}
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Info: Struct 'Utf8' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class Utf8 extends Struct {
        ^
  ../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Info: Struct 'Utf16' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
  class Utf16 extends Struct {
        ^
  </code></pre>
  <p>The last error in the list looks slightly different:</p>
  <pre><code>../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Info: Support for using non-constant type arguments 'T' in this FFI API is deprecated and will be removed in the next stable version of Dart. Rewrite the code to ensure that type arguments are compile time constants referring to a valid native type.
    final int totalSize = count * sizeOf&lt;T&gt;();
                                  ^
  </code></pre>
  <p>Any idea how I can fix this? I tried <code>flutter clean</code> but that didn't fix it.</p>
  <p>Here's my <code>flutter doctor</code> output:</p>
  <pre><code>Flutter 1.26.0-13.0.pre.190 • channel master • https://github.com/flutter/flutter.git
  Framework • revision 7db172b24d (50 minutes ago) • 2021-01-26 17:18:40 -0800
  Engine • revision b11bef83a5
  Tools • Dart 2.12.0 (build 2.12.0-263.0.dev)
  
  Running flutter doctor...
  Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel master, 1.26.0-13.0.pre.190, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US)
  [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
  [✓] Xcode - develop for iOS and macOS
  [✓] Chrome - develop for the web
  [✓] Android Studio (version 4.1)
  [✓] IntelliJ IDEA Community Edition (version 2020.3.1)
  [✓] VS Code (version 1.52.1)
  [✓] Connected device (2 available)
  
  • No issues found!
  </code></pre>