From dd14cad0dde5b3a634736f0a10005a0ceb59bfec Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 6 Dec 2022 09:29:42 +0100 Subject: [PATCH] [flutter] Fix analyzer error in init_web.dart, ignore incorrectly bound types This is necessary as this source file actually requires the bound C ffi types to link against Opaque from web_ffi. However, the analyzer doesn't trigger inclusion of web_ffi in the generated bindings file, links against dart:ffi instead, and trips. --- spine-flutter/CHANGELOG.md | 3 +++ spine-flutter/example/lib/animation_state_events.dart | 1 + spine-flutter/lib/init_web.dart | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spine-flutter/CHANGELOG.md b/spine-flutter/CHANGELOG.md index 215ae3b70..7a2b7becf 100644 --- a/spine-flutter/CHANGELOG.md +++ b/spine-flutter/CHANGELOG.md @@ -1,3 +1,6 @@ +# 4.2.6 +* Fix analyzer errors, fix code style to adhere to Dart standards. + # 4.2.5 * Implemented batching of render commands, reducing the number of draw calls. 60/120fps for 100 Spineboys on all platforms. diff --git a/spine-flutter/example/lib/animation_state_events.dart b/spine-flutter/example/lib/animation_state_events.dart index 94ea202ce..9f78007ea 100644 --- a/spine-flutter/example/lib/animation_state_events.dart +++ b/spine-flutter/example/lib/animation_state_events.dart @@ -1,3 +1,4 @@ +// ignore_for_file: avoid_print import 'package:flutter/material.dart'; import 'package:esotericsoftware_spine_flutter/spine_flutter.dart'; diff --git a/spine-flutter/lib/init_web.dart b/spine-flutter/lib/init_web.dart index e63495f26..920bd5510 100644 --- a/spine-flutter/lib/init_web.dart +++ b/spine-flutter/lib/init_web.dart @@ -1,3 +1,4 @@ +// ignore_for_file: type_argument_not_matching_bounds import 'package:flutter/services.dart'; import 'package:inject_js/inject_js.dart' as js; import 'package:web_ffi_fork/web_ffi.dart'; @@ -17,7 +18,6 @@ Future initSpineFlutterFFI() async { if (_module == null) { Memory.init(); - var v = 0; registerOpaqueType(); registerOpaqueType(); registerOpaqueType();