diff --git a/pkgs/ffigen/test/native_objc_test/global_native_test.dart b/pkgs/ffigen/test/native_objc_test/global_native_test.dart index 2f1d0b9d1..7a5949a94 100644 --- a/pkgs/ffigen/test/native_objc_test/global_native_test.dart +++ b/pkgs/ffigen/test/native_objc_test/global_native_test.dart @@ -38,7 +38,7 @@ void main() { Pointer globalObjectRefCountingInner() { globalObject = NSObject.new1(); - final obj1raw = globalObject.ref.pointer; + final obj1raw = globalObject!.ref.pointer; expect(objectRetainCount(obj1raw), greaterThan(0)); return obj1raw; } diff --git a/pkgs/ffigen/test/native_objc_test/global_test.dart b/pkgs/ffigen/test/native_objc_test/global_test.dart index 0a2527f29..4bdd3180e 100644 --- a/pkgs/ffigen/test/native_objc_test/global_test.dart +++ b/pkgs/ffigen/test/native_objc_test/global_test.dart @@ -40,7 +40,7 @@ void main() { Pointer globalObjectRefCountingInner() { lib.globalObject = NSObject.new1(); - final obj1raw = lib.globalObject.ref.pointer; + final obj1raw = lib.globalObject!.ref.pointer; expect(objectRetainCount(obj1raw), greaterThan(0)); return obj1raw; }