conreality_headset 0.2.0

  • Readme
  • Changelog
  • Installing
  • 79

conreality_headset #

Project license Pub package Dartdoc reference

Headset audio and text-to-speech support for Conreality live-action games.

Compatibility #

Android (5.0+). (iOS support is planned.)

Features #

  • Determines whether a wired or wireless headset is currently connected.

  • Provides headset events including connect/disconnect status notifications.

  • Supports speech synthesis (text-to-speech) when a headset is connected.

Supported devices #

Examples #

Importing the package #

import 'package:conreality_headset/conreality_headset.dart';

Checking for a headset #

var ok = await Headset.isConnected;

print("Headset is " + (ok ? "connected" : "NOT connected"));

Subscribing to headset events #

Stream<HeadsetEvent> stream = await Headset.subscribe();

stream.listen((HeadsetEvent event) {
  print(event);
});

Speaking into the headset #

await Headset.speak("Hello, world!");

Installation #

pubspec.yaml using Pub #

dependencies:
  # See: https://pub.dev/packages/conreality_headset
  conreality_headset: ^0.2.0

pubspec.yaml using Git #

dependencies:
  # See: https://github.com/conreality/conreality-plugins/tree/master/conreality_headset
  conreality_headset:
    git:
      url: https://github.com/conreality/conreality-plugins.git
      path: conreality_headset

See Also #

Follow @ConrealityCode and @ConrealityGame on Twitter for project updates.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.2.0 - 2019-07-15 #

Changed #

  • Required Flutter 1.7.8+ and Dart 2.4.0+

Added #

0.1.4 - 2019-07-12 #

Added #

  • Service API for speech synthesis (on Android)

0.1.3 - 2019-07-12 #

Changed #

  • Moved the speech synthesis to a bound service (on Android)

0.1.2 - 2019-07-11 #

Changed #

  • Fixed a bug in Headset.isConnected

Added #

  • Headset.canSpeak static property
  • Headset.speak() static method
  • Headset.stopSpeaking() static method

0.1.1 - 2019-07-11 #

Added #

  • Bluetooth HSP/HFP headset support (on Android only)

0.1.0 - 2019-07-10 #

Added #

  • Headset.isConnected static property
  • Headset.subscribe() static method
  • HeadsetEvent class
  • HeadsetStatus class
  • HeadsetType enum

0.0.1 - 2019-07-05 #

Added #

  • ConrealityHeadset.version getter

Use this package as a library

1. Depend on it

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


dependencies:
  conreality_headset: ^0.2.0

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:conreality_headset/conreality_headset.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
59
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:conreality_headset/conreality_headset.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:conreality_headset/conreality_headset.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:conreality_headset/conreality_headset.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:conreality_headset/conreality_headset.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [conreality_headset] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test