flutter_appcenter 0.0.2 flutter_appcenter: ^0.0.2 copied to clipboard
微软AppCenter,支持Android/iOS 构建、测试、发布和运营统计、原生异常上报。
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_appcenter/flutter_appcenter.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
FlutterAppCenter.init(
androidAppId: 'your android app id',
iOSAppId: 'your iOS app id'
).then((value) => print(value));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: FlutterAppCenter'),
),
),
);
}
}