Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Plugins | 16,786 | 1,556 | 615 | a month ago | 58 | June 06, 2022 | 1 | bsd-3-clause | Dart | |
Plugins for Flutter maintained by the Flutter team | ||||||||||
Flutter Desktop Embedding | 7,078 | 6 | 2 months ago | 10 | August 18, 2022 | 3 | apache-2.0 | C++ | ||
Experimental plugins for Flutter for Desktop | ||||||||||
Flutter Ui Nice | 3,388 | a year ago | 7 | Dart | ||||||
More than 130+ pages in this beautiful app and more than 45 developers has contributed to it. | ||||||||||
Figmatocode | 2,870 | 24 days ago | 23 | gpl-3.0 | TypeScript | |||||
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI. | ||||||||||
Sqflite | 2,587 | 799 | 139 | 8 days ago | 125 | September 19, 2022 | 142 | bsd-2-clause | Dart | |
SQLite flutter plugin | ||||||||||
Flutter_inappwebview | 2,437 | 1 | 46 | 7 days ago | 51 | May 05, 2022 | 674 | apache-2.0 | Dart | |
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window. | ||||||||||
Flutter Study | 2,254 | 3 years ago | 5 | |||||||
Flutter Study | ||||||||||
Flutter_local_notifications | 2,166 | 108 | 52 | 2 days ago | 221 | September 23, 2022 | 44 | bsd-3-clause | Dart | |
A Flutter plugin for displaying local notifications on Android, iOS, macOS and Linux | ||||||||||
Flutter Intellij | 1,858 | 2 days ago | 518 | bsd-3-clause | Java | |||||
Flutter Plugin for IntelliJ | ||||||||||
Cloudbase Framework | 1,827 | 21 | 6 months ago | 130 | August 23, 2022 | 37 | other | JavaScript | ||
腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index |
Flutter Socket IO Plugin, supported Android + iOS (iOS installation guide is coming soon)
example/ios/Runner/SocketObj
to ${PROJECT_ROOT}/ios/Runner/
example/ios/Runner/AppDelegate.m
line with ${PROJECT_ROOT}/ios/Runner/AppDelegate.m
.
(Notice: You should merge the old one in your project to merge with the new from this plugin if you have some change on that file)${PROJECT_ROOT}/ios/Podfile
, paste this line pod 'Socket.IO-Client-Swift', '~> 13.3.0'
before the end of target 'Runner' do
block1. Add the following import to your Dart code:
import 'package:flutter_socket_io/flutter_socket_io.dart';
2. SocketIOManager: to manage (create/destroy) list of SocketIO
Create SocketIO with SocketIOManager:
SocketIO socketIO = SocketIOManager().createSocketIO("http://127.0.0.1:3000", "/chat", query: "userId=21031", socketStatusCallback: _socketStatus);
Destroy SocketIO with socketIOManager:
SocketIOManager().destroySocket(socketIO);
3. SocketIO:
Get Id (Url + Namespace) of the socket
String getId();
Create a new socket and connects the client
Future<void> connect();
Init socket before doing anything with socket
Future<void> init();
Subscribe to a channel with a callback
Future<void> subscribe(String event, Function callback);
Unsubscribe from a channel. When no callback is provided, unsubscribe all subscribers of the channel. Otherwise, unsubscribe only the callback passed in
Future<void> unSubscribe(String event, [Function callback]);
Send a message via a channel (i.e. event, the native code will convert string message to JsonObject before sending)
Future<void> sendMessage(String event, dynamic message, [Function callback]);
Disconnect from the socket
Future<void> disconnect();
Unsubscribe all subscribers from all channels
Future<void> unSubscribesAll();
4. Example: Link
SocketIO socketIO;
_connectSocket01() {
//update your domain before using
socketIO = SocketIOManager().createSocketIO("http://127.0.0.1:3000", "/chat", query: "userId=21031", socketStatusCallback: _socketStatus);
//call init socket before doing anything
socketIO.init();
//subscribe event
socketIO.subscribe("socket_info", _onSocketInfo);
//connect socket
socketIO.connect();
}
_socketStatus(dynamic data) {
print("Socket status: " + data);
}
_subscribes() {
if (socketIO != null) {
socketIO.subscribe("chat_direct", _onReceiveChatMessage);
}
}
void _onReceiveChatMessage(dynamic message) {
print("Message from UFO: " + message);
}
void _sendChatMessage(String msg) async {
if (socketIO != null) {
String jsonData = '{"message":{"type":"Text","content": ${(msg != null && msg.isNotEmpty) ? '"${msg}"' : '"Hello SOCKET IO PLUGIN :))"'},"owner":"589f10b9bbcd694aa570988d","avatar":"img/avatar-default.png"},"sender":{"userId":"589f10b9bbcd694aa570988d","first":"Ha","last":"Test 2","location":{"lat":10.792273999999999,"long":106.6430356,"accuracy":38,"regionId":null,"vendor":"gps","verticalAccuracy":null},"name":"Ha Test 2"},"receivers":["587e1147744c6260e2d3a4af"],"conversationId":"589f116612aa254aa4fef79f","name":null,"isAnonymous":null}';
socketIO.sendMessage("chat_direct", jsonData, _onReceiveChatMessage);
}
}
_destroySocket() {
if (socketIO != null) {
SocketIOManager().destroySocket(socketIO);
}
}