webrtc_mesh 0.0.2 webrtc_mesh: ^0.0.2 copied to clipboard
Easy cross-platform WebRTC peer based mesh network for Flutter with a simple to implement signalling api.
import 'package:flutter/material.dart';
import 'chat.dart';
dynamic main() async {
WidgetsFlutterBinding.ensureInitialized();
// await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) => MaterialApp(
debugShowCheckedModeBanner: false,
title: "WebRTC Mesh Example",
theme: ThemeData(
primaryColor: Colors.white,
scaffoldBackgroundColor: Colors.white,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
elevation: 0,
iconTheme: IconThemeData(color: Colors.black),
),
textTheme: const TextTheme(
titleLarge: TextStyle(
fontSize: 18,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
),
home: ChatScreen(roomId: 'roomId'),
);
}