bridgefy 1.1.7 bridgefy: ^1.1.7 copied to clipboard
The Bridgefy SDK is a state-of-the-art, plug-and-play package that lets people use apps when they don’t have access to the Internet by using mesh networ
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:bridgefy_example/presentation/screens/home_screen.dart';
import 'package:bridgefy_example/config/theme/app_theme.dart';
import 'package:bridgefy_example/presentation/providers/chat_provider.dart';
import 'package:bridgefy_example/presentation/providers/sdk_provider.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
return MultiProvider(
providers: [
ChangeNotifierProvider<SdkProvider>(create: (_)=> SdkProvider()),
ChangeNotifierProxyProvider<SdkProvider, ChatProvider>(
create: (_)=> ChatProvider(),
update: (_, sdkProvider, chatProvider)=>chatProvider!..setSDK(sdkProvider),
),
],
child: MaterialApp(
title: 'Bridgefy example',
debugShowCheckedModeBanner: false,
theme: AppTheme().theme(),
home: const HomeScreen(),
),
);
}
}