coucou_flutter 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

pub package

Coucou (Flutter) #

Coucou is a network service discovery and broadcast library for Flutter that supports both Android and iOS. The platform-specific implementations are utilizing coucou_android (v0.1.1) and coucou_ios (v0.0.6).

Note: This plugin is still in very early stage of development and there are many things that are yet to be done. For more information, take a look at the todo list down below.

Coucou API #

The API is very similar to the ones on Android and iOS.

Stream<dynamic> startDiscovery(String type, {String domain = "local."});
Future<dynamic> stopDiscovery({String type});
Future<Disposable> startBroadcast(BroadcastConfig config);
Future<dynamic> stopBroadcast({BroadcastConfig config});

Note: The API will be slightly changed in a way that it will provide streams/futures of concrete types. For more information about future works, take a look at the todo section at the end of the readme.

Creation #

final coucou = Coucou();

Network Service Discovery #

final discovery = coucou.startDiscovery("_http._tcp").listen((event) {
  // TODO: Something with the current event
}, onError: (error) {
  // TODO: Something with the error
});

// .. when not needed, dispose

discovery.cancel();
coucou.stopDiscovery("_http._tcp");

Network Service Broadcast #

final broadcast = await coucou.startBroadcast(BroadcastConfig(
  type: "_http._tcp",
  name: "My service",
  port: 12345,
));

// when not needed, dispose
broadcast.dispose();

Note: Broadcast requests currently are not supported, but the API is there.

Requirements #

  • Min sdk for Android is API level 16.
  • Min iOS version is 8.0.

TODO #

  • Support for network service broadcasts
  • Acknowledge the domain parameter on the Android side for service discovery. This has to be implemented in the coucou_android project first.
  • Provide a handier way to cancel a discovery, similar to how the iOS and Android implementations work.
  • Support for multiple broadcasts running in parallel
  • Support for multiple service discoveries running in parallel
  • Better sample app that demonstrates the usage of this library
  • Improve documentation
  • Write tests

Communication #

  • Author: Stefan Mitev
  • E-mail: mr.mitew [at] gmail . com
  • Github issues

Contribution #

All development (both new features and bug fixes) is performed in develop branch. However, fixes to documentation in markdown files can be directly done in master. Please send PRs with bug fixes to develop branch. The develop branch is pushed to master during release.

0.0.3 #

  • Updated the readme document

0.0.2 #

  • Minor changes in the code style in order to improve the pub's score

0.0.1 #

  • Support for network service discovery on both Android and iOS.

example/README.md

coucou_flutter_example #

Demonstrates how to use the coucou_flutter plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  coucou_flutter: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:coucou_flutter/coucou.dart';
import 'package:coucou_flutter/models/broadcast_config.dart';
import 'package:coucou_flutter/models/disposable.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
45
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
79
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

We analyzed this package on Dec 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.4

Maintenance suggestions

Package is getting outdated. (-11.23 points)

The package was last published 58 weeks ago.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8