bonsoir 5.1.3 copy "bonsoir: ^5.1.3" to clipboard
bonsoir: ^5.1.3 copied to clipboard

A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD.

example/lib/main.dart

import 'package:bonsoir_example/models/app_service.dart';
import 'package:bonsoir_example/pages/current_page.dart';
import 'package:bonsoir_example/widgets/add_icon.dart';
import 'package:bonsoir_example/widgets/bottom_bar.dart';
import 'package:bonsoir_example/widgets/eager_initialization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

/// Plugin's main method.
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await DefaultAppService.initialize();
  runApp(const ProviderScope(child: BonsoirExampleMainWidget()));
}

/// The main widget.
class BonsoirExampleMainWidget extends StatelessWidget {
  /// Creates a new main widget instance.
  const BonsoirExampleMainWidget({
    super.key,
  });

  @override
  Widget build(BuildContext context) => EagerInitialization(
        child: MaterialApp(
          home: Scaffold(
            appBar: AppBar(
              title: const Text('Bonsoir demo'),
              actions: const [AddIcon()],
              centerTitle: false,
            ),
            body: const CurrentPageWidget(),
            bottomNavigationBar: const BottomBar(),
          ),
        ),
      );
}
110
likes
0
pub points
95%
popularity

Publisher

verified publisherskyost.eu

A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD.

Homepage
Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

ko-fi.com
paypal.me

License

unknown (license)

Dependencies

bonsoir_android, bonsoir_darwin, bonsoir_linux, bonsoir_platform_interface, bonsoir_windows, flutter

More

Packages that depend on bonsoir