Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Add explicit weak/strong/copy annotations #37768

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ FLUTTER_DARWIN_EXPORT
*
* Set this to nil to pass no arguments to the Dart entrypoint.
*/
@property(nonatomic, nullable, strong) NSArray<NSString*>* dartEntrypointArguments;
@property(nonatomic, nullable, copy) NSArray<NSString*>* dartEntrypointArguments;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ FLUTTER_DARWIN_EXPORT
* }
* ```
*/
@property(readwrite, nonatomic, nullable) NSColor* backgroundColor;
@property(readwrite, nonatomic, nullable, copy) NSColor* backgroundColor;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ - (void)resolveTo:(BOOL)handled;
* Only set in debug mode. Nil in release mode, or if the callback has not been
* handled.
*/
@property(nonatomic) NSString* debugHandleSource;
@property(nonatomic, copy) NSString* debugHandleSource;
@end

@implementation FlutterKeyCallbackGuard {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ typedef void (^FlutterAsyncKeyCallback)(BOOL handled);
* deriving logical keys.
*/
@required
@property(nonatomic) NSMutableDictionary<NSNumber*, NSNumber*>* _Nullable layoutMap;
@property(nonatomic, nullable, strong) NSMutableDictionary<NSNumber*, NSNumber*>* layoutMap;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ - (void)respondTextInputWith:(BOOL)response;
- (void)recordCallTypesTo:(nonnull NSMutableArray<NSNumber*>*)typeStorage
forTypes:(uint32_t)typeMask;

@property(nonatomic) FlutterKeyboardManager* manager;
@property(nonatomic) NSResponder* nextResponder;
@property(readonly, nonatomic, strong) FlutterKeyboardManager* manager;
@property(nonatomic, nullable, strong) NSResponder* nextResponder;

#pragma mark - Private

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ - (void)setPlatformNode:(flutter::FlutterTextPlatformNode*)node;

@interface FlutterTextFieldMock : FlutterTextField

@property(nonatomic) NSString* lastUpdatedString;
@property(nonatomic, nullable, copy) NSString* lastUpdatedString;
@property(nonatomic) NSRange lastUpdatedSelection;

@end
Expand Down