samsung_wallet 1.1.0 copy "samsung_wallet: ^1.1.0" to clipboard
samsung_wallet: ^1.1.0 copied to clipboard

PlatformAndroid

Samsung Wallet Example Flutter plugin project. This plugin based Samsung Wallet Android java package file.

Samsung Wallet 1.1.0 #

Samsung Wallet for Flutter

Requirement #

support flutter >= 3.0, dart >= 2.17.0, < 4.0.0

compileSdkVersion 34

More Information #

You can get more information the Samsung Wallet documentation.

References #

This package based on the Android sample code from Samsung Wallet. If you need the reference code, you can click here to access it.

How to use #

  1. add dependency
  • Add dependency to your pubspec.yaml file.
dependencies:
  samsung_wallet: newest_version
  1. Add Permission
  • Add permission to your AndroidManifest.xml file.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

If you want more information, Please check this

  1. Set main
  • Please add 'WidgetsFlutterBinding.ensureInitialized();' code to your main in main.dart file
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(MyApp());
}
  1. Initialization SamsungWallet
  • Initialization SamsungWallet Object
  final samsungWalletPlugin = SamsungWallet(
      countryCode: countryCode,
      partnerCode: partnerCode,
      impressionURL: impressionUrl);

If you initialize the SamsungWallet object, it will automatically check SamsungWallet support immediately.

The results can be viewed in the debug console log.

  1. Create onTapMethod for add Card
  • If Samsung wallet is supported, you can add card.
function onTap(){
  samsungWalletPlugin.addCardToSamsungWallet(
        cardID: cardId, cData: cdata, clickURL: clickUrl);
}
  1. Add Samsung Wallet Button Widget
AddToSamsungWalletButton(onTapAddCard: onTap)

More #

  1. Add to Wallet Test Tool
  • If you want Using 'Add to Wallet Test Tool', try this widget
AddToSamsungWalletButton.testTool()

More information about 'Add to Wallet Test Tool' Please check this

  1. How to make Cdata
  • You can make cdata using JWT Generator. Please check here about JWT Generator

Issues #

Please file any issues, bugs or feature request as an issue on my GitHub page.

4
likes
160
pub points
52%
popularity

Publisher

verified publishermonocsp.dev

Samsung Wallet Example Flutter plugin project. This plugin based Samsung Wallet Android java package file.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter, plugin_platform_interface, url_launcher

More

Packages that depend on samsung_wallet