<commit_before>import 'dart:async';
import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:pay_platform_interface/core/payment_item.dart';

import 'pay_platform_interface.dart';

class PayMethodChannel extends PayPlatform {
  final MethodChannel channel =
      const MethodChannel('plugins.flutter.io/pay_channel');

  @override
  Future<bool> userCanPay(Map<String, dynamic> paymentProfile) async =>
      await channel.invokeMethod('userCanPay', jsonEncode(paymentProfile));

  @override
  Future<Map<String, dynamic>> showPaymentSelector(
          Map<String, dynamic> paymentProfile,
          List<PaymentItem> paymentItems) async =>
      jsonDecode(
        await channel.invokeMethod('showPaymentSelector', {
          'payment_profile': jsonEncode(paymentProfile),
          'payment_items': paymentItems.map((item) => item.toMap()),
        }),
      );
}<commit_msg>We need a list of display items on the channel<commit_after>import 'dart:async';
import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:pay_platform_interface/core/payment_item.dart';

import 'pay_platform_interface.dart';

class PayMethodChannel extends PayPlatform {
  final MethodChannel channel =
      const MethodChannel('plugins.flutter.io/pay_channel');

  @override
  Future<bool> userCanPay(Map<String, dynamic> paymentProfile) async =>
      await channel.invokeMethod('userCanPay', jsonEncode(paymentProfile));

  @override
  Future<Map<String, dynamic>> showPaymentSelector(
          Map<String, dynamic> paymentProfile,
          List<PaymentItem> paymentItems) async =>
      jsonDecode(
        await channel.invokeMethod('showPaymentSelector', {
          'payment_profile': jsonEncode(paymentProfile),
          'payment_items': paymentItems.map((item) => item.toMap()).toList(),
        }),
      );
}
{'fraction_non_alphanumeric': 0.11621621621621622, 'fraction_numerical': 0.0, 'mean_word_length': 4.525373134328358, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6334725', 'n_tokens_mistral': 511, 'n_tokens_neox': 509, 'n_words': 101}