Skip to content
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 @@ -31,4 +31,13 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar;
@end

/// Implementation of the Pigeon maps API.
///
/// This is a separate object from the maps controller because the Pigeon API registration keeps a
/// strong reference to the implementor, but as the FlutterPlatformView, the lifetime of the
/// FLTGoogleMapController instance is what needs to trigger Pigeon unregistration, so can't be
/// the target of the registration.
@interface FGMMapCallHandler : NSObject <FGMMapsApi>
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,12 @@ - (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar

#pragma mark -

/// Implementation of the Pigeon maps API.
///
/// This is a separate object from the maps controller because the Pigeon API registration keeps a
/// strong reference to the implementor, but as the FlutterPlatformView, the lifetime of the
/// FLTGoogleMapController instance is what needs to trigger Pigeon unregistration, so can't be
/// the target of the registration.
@interface FGMMapCallHandler : NSObject <FGMMapsApi>
/// Private declarations of the FGMMapCallHandler.
@interface FGMMapCallHandler ()
- (instancetype)initWithMapController:(nonnull FLTGoogleMapController *)controller
messenger:(NSObject<FlutterBinaryMessenger> *)messenger
pigeonSuffix:(NSString *)suffix;
@end

/// Private declarations.
// This is separate in case the above is made public in the future (e.g., for unit testing).
@interface FGMMapCallHandler ()
/// The map controller this inspector corresponds to.
@property(nonatomic, weak) FLTGoogleMapController *controller;
/// The messenger this instance was registered with by Pigeon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

#import <Flutter/Flutter.h>
#import <GoogleMaps/GoogleMaps.h>

#import "FGMCATransactionWrapper.h"
#import "GoogleMapController.h"

NS_ASSUME_NONNULL_BEGIN

@interface FGMMapCallHandler : NSObject <FGMMapsApi>
/// Exposes internal properties of FGMMapCallHandler for unit testing.
@interface FGMMapCallHandler (Test)

/// Transaction wrapper for CATransaction to allow mocking in tests.
@property(nonatomic, strong) id<FGMCATransactionProtocol> transactionWrapper;
Expand Down