huddle01_flutter_client 1.0.4 huddle01_flutter_client: ^1.0.4 copied to clipboard
The Huddle01 Flutter SDK offers a comprehensive suite of methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.
import 'package:cached_network_image/cached_network_image.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:huddle01_flutter_client_example/firebase_options.dart';
import 'package:huddle01_flutter_client_example/screens/home_screen.dart';
import 'package:huddle01_flutter_client_example/utils/common.dart';
import 'constants/index.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
runApp(
const MainApp(),
);
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Huddle01 Flutter Example App',
theme: ThemeData(
useMaterial3: true,
fontFamily: 'Montserrat',
brightness: Brightness.dark,
primaryColor: primaryColor,
),
home: const SplashScreen(),
);
}
}
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
screenReplacementTimer(
context,
2500,
screen: const HomeScreen(),
);
super.initState();
}
@override
Widget build(BuildContext context) {
return Stack(
children: [
Center(
child: Image.asset('assets/images/blue_logo.png'),
),
Positioned(
bottom: 40,
left: 0,
right: 0,
child: CachedNetworkImage(
imageUrl: flutterLogo,
width: 75,
height: 25,
),
)
],
);
}
}