magic_home 0.9.0
Magic Home #
A library that imports functionality from the Magic Home app, allowing control of smart lights
Installation #
TODO
Example #
import 'package:magic_home/magic_home.dart';
main() {
Light.discover().then((lights){
lights[0].setColor(255, 0, 128);
});
}
0.9.0 #
- Initial version with basic functionality
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
magic_home: ^0.9.0
2. Install it
You can install packages from the command line:
with pub:
$ pub get
with Flutter:
$ flutter pub get
Alternatively, your editor might support pub get
or 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:magic_home/magic_home.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
0
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
90
|
Overall:
Weighted score of the above.
[more]
|
48
|
We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
Platforms
Detected platforms: Flutter, other
Primary library:
package:magic_home/magic_home.dart
with components:io
.
Health suggestions
Fix lib/magic_home.dart
. (-0.50 points)
Analysis of lib/magic_home.dart
reported 1 hint:
line 45 col 26: Unnecessary new keyword.
Format bin/main.dart
.
Run dartfmt
to format bin/main.dart
.
Format lib/utilis.dart
.
Run dartfmt
to format lib/utilis.dart
.
Maintenance suggestions
Maintain an example. (-10 points)
Create a short demo in the example/
directory to show how to use this package.
Common filename patterns include main.dart
, example.dart
, and magic_home.dart
. Packages with multiple examples should provide example/README.md
.
For more information see the pub package layout conventions.