1313import com .example .alternate_language_test_plugin .CoreTests .HostIntegrationCoreApi ;
1414import com .example .alternate_language_test_plugin .CoreTests .Result ;
1515import io .flutter .embedding .engine .plugins .FlutterPlugin ;
16+ import java .util .List ;
17+ import java .util .Map ;
1618
1719/** This plugin handles the native side of the integration tests in example/integration_test/. */
1820public class AlternateLanguageTestPlugin implements FlutterPlugin , HostIntegrationCoreApi {
@@ -154,6 +156,67 @@ public void reply(Void value) {
154156 });
155157 }
156158
159+ @ Override
160+ public void callFlutterEchoAllTypes (@ NonNull AllTypes everything , Result <AllTypes > result ) {
161+ flutterApi .echoAllTypes (
162+ everything ,
163+ new FlutterIntegrationCoreApi .Reply <AllTypes >() {
164+ public void reply (AllTypes value ) {
165+ result .success (value );
166+ }
167+ });
168+ }
169+
170+ @ Override
171+ public void callFlutterSendMultipleNullableTypes (
172+ @ Nullable Boolean aNullableBool ,
173+ @ Nullable Long aNullableInt ,
174+ @ Nullable String aNullableString ,
175+ Result <AllNullableTypes > result ) {
176+ flutterApi .sendMultipleNullableTypes (
177+ aNullableBool ,
178+ aNullableInt ,
179+ aNullableString ,
180+ new FlutterIntegrationCoreApi .Reply <AllNullableTypes >() {
181+ public void reply (AllNullableTypes value ) {
182+ result .success (value );
183+ }
184+ });
185+ }
186+
187+ @ Override
188+ public void callFlutterEchoBool (@ NonNull Boolean aBool , Result <Boolean > result ) {
189+ flutterApi .echoBool (
190+ aBool ,
191+ new FlutterIntegrationCoreApi .Reply <Boolean >() {
192+ public void reply (Boolean value ) {
193+ result .success (value );
194+ }
195+ });
196+ }
197+
198+ @ Override
199+ public void callFlutterEchoInt (@ NonNull Long anInt , Result <Long > result ) {
200+ flutterApi .echoInt (
201+ anInt ,
202+ new FlutterIntegrationCoreApi .Reply <Long >() {
203+ public void reply (Long value ) {
204+ result .success (value );
205+ }
206+ });
207+ }
208+
209+ @ Override
210+ public void callFlutterEchoDouble (@ NonNull Double aDouble , Result <Double > result ) {
211+ flutterApi .echoDouble (
212+ aDouble ,
213+ new FlutterIntegrationCoreApi .Reply <Double >() {
214+ public void reply (Double value ) {
215+ result .success (value );
216+ }
217+ });
218+ }
219+
157220 @ Override
158221 public void callFlutterEchoString (@ NonNull String aString , Result <String > result ) {
159222 flutterApi .echoString (
@@ -164,4 +227,117 @@ public void reply(String value) {
164227 }
165228 });
166229 }
230+
231+ @ Override
232+ public void callFlutterEchoUint8List (@ NonNull byte [] aList , Result <byte []> result ) {
233+ flutterApi .echoUint8List (
234+ aList ,
235+ new FlutterIntegrationCoreApi .Reply <byte []>() {
236+ public void reply (byte [] value ) {
237+ result .success (value );
238+ }
239+ });
240+ }
241+
242+ @ Override
243+ public void callFlutterEchoList (@ NonNull List <Object > aList , Result <List <Object >> result ) {
244+ flutterApi .echoList (
245+ aList ,
246+ new FlutterIntegrationCoreApi .Reply <List <Object >>() {
247+ public void reply (List <Object > value ) {
248+ result .success (value );
249+ }
250+ });
251+ }
252+
253+ @ Override
254+ public void callFlutterEchoMap (
255+ @ NonNull Map <String , Object > aMap , Result <Map <String , Object >> result ) {
256+ flutterApi .echoMap (
257+ aMap ,
258+ new FlutterIntegrationCoreApi .Reply <Map <String , Object >>() {
259+ public void reply (Map <String , Object > value ) {
260+ result .success (value );
261+ }
262+ });
263+ }
264+
265+ @ Override
266+ public void callFlutterEchoNullableBool (@ Nullable Boolean aBool , Result <Boolean > result ) {
267+ flutterApi .echoNullableBool (
268+ aBool ,
269+ new FlutterIntegrationCoreApi .Reply <Boolean >() {
270+ public void reply (Boolean value ) {
271+ result .success (value );
272+ }
273+ });
274+ }
275+
276+ @ Override
277+ public void callFlutterEchoNullableInt (@ Nullable Long anInt , Result <Long > result ) {
278+ flutterApi .echoNullableInt (
279+ anInt ,
280+ new FlutterIntegrationCoreApi .Reply <Long >() {
281+ public void reply (Long value ) {
282+ result .success (value );
283+ }
284+ });
285+ }
286+
287+ @ Override
288+ public void callFlutterEchoNullableDouble (@ Nullable Double aDouble , Result <Double > result ) {
289+ flutterApi .echoNullableDouble (
290+ aDouble ,
291+ new FlutterIntegrationCoreApi .Reply <Double >() {
292+ public void reply (Double value ) {
293+ result .success (value );
294+ }
295+ });
296+ }
297+
298+ @ Override
299+ public void callFlutterEchoNullableString (@ Nullable String aString , Result <String > result ) {
300+ flutterApi .echoNullableString (
301+ aString ,
302+ new FlutterIntegrationCoreApi .Reply <String >() {
303+ public void reply (String value ) {
304+ result .success (value );
305+ }
306+ });
307+ }
308+
309+ @ Override
310+ public void callFlutterEchoNullableUint8List (@ Nullable byte [] aList , Result <byte []> result ) {
311+ flutterApi .echoNullableUint8List (
312+ aList ,
313+ new FlutterIntegrationCoreApi .Reply <byte []>() {
314+ public void reply (byte [] value ) {
315+ result .success (value );
316+ }
317+ });
318+ }
319+
320+ @ Override
321+ public void callFlutterEchoNullableList (
322+ @ Nullable List <Object > aList , Result <List <Object >> result ) {
323+ flutterApi .echoNullableList (
324+ aList ,
325+ new FlutterIntegrationCoreApi .Reply <List <Object >>() {
326+ public void reply (List <Object > value ) {
327+ result .success (value );
328+ }
329+ });
330+ }
331+
332+ @ Override
333+ public void callFlutterEchoNullableMap (
334+ @ Nullable Map <String , Object > aMap , Result <Map <String , Object >> result ) {
335+ flutterApi .echoNullableMap (
336+ aMap ,
337+ new FlutterIntegrationCoreApi .Reply <Map <String , Object >>() {
338+ public void reply (Map <String , Object > value ) {
339+ result .success (value );
340+ }
341+ });
342+ }
167343}
0 commit comments