Skip to content

Commit 6aaf398

Browse files
authored
Update mentions of isInstance and castFrom (#2853)
1 parent 9d538ae commit 6aaf398

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkgs/ffigen/doc/objc_runtime_types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ completely irrelevant when doing Objective-C interop.
3131
Dart's `is` keyword checks the Dart runtime type. You shouldn't use
3232
this on Objective-C objects, because the Dart runtime type is irrelevant, and
3333
often won't match the Objective-C runtime type. Instead of `x is Foo`,
34-
use `Foo.isInstance(x)`.
34+
use `Foo.isA(x)`.
3535

3636
Dart's `as` keyword changes the static type of an object (and also
3737
checks its runtime type). You shouldn't use this on Objective-C objects,
3838
because the runtime type check may fail since the Dart runtime
3939
type often won't match the Objective-C runtime type. Instead of `x as Foo`,
40-
use `Foo.castFrom(x)`.
40+
use `Foo.as(x)`.

0 commit comments

Comments
 (0)