@@ -39,7 +39,9 @@ void main() {
3939
4040 // Test adding a single cluster manager
4141 final List <ClusterManager > addedClusterManagers = await viewController
42- .addClusterManagers (< String > ['cluster_1' ]);
42+ .addClusterManagers (< ClusterManager > [
43+ const ClusterManager (clusterManagerId: 'cluster_1' ),
44+ ]);
4345 expect (addedClusterManagers.length, 1 );
4446 expect (addedClusterManagers.first.clusterManagerId, 'cluster_1' );
4547
@@ -51,7 +53,10 @@ void main() {
5153
5254 // Test adding multiple cluster managers at once
5355 final List <ClusterManager > addedClusterManagers2 = await viewController
54- .addClusterManagers (< String > ['cluster_2' , 'cluster_3' ]);
56+ .addClusterManagers (< ClusterManager > [
57+ const ClusterManager (clusterManagerId: 'cluster_2' ),
58+ const ClusterManager (clusterManagerId: 'cluster_3' ),
59+ ]);
5560 expect (addedClusterManagers2.length, 2 );
5661 expect (addedClusterManagers2[0 ].clusterManagerId, 'cluster_2' );
5762 expect (addedClusterManagers2[1 ].clusterManagerId, 'cluster_3' );
@@ -90,7 +95,10 @@ void main() {
9095 expect (afterRemove2.length, 0 );
9196
9297 // Add some cluster managers to test clearClusterManagers
93- await viewController.addClusterManagers (< String > ['cluster_4' , 'cluster_5' ]);
98+ await viewController.addClusterManagers (< ClusterManager > [
99+ const ClusterManager (clusterManagerId: 'cluster_4' ),
100+ const ClusterManager (clusterManagerId: 'cluster_5' ),
101+ ]);
94102 final List <ClusterManager > beforeClear =
95103 await viewController.getClusterManagers ();
96104 expect (beforeClear.length, 2 );
@@ -116,7 +124,9 @@ void main() {
116124
117125 // Add a cluster manager
118126 final List <ClusterManager > addedClusterManagers = await viewController
119- .addClusterManagers (< String > ['cluster_manager_1' ]);
127+ .addClusterManagers (< ClusterManager > [
128+ const ClusterManager (clusterManagerId: 'cluster_manager_1' ),
129+ ]);
120130 expect (addedClusterManagers.length, 1 );
121131 final ClusterManager clusterManager = addedClusterManagers.first;
122132
@@ -189,7 +199,10 @@ void main() {
189199 );
190200
191201 // Add cluster managers
192- await viewController.addClusterManagers (< String > ['cluster_A' , 'cluster_B' ]);
202+ await viewController.addClusterManagers (< ClusterManager > [
203+ const ClusterManager (clusterManagerId: 'cluster_A' ),
204+ const ClusterManager (clusterManagerId: 'cluster_B' ),
205+ ]);
193206
194207 // Add a marker to cluster_A
195208 const MarkerOptions markerOptions = MarkerOptions (
@@ -261,10 +274,10 @@ void main() {
261274 );
262275
263276 // Add multiple cluster managers
264- await viewController.addClusterManagers (< String > [
265- 'cluster_north' ,
266- 'cluster_south' ,
267- 'cluster_east' ,
277+ await viewController.addClusterManagers (< ClusterManager > [
278+ const ClusterManager (clusterManagerId : 'cluster_north' ) ,
279+ const ClusterManager (clusterManagerId : 'cluster_south' ) ,
280+ const ClusterManager (clusterManagerId : 'cluster_east' ) ,
268281 ]);
269282
270283 final List <ClusterManager > clusterManagers =
@@ -400,7 +413,9 @@ void main() {
400413 );
401414
402415 // Add a cluster manager
403- await viewController.addClusterManagers (< String > ['test_cluster' ]);
416+ await viewController.addClusterManagers (< ClusterManager > [
417+ const ClusterManager (clusterManagerId: 'test_cluster' ),
418+ ]);
404419
405420 // Add multiple markers to the cluster
406421 final List <MarkerOptions > markerOptions = < MarkerOptions > [
0 commit comments