adhara_socket_io 0.1.6

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new84

adhara_socket_io

socket.io for flutter by adhara

supports both Android and iOS

Usage:

See example/lib/main.dart for better example


    SocketIO socket = await SocketIOManager().createInstance('http://192.168.1.2:7000/');       //TODO change the port  accordingly
    socket.onConnect((data){
      print("connected...");
      print(data);
      socket.emit("message", ["Hello world!"]);
    });
    socket.on("news", (data){   //sample event
      print("news");
      print(data);
    });
    socket.connect();

Running example:

  1. Open example/ios in XCode or example/android in android studio. Build the code once (cd example & flutter build apk | flutter build ios --no-codesign)

  2. cd example/socket.io.server

    1 run npm i

    2 run npm start

  3. open example/lib/main.dart and edir the URI in #7 to point to your hosted/local socket server instances as mentioned step 2

  4. run Android/iOS app

Feel free to checkout our Adhara package

0.1.6 - 28th November, 2018

  • Android and iOS data serialization handled properly to send objects and arrays

0.1.4 - 28th November, 2018

  • Android query bug: Extra ? is being sent. fixed

0.1.3 - 21st November, 2018

  • Added support for socket.io handshake query params for both iOS and Android

0.1.2 - 20th November, 2018

  • Fully working version of basic Socket.io connection for both Android and iOS

example/README.md

adhara_socket_io_example

Demonstrates how to use the adhara_socket_io 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:
  adhara_socket_io: ^0.1.6

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:adhara_socket_io/adhara_socket_io.dart';
  
Version Uploaded Documentation Archive
0.1.6 Nov 28, 2018 Go to the documentation of adhara_socket_io 0.1.6 Download adhara_socket_io 0.1.6 archive
0.1.5 Nov 27, 2018 Go to the documentation of adhara_socket_io 0.1.5 Download adhara_socket_io 0.1.5 archive
0.1.4 Nov 27, 2018 Go to the documentation of adhara_socket_io 0.1.4 Download adhara_socket_io 0.1.4 archive
0.1.3 Nov 21, 2018 Go to the documentation of adhara_socket_io 0.1.3 Download adhara_socket_io 0.1.3 archive
0.1.2 Nov 20, 2018 Go to the documentation of adhara_socket_io 0.1.2 Download adhara_socket_io 0.1.2 archive
0.1.1 Nov 19, 2018 Go to the documentation of adhara_socket_io 0.1.1 Download adhara_socket_io 0.1.1 archive
0.1.0 Nov 19, 2018 Go to the documentation of adhara_socket_io 0.1.0 Download adhara_socket_io 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
67
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]
84
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8