easy_agora_uikit 1.3.0 easy_agora_uikit: ^1.3.0 copied to clipboard
agora made simple
import 'package:easy_agora_uikit/easy_agora_uikit.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Center(
child: Column(
children: [
FloatingActionButton(
child: const Text("Open Front Camera"),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
VideoCall(
serverLink:
"serverLink",
channelName: "test",
appID: "appId",
),
),
);
},
),
FloatingActionButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => VideoCallRear(
serverLink:
"serverLink",
channelName: "test",
appID: "appId",
),
),
);
},
child: const Text("Open Rear Camera"),
),
],
),
),
),
);
}
}