tencent_rtc_sdk 12.2.3 tencent_rtc_sdk: ^12.2.3 copied to clipboard
With Tencent-RTC, you can quickly develop cost-effective, low-latency, and high-quality interactive audio/video services.
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
import 'package:provider/provider.dart';
import 'package:trtc_demo/ui/login.dart';
import 'package:trtc_demo/ui/meeting.dart';
import 'package:trtc_demo/ui/member_list.dart';
import 'package:trtc_demo/ui/test/test_api.dart';
import 'package:trtc_demo/models/meeting_model.dart';
part 'main_ext.dart';
void main() {
FlutterForegroundTask.initCommunicationPort();
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
// Request permissions and initialize the service.
ServiceManager()._requestPermissions();
ServiceManager()._initService();
});
}
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider(
create: (context) => MeetingModel(),
child: MaterialApp(
routes: {
"/": (context) => LoginPage(),
"/login": (context) => LoginPage(),
"/meeting": (context) => MeetingPage(),
"/memberList": (context) => MemberListPage(),
"/test": (context) => TestPage(),
},
),
);
}
}