adhara_socket_io 0.1.9

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

adhara_socket_io #

socket.io for flutter by adhara

supports both Android and iOS

Usage:

See example/lib/main.dart for better example

    SocketIOManager manager = SocketIOManager();
    SocketIO socket = manager.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();
    ///disconnect using
    ///manager.

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 edit the URI in #7 to point to your hosted/local socket server instances as mentioned step 2

  4. run Android/iOS app

iOS support 📢📢 #

This project uses Swift for iOS support, please enable Swift support for your project for this plugin to work

Feel free to checkout our Adhara package

0.1.9 - 21st January, 2019 #

  • BugFix for iOS running on iPhone 6

0.1.8 - 17th January, 2019 #

  • Optimized serialization code for Android
  • Bug fix for Map representation characters/reserved characters for map representation as a string (= and /)

0.1.7 - 17th January, 2019 #

  • Disabling unnecessary logging of events in platform implementations in both Android and iOS, can enable if required by passing enableLogging: true to createInstance

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 #

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 edit the URI in #7 to point to your hosted/local socket server instances as mentioned step 2

  4. run Android/iOS app

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.9

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.9 Jan 20, 2019 Go to the documentation of adhara_socket_io 0.1.9 Download adhara_socket_io 0.1.9 archive
0.1.8 Jan 16, 2019 Go to the documentation of adhara_socket_io 0.1.8 Download adhara_socket_io 0.1.8 archive
0.1.7 Jan 16, 2019 Go to the documentation of adhara_socket_io 0.1.7 Download adhara_socket_io 0.1.7 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]
85
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]
92
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1
  • Flutter: 1.2.1

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