This package lets you communicate between the server and client,
all you need to do is
SocketMessage.shrinkT(x,[y]) to turn x into json and make y it's type
SocketMessage.expandT(x) to turn the json string x into an object.
this package uses dson.
did stuff i guess
- changed expandTransform to SocketMessage.expandT (static)
- changed shrinkTransform to SocketMessage.shrinkT (static)
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: server_client_comm: ^0.1.7
2. Install it
You can install packages from the command line:
$ pub get
$ 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:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
Health issues and suggestions
lib/src/sccomm.dart. (-90.29 points)
lib/src/sccomm.dart failed with 8 errors, 6 hints, including:
line 49 col 33: Undefined name 'JSON'.
line 53 col 19: Undefined name 'JSON'.
line 58 col 20: Undefined name 'JSON'.
line 61 col 45: The method tear-off 'expandT' has type 'dynamic Function(String)' that isn't of expected type 'dynamic Function(dynamic)'. This means its parameter or return type doesn't match what is expected.
line 64 col 44: The method tear-off 'expandT' has type 'dynamic Function(String)' that isn't of expected type 'dynamic Function(dynamic)'. This means its parameter or return type doesn't match what is expected.
dartfmt to format
dartfmt to format
Maintenance issues and suggestions
Package is too old. (-100 points)
The package was last published more than two years ago.
Use constrained dependencies. (-20 points)
pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies:
Homepage URL isn't helpful. (-10 points)
homepage field from
pubspec.yaml: link to a website about the package or use the source repository URL.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
server_client_comm.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
The description is too long. (-10 points)
Search engines display only the first part of the description. Try to keep the value of the
description field in your package's
pubspec.yaml file between 60 and 180 characters.
|Dart SDK||>=1.8.0 <3.0.0|