hylid_bridge 0.0.3
hylid_bridge: ^0.0.3 copied to clipboard
Wrapper for Hylid Bridge SDK
Hylid Bridge #
Welcome to the hylid_bridge Flutter package! This package serves as a wrapper around the Hylid Bridge, allowing you to call miniapp functions directly from your Flutter applications. It simplifies the process of integrating Hylid functionalities and enhances your development experience.
Features #
- Easy integration with Hylid services.
- Simple API for calling miniapp functions.
- Efficient and lightweight.
Installation #
To start using hylid_bridge in your Flutter project, follow these steps:
- Add Dependency First, add the hylid_bridge dependency to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
hylid_bridge: ^0.0.3
Run the following command to fetch the new dependency:
flutter pub get
- Add Script in Web/index.html
you need to include the Hylid Bridge script in your web/index.html file. Add the following script tag within the section:
<script src="https://cdn.marmot-cloud.com/npm/hylid-bridge/2.10.0/index.js"></script>
This script enables the Hylid functionalities in your web application.
Usage Examples #
show alert dialog #
alert(
title: 'Alert Title',
content: 'This is the content of the alert.',
buttonText: 'confirm',
success: () {
// do your logic
},
);
get auth code #
getAuthCode(
scopes: [""], // list of scopes (check alipay documents)
success: (res) {
// do your logic
}
);