On iOS when you launch or restart the app there is a lot of warnings about empty structs.
% flutter doctor -v
[✓] Flutter (Channel dev, 1.27.0-1.0.pre, on macOS 11.2.1 20D74 darwin-x64, locale en-US)
• Flutter version 1.27.0-1.0.pre at /Users/lukepighetti/development/flutter
• Framework revision 68c96f100e (8 days ago), 2021-02-08 16:14:15 -0800
• Engine revision b04955656c
• Dart version 2.13.0 (build 2.13.0-0.0.dev)
cached_network_image: ^2.5.0
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/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 {}
^
../../../.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 {
^
../../../.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 {
^
../../../.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<T>();
^
package:win32 should be updated to 2.0.0.
But win32 is not used by flutter_cached_network_image, so I guess this issue is posted in the wrong repository.
@lukepighetti Do you use win32 or any package that depends on win32 in your app? https://pub.dev/packages?q=dependency%3Awin32
This issue is only triggered when I use flutter_cached_network_image. I have determined that much. I agree that it doesn't make any sense.
ref: https://github.com/flutter/flutter/issues/75113#issuecomment-779852695
@dcharkes can you give us any information on why this would be triggering only when I add flutter_cached_network_image as a dependency and import it into a dart file? It seems like an odd way to trigger the issue which doesn't appear to depend on package:win32
The question is how win32 is part of your project. What does pub deps print?
Found it in this tree
|-- cached_network_image 2.5.0
| |-- flutter...
| |-- flutter_cache_manager 2.1.1
| | |-- clock...
| | |-- file 5.2.1
| | | |-- intl...
| | | |-- meta...
| | | '-- path...
| | |-- flutter...
| | |-- http 0.12.2
| | | |-- http_parser...
| | | |-- path...
| | | '-- pedantic...
| | |-- image 2.1.19
| | | |-- archive 2.0.13
| | | | |-- args...
| | | | |-- crypto...
| | | | '-- path...
| | | |-- meta...
| | | '-- xml 4.5.1
| | | |-- collection...
| | | |-- convert...
| | | |-- meta...
| | | '-- petitparser 3.1.0
| | | '-- meta...
| | |-- path...
| | |-- path_provider 1.6.27
| | | |-- flutter...
| | | |-- path_provider_linux 0.0.1+2
| | | | |-- flutter...
| | | | |-- path...
| | | | |-- path_provider_platform_interface...
| | | | '-- xdg_directories 0.1.2
| | | | |-- meta...
| | | | |-- path...
| | | | '-- process 3.0.13
| | | | |-- file...
| | | | |-- intl...
| | | | |-- meta...
| | | | |-- path...
| | | | '-- platform...
| | | |-- path_provider_macos 0.0.4+8
| | | | '-- flutter...
| | | |-- path_provider_platform_interface 1.0.4
| | | | |-- flutter...
| | | | |-- meta...
| | | | |-- platform 3.0.0
| | | | '-- plugin_platform_interface...
| | | '-- path_provider_windows 0.0.4+3
| | | |-- ffi 0.1.3
| | | |-- flutter...
| | | |-- meta...
| | | |-- path...
| | | |-- path_provider_platform_interface...
| | | '-- win32 1.7.4+1
| | | '-- ffi...
Full tree
% flutter pub deps
Dart SDK 2.13.0-0.0.dev
Flutter SDK 1.27.0-1.0.pre
vgl 1.0.0+1
|-- build_runner 1.11.1
| |-- args 1.6.0
| |-- async...
| |-- build...
| |-- build_config...
| |-- build_daemon 2.1.7
| | |-- built_collection 5.0.0
| | |-- built_value 8.0.0
| | | |-- built_collection...
| | | |-- collection...
| | | '-- fixnum 1.0.0
| | |-- http_multi_server...
| | |-- logging...
| | |-- path...
| | |-- pedantic...
| | |-- pool...
| | |-- shelf...
| | |-- shelf_web_socket...
| | |-- stream_transform...
| | |-- watcher...
| | '-- web_socket_channel...
| |-- build_resolvers 1.5.3
| | |-- analyzer...
| | |-- build...
| | |-- crypto...
| | |-- graphs...
| | |-- logging...
| | |-- meta...
| | |-- package_config...
| | |-- path...
| | |-- pool...
| | '-- pub_semver...
| |-- build_runner_core 6.1.7
| | |-- async...
| | |-- build...
| | |-- build_config...
| | |-- build_resolvers...
| | |-- collection...
| | |-- convert...
| | |-- crypto...
| | |-- glob...
| | |-- graphs...
| | |-- logging...
| | |-- meta...
| | |-- package_config...
| | |-- path...
| | |-- pedantic...
| | |-- pool...
| | |-- timing...
| | |-- watcher...
| | '-- yaml...
| |-- code_builder 3.6.0
| | |-- built_collection...
| | |-- built_value...
| | |-- collection...
| | |-- matcher...
| | '-- meta...
| |-- collection...
| |-- crypto 2.1.5
| | |-- collection...
| | |-- convert...
| | '-- typed_data...
| |-- dart_style 1.3.12
| | |-- analyzer...
| | |-- args...
| | |-- path...
| | |-- pub_semver...
| | '-- source_span...
| |-- glob 1.2.0
| | |-- async...
| | |-- collection...
| | |-- node_io 1.2.0
| | | |-- file...
| | | |-- node_interop 1.2.1
| | | | '-- js...
| | | '-- path...
| | |-- path...
| | |-- pedantic...
| | '-- string_scanner...
| |-- graphs 0.2.0
| |-- http_multi_server 2.2.0
| | '-- async...
| |-- io 0.3.4
| | |-- charcode...
| | |-- meta...
| | |-- path...
| | '-- string_scanner...
| |-- js 0.6.3
| |-- logging 1.0.0
| |-- meta...
| |-- mime 1.0.0
| |-- path...
| |-- pedantic 1.10.0
| |-- pool 1.5.0
| | |-- async...
| | '-- stack_trace...
| |-- pub_semver 2.0.0
| | '-- collection...
| |-- pubspec_parse 0.1.8
| | |-- checked_yaml...
| | |-- json_annotation...
| | |-- pub_semver...
| | '-- yaml...
| |-- shelf 0.7.9
| | |-- async...
| | |-- collection...
| | |-- http_parser...
| | |-- path...
| | |-- stack_trace...
| | '-- stream_channel...
| |-- shelf_web_socket 0.2.4
| | |-- shelf...
| | |-- stream_channel...
| | '-- web_socket_channel...
| |-- stack_trace...
| |-- stream_transform 2.0.0
| |-- timing 0.1.1+3
| | '-- json_annotation...
| |-- watcher 1.0.0
| | |-- async...
| | |-- path...
| | '-- pedantic...
| |-- web_socket_channel 1.2.0
| | |-- async...
| | |-- crypto...
| | '-- stream_channel...
| '-- yaml 3.0.0
| |-- charcode...
| |-- collection...
| |-- source_span...
| '-- string_scanner...
|-- cached_network_image 2.5.0
| |-- flutter...
| |-- flutter_cache_manager 2.1.1
| | |-- clock...
| | |-- file 5.2.1
| | | |-- intl...
| | | |-- meta...
| | | '-- path...
| | |-- flutter...
| | |-- http 0.12.2
| | | |-- http_parser...
| | | |-- path...
| | | '-- pedantic...
| | |-- image 2.1.19
| | | |-- archive 2.0.13
| | | | |-- args...
| | | | |-- crypto...
| | | | '-- path...
| | | |-- meta...
| | | '-- xml 4.5.1
| | | |-- collection...
| | | |-- convert...
| | | |-- meta...
| | | '-- petitparser 3.1.0
| | | '-- meta...
| | |-- path...
| | |-- path_provider 1.6.27
| | | |-- flutter...
| | | |-- path_provider_linux 0.0.1+2
| | | | |-- flutter...
| | | | |-- path...
| | | | |-- path_provider_platform_interface...
| | | | '-- xdg_directories 0.1.2
| | | | |-- meta...
| | | | |-- path...
| | | | '-- process 3.0.13
| | | | |-- file...
| | | | |-- intl...
| | | | |-- meta...
| | | | |-- path...
| | | | '-- platform...
| | | |-- path_provider_macos 0.0.4+8
| | | | '-- flutter...
| | | |-- path_provider_platform_interface 1.0.4
| | | | |-- flutter...
| | | | |-- meta...
| | | | |-- platform 3.0.0
| | | | '-- plugin_platform_interface...
| | | '-- path_provider_windows 0.0.4+3
| | | |-- ffi 0.1.3
| | | |-- flutter...
| | | |-- meta...
| | | |-- path...
| | | |-- path_provider_platform_interface...
| | | '-- win32 1.7.4+1
| | | '-- ffi...
| | |-- pedantic...
| | |-- rxdart 0.25.0
| | |-- sqflite 1.3.2+3
| | | |-- flutter...
| | | |-- path...
| | | '-- sqflite_common 1.0.3+1
| | | |-- meta...
| | | |-- path...
| | | '-- synchronized 2.2.0+2
| | '-- uuid 2.2.2
| | |-- convert...
| | '-- crypto...
| '-- octo_image 0.3.0
| |-- flutter...
| '-- flutter_blurhash 0.5.0
| |-- flutter...
| '-- meta...
|-- cupertino_icons 1.0.2
|-- firebase_auth 0.20.0+1
| |-- firebase_auth_platform_interface 3.0.1
| | |-- firebase_core...
| | |-- flutter...
| | |-- meta...
| | '-- plugin_platform_interface...
| |-- firebase_auth_web 0.3.2+6
| | |-- firebase_auth_platform_interface...
| | |-- firebase_core...
| | |-- firebase_core_web...
| | |-- flutter...
| | |-- flutter_web_plugins 0.0.0
| | | |-- characters...
| | | |-- collection...
| | | |-- flutter...
| | | |-- js...
| | | |-- meta...
| | | |-- typed_data...
| | | '-- vector_math...
| | |-- http_parser 3.1.4
| | | |-- charcode...
| | | |-- collection...
| | | |-- source_span...
| | | |-- string_scanner...
| | | '-- typed_data...
| | |-- intl 0.16.1
| | | '-- path...
| | |-- js...
| | '-- meta...
| |-- firebase_core...
| |-- firebase_core_platform_interface 3.0.1
| | |-- flutter...
| | |-- meta...
| | |-- plugin_platform_interface 1.0.3
| | | '-- meta...
| | '-- quiver...
| |-- flutter...
| '-- meta...
|-- firebase_core 0.7.0
| |-- firebase_core_platform_interface...
| |-- firebase_core_web 0.2.1+3
| | |-- firebase_core_platform_interface...
| | |-- flutter...
| | |-- flutter_web_plugins...
| | |-- js...
| | '-- meta...
| |-- flutter...
| |-- meta...
| '-- quiver 2.1.5
| |-- matcher...
| '-- meta...
|-- firebase_database 6.0.0
| |-- firebase_core...
| '-- flutter...
|-- firebase_storage 7.0.0
| |-- firebase_core...
| |-- firebase_core_platform_interface...
| |-- firebase_storage_platform_interface 1.0.4
| | |-- collection...
| | |-- firebase_core...
| | |-- flutter...
| | |-- meta...
| | '-- plugin_platform_interface...
| |-- firebase_storage_web 0.1.1+3
| | |-- async...
| | |-- crypto...
| | |-- firebase_core...
| | |-- firebase_core_web...
| | |-- firebase_storage_platform_interface...
| | |-- flutter...
| | |-- flutter_web_plugins...
| | |-- http...
| | |-- js...
| | '-- meta...
| |-- flutter...
| '-- quiver...
|-- flutter 0.0.0
| |-- characters 1.1.0
| |-- collection 1.15.0
| |-- meta 1.3.0
| |-- sky_engine 0.0.99
| |-- typed_data 1.3.0
| | '-- collection...
| '-- vector_math 2.1.0
|-- flutter_brand_icons 1.1.0
| '-- flutter...
|-- flutter_test 0.0.0
| |-- async 2.5.0
| | '-- collection...
| |-- boolean_selector 2.1.0
| | |-- source_span...
| | '-- string_scanner...
| |-- characters...
| |-- charcode 1.2.0
| |-- clock 1.1.0
| |-- collection...
| |-- fake_async 1.2.0
| | |-- clock...
| | '-- collection...
| |-- flutter...
| |-- matcher 0.12.10
| | '-- stack_trace...
| |-- meta...
| |-- path...
| |-- source_span 1.8.0
| | |-- charcode...
| | |-- collection...
| | |-- path...
| | '-- term_glyph...
| |-- stack_trace 1.10.0
| | '-- path...
| |-- stream_channel 2.1.0
| | '-- async...
| |-- string_scanner 1.1.0
| | |-- charcode...
| | '-- source_span...
| |-- term_glyph 1.2.0
| |-- test_api 0.2.19
| | |-- async...
| | |-- boolean_selector...
| | |-- collection...
| | |-- matcher...
| | |-- meta...
| | |-- path...
| | |-- source_span...
| | |-- stack_trace...
| | |-- stream_channel...
| | |-- string_scanner...
| | '-- term_glyph...
| |-- typed_data...
| '-- vector_math...
|-- freezed 0.12.7
| |-- analyzer...
| |-- build...
| |-- build_config...
| |-- freezed_annotation...
| |-- meta...
| '-- source_gen...
|-- freezed_annotation 0.12.0
| |-- collection...
| |-- json_annotation 3.1.1
| '-- meta...
|-- image_cropper 1.3.1
| '-- flutter...
|-- image_picker 0.6.7+22
| |-- flutter...
| |-- flutter_plugin_android_lifecycle 1.0.11
| | '-- flutter...
| '-- image_picker_platform_interface 1.1.6
| |-- flutter...
| |-- http...
| |-- meta...
| '-- plugin_platform_interface...
|-- json_serializable 3.5.1
| |-- analyzer 0.41.2
| | |-- _fe_analyzer_shared 14.0.0
| | | '-- meta...
| | |-- args...
| | |-- cli_util 0.3.0
| | | |-- meta...
| | | '-- path...
| | |-- collection...
| | |-- convert 2.1.1
| | | |-- charcode...
| | | '-- typed_data...
| | |-- crypto...
| | |-- glob...
| | |-- meta...
| | |-- package_config 1.9.3
| | | |-- charcode...
| | | '-- path...
| | |-- path...
| | |-- pub_semver...
| | |-- source_span...
| | |-- watcher...
| | '-- yaml...
| |-- build 1.6.2
| | |-- analyzer...
| | |-- async...
| | |-- convert...
| | |-- crypto...
| | |-- glob...
| | |-- logging...
| | |-- meta...
| | '-- path...
| |-- build_config 0.4.5
| | |-- checked_yaml 1.0.4
| | | |-- json_annotation...
| | | |-- source_span...
| | | '-- yaml...
| | |-- json_annotation...
| | |-- meta...
| | |-- path...
| | |-- pubspec_parse...
| | '-- yaml...
| |-- json_annotation...
| |-- meta...
| |-- path 1.8.0
| '-- source_gen 0.9.10+2
| |-- analyzer...
| |-- async...
| |-- build...
| |-- dart_style...
| |-- glob...
| |-- meta...
| |-- path...
| |-- pedantic...
| '-- source_span...
|-- material_tag_editor 0.0.6
| '-- flutter...
|-- provider 4.3.3
| |-- collection...
| |-- flutter...
| '-- nested 0.0.4
| '-- flutter...
|-- sign_in_with_apple 2.5.4
| |-- flutter...
| '-- meta...
'-- sprung 2.0.1+1
'-- flutter...
Ah, so it is the path_provider_windows dependency. I didn't expect that to give warnings when running on iOS. The upgrade of path_provider will be part of migrating to null safety.
Yes, these warnings are part of the deprecation of dart:ffi things in Dart 2.12, which is the same release as the one introducing null safety.
The warnings themselves are harmless, they are deprecation notices. They'll become errors in Dart 2.13.
<- author of the deprecation notices.
Might be the wrong issue to write this but they are pretty jarring. Every time I reload my flutter app, which is every minute or so, it blows out my console.
Do you also have the warnings on the beta channel 1.26.0-17.5.pre? They should have been hidden in https://github.com/dart-lang/sdk/issues/44869 in Dart 2.12.0-259.9.beta.
I have them on dev channel 1.27.0-1.0.pre. Appreciate the attention, btw.
So as of now, it is impossible to compile on Android using this package on Flutter beta/dev/master, until the path_provider version is updated.
I originally filed a Flutter issue on this, see more discussion here: flutter/flutter#76705
Might be the wrong issue to write this but they are pretty jarring. Every time I reload my flutter app, which is every minute or so, it blows out my console.
I also have this issue.
I didn't expect that to give warnings when running on iOS.
Currently (the feature necessary to fix this just landed on master, so it'll be a little while before the plugin can change to use it) there's no way to register path_provider_windows as the Windows implementation of path_provider without having an import of path_provider_windows in path_provider, so unfortunately it's pulled in on every platform (except web).
(And Dart doesn't do tree shaking based on Platform)
I had the same issue, and I got around it by overriding path_provider in pubspec.yaml:
dependency_overrides:
path_provider: ^2.0.0
Should also be fixed by using cached_network_image: ^3.0.0-nullsafety.
Most helpful comment
Should also be fixed by using
cached_network_image: ^3.0.0-nullsafety.