bonsoir 0.1.3+2 copy "bonsoir: ^0.1.3+2" to clipboard
bonsoir: ^0.1.3+2 copied to clipboard

outdated

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/broadcast.dart';
import 'package:bonsoir_example/models/discovery.dart';
import 'package:bonsoir_example/widgets/broadcast_checkbox.dart';
import 'package:bonsoir_example/widgets/service_list.dart';
import 'package:bonsoir_example/widgets/title_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

/// Plugin's main method.
void main() => runApp(BonsoirExampleMainWidget());

/// The main widget.
class BonsoirExampleMainWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MultiProvider(
        providers: [
          ChangeNotifierProvider<BonsoirBroadcastModel>(create: (context) => BonsoirBroadcastModel()),
          ChangeNotifierProvider<BonsoirDiscoveryModel>(create: (context) => BonsoirDiscoveryModel()),
        ],
        builder: (context, child) => MaterialApp(
          home: Scaffold(
            appBar: AppBar(
              title: TitleWidget(),
              actions: [BroadcastSwitch()],
              centerTitle: false,
            ),
            body: ServiceList(),
          ),
        ),
      );
}
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.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on bonsoir