flutter_openim_sdk 3.3.0 flutter_openim_sdk: ^3.3.0 copied to clipboard
An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
import 'package:flutter/material.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
OpenIM.iMManager.initSDK(
platformID: 1,
apiAddr: '',
wsAddr: '',
dataDir: '/',
objectStorage: 'minio',
listener: OnConnectListener());
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
TextButton(onPressed: () {}, child: Text('login')),
],
),
),
);
}
}