Loading…

Flutter installation

Table of contents on this page
# Add dependencies ```yaml dependencies: apifm: ^0.0.5 ``` # Install ```bash flutter pub get ``` Run this command to install the latest version of the SDK with one click # use js file to load the SDK directly: ```javascript import 'package:apifm/apifm.dart' as WXAPI; WXAPI.init('gooking') ``` Then you can directly call any method of the SDK to read and operate your background data, for example: ```javascript WXAPI.banners().then(res => { if (res.code == 0) { this.setData({ banners: res.data }) } }) ``` Or: ```javascript const res = await WXAPI.banners() if (res.code == 0) { this.setData({ banners: res.data }) } ```