-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
There are several places in the plugin's OjbC code could be cleaned up.
-
Some properties could be updated to (nonatomic) to enhance the performance. For example: https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.h#L22
This pattern was initially introduced in one of the first plugin commits (flutter/plugins@2db1f4b) and never documented why atomic was necessary. I did a scan of all the plugin code and didn't find a place where these properties are accessed or updated in different threads. -
Some method could be renamed to better ObjC naming convention. For example: https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.h#L36 can be renamed to
removeCircleWithIdentifiers -
Objc properties can be used instead of local variables. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapMarkerController.m#L12-L14 -
Some unnecessary static functions can be removed. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapCircleController.m#L59 -
Many Objective-C APIs do not have documents/comments, which makes the code hard to reason about. For example:
https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapController.h#L42 -
Add generics to Collection objects, for example: NSArray<NSString >
-
Make all the header files assume non-null and add nullability prefixes if necessary. See https://github.com/flutter/plugins/blob/main/packages/google_maps_flutter/google_maps_flutter/ios/Classes/FLTGoogleMapTileOverlayController.h#L8