namiwang / actioncable_dart

actioncable client in dart, for pure dart or flutter project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use this package?

onesup opened this issue · comments

I am a ruby web programmer.
I found this one in pub.dev .
But I don't know how to use this exactly.
Can you build super simple example even without rails server?

Thank you Namiwang.

@onesup

Yeah, I should coin some examples.

For now, there's some simple usage in README.

A basic one would be like

import 'package:action_cable/action_cable.dart';

cable = ActionCable.Connect(
  'ws://127.0.0.1:3000/cable',
  headers: {
    'Authorization': 'Some Token',
  },

  onConnected: (){
    print('connected');
  },
);