zego_zim 2.12.0 zego_zim: ^2.12.0 copied to clipboard
ZEGO ZIM Flutter SDK is a flutter plugin wrapper based on ZIM native Android / iOS / Mac / Win / Web SDK.
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:zego_zim/zego_zim.dart';
import 'package:zego_zim_example/topics/chat/chat_with_conversation/group/group_chat_page.dart';
import 'package:zego_zim_example/topics/chat/chat_with_conversation/group/group_set_page/group_set_page.dart';
import 'package:zego_zim_example/topics/chat/chat_with_conversation/peer/peer_chat_page.dart';
import 'package:zego_zim_example/topics/login/user_model.dart';
import 'dart:async';
import 'package:zego_zim_example/topics/splash/splash_page.dart';
Future<void> main() async {
runApp(MaterialApp(
title: 'ZIM',
debugShowCheckedModeBanner: false,
home: //GroupSetPage()
SplashPage(),
navigatorObservers: [UserModel.shared().routeObserver],
));
ZIMPushConfig pushConfig = ZIMPushConfig();
pushConfig.title = "推送标题,一般为本人 userName,对应 APNs title";
pushConfig.content = "推送内容,一般与消息内容一致,对应 APNs body";
pushConfig.resourcesID = "携带 mutable-content";
pushConfig.payload = "{\"image_attachment\":\"图片资源的 url\"}";
}