bridgefy 1.1.7 copy "bridgefy: ^1.1.7" to clipboard
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

example/lib/main.dart

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(),
      ),
    );
  }
}
15
likes
140
points
32
downloads

Publisher

verified publisherbridgefy.me

Weekly Downloads

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

Homepage
Repository (GitHub)
View/report issues

Topics

#network #offline #mesh #ble #bluetooth

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on bridgefy