Antom, leading provider of tailored payment solutionsAntom, leading provider of tailored payment solutions

Flutter

Step 1: Set Up the Environment

  • Configure the development environment for either iOS or Android based on your current system.

Step 2: Integrate Flutter plugin

1.Config the pubspec.yaml file as follows

copy
rewards_flutter_widget:
    git:
      url: http://globaltech-git.alipay.com/aplus-mobile/rewards-widget-flutter-plugins.git
      ref: release/1.1.0

2.Init

copy
MaterialApp(
  localizationsDelegates: const [
    RewardsWidgetLocalizations.delegate,//International registration category provided by Rewards flutter plugin
    GlobalMaterialLocalizations.delegate,//Material UI component internationalization registration class
    GlobalCupertinoLocalizations.delegate,//Cupertino UI component internationalization registration class
    GlobalWidgetsLocalizations.delegate//General international registration class
  ],
  locale: const Locale('en'),// English is supported by default
  //locale: const Locale('ko'), // locale: const Locale('ko', 'KR'),
  //locale: const Locale('th'), // locale: const Locale('th', 'TH'),
  //locale: const Locale('id'), // locale: const Locale('id', 'ID'),
  //locale: const Locale('zh', 'HK'),
  supportedLocales: [...RewardsWidgetLocalizations.delegate.supportedLocales],// Languages supported by Rewards Widget Plugin
)

Multi-language description

The widget component supports the following languages,English is supported by default

  1. Korean (South Korea) ko / ko-KR

locale: const Locale('ko'), / locale: const Locale('ko', 'KR'),

  1. Thai (Thailand) th / th-TH

locale: const Locale('th'), / locale: const Locale('th', 'TH'),

  1. Bahasa Indonesia (Indonesia) id / id-ID

locale: const Locale('id'), / locale: const Locale('id', 'ID'),

  1. Chinese (Hong Kong, China) zh-HK

locale: const Locale('zh', 'HK'),

Step 3: Render widget in Flutter

copy
RewardsPromoWidget(positionId: 'XXX')

Validate the integration

After you've finished the previous steps, notify Alipay+ team to configure the delivery content. When all the configuration work is done, you'll see the marketing content rendered in your app page.