v1.0.2
open_appstore
一个用于打开 Apple App Store 或 Google Play Store 的 Flutter 插件。
31喜欢 23近 30 天下载30Pub 分数
平台暂无数据
Flutter 插件,用于打开 AppStore 或 PlayStore
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
A Flutter plugin for opening the AppStore or PlayStore
Import the library via
import 'package:open_appstore/open_appstore.dart';
You can open the AppStore or PlayStore in your Dart code.
To open the App Store page, you can pass the app Id.
OpenAppstore.launch(androidAppId: "com.facebook.katana", iOSAppId: "284882215")
static void launch({String androidAppId, String iOSAppId}) async {
await _channel.invokeMethod(
'openappstore', {'android_id': androidAppId, 'ios_id': iOSAppId});
}
iOS is available from version 10.
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: {(success: Bool) in
if success {
print("Launching \(url) was successful")
}})
}
https://user-images.githubusercontent.com/37133536/65833542-6ed3d580-e30c-11e9-8ccd-2fcb2e5d77b4.pnghttps://user-images.githubusercontent.com/37133536/65833543-6ed3d580-e30c-11e9-88a5-21c9c54c2bae.png
Please file issues to send feedback or report a bug. Thank you!
MIT License