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
and
SocketMessage.expandT(x) to turn the json string x into an object.
this package uses dson.
¯\_(ツ)_/¯
did stuff i guess
0.1.5:
Add this to your package's pubspec.yaml file:
dependencies: server_client_comm: ^0.1.7
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support
pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:server_client_comm/server_client_comm.dart';
We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms:
Low code quality prevents platform classification.
Fix
lib/src/sccomm.dart. (-90.04 points)
Analysis of
lib/src/sccomm.dart failed with 8 errors, 1 hint, 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 '(String) → dynamic' that isn't of expected type '(dynamic) → dynamic'. This means its parameter or return type does not match what is expected.
line 64 col 44: The method tear-off 'expandT' has type '(String) → dynamic' that isn't of expected type '(dynamic) → dynamic'. This means its parameter or return type does not match what is expected.
Format
lib/server_client_comm.dart.
Run
dartfmt to format
lib/server_client_comm.dart.
Format
lib/src/typesOfSame.dart.
Run
dartfmt to format
lib/src/typesOfSame.dart.
Fix platform conflicts. (-20 points)
Low code quality prevents platform classification.
Use constrained dependencies. (-20 points)
The
pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies:
dson.
Homepage is not helpful. (-10 points)
Update the
homepage property: create a website about the package or use the source repository URL.
Package is getting outdated. (-13.70 points)
The package was released 59 weeks ago.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package. Common file name patterns include:
main.dart,
example.dart or you could also use
server_client_comm.dart.
The description is too long. (-10 points)
Search engines will display only the first part of the description. Try to keep it under 180 characters.