Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/push-protocol/push-socket-client-dart
https://github.com/push-protocol/push-socket-client-dart
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/push-protocol/push-socket-client-dart
- Owner: push-protocol
- License: bsd-3-clause
- Created: 2023-07-11T06:55:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-02T18:29:50.000Z (about 1 year ago)
- Last Synced: 2024-03-27T05:26:48.559Z (9 months ago)
- Language: Dart
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Push Protocol is a web3 communication network, enabling cross-chain notifications, messaging, video, and NFT chat for dapps, wallets, and services.🚀
Push Dart Socket Client
This package helps to connect to Push backend using websockets built on top of Socket.IO## 📚 Table of Contents
- [Documentation](#documentation)
- [Getting Started](#-getting-started)
- [Resources](#resources)
- [Contributing](#contributing)---
## Documentation
Visit [Developer Docs](https://docs.push.org/developers/developer-tooling/push-sdk/sdk-packages-details/pushprotocol-socket) or [Push.org](https://push.org) to learn more.## 🚀 Getting Started
### 🖥 Installation
Add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
```yaml
dependencies:
push_socket_client_dart: ^0.0.1-alpha
```
Alternatively, your editor might support ```dart pub get``` or ```flutter pub get```. Check the docs for your editor to learn more.Try it:
```dart
import 'package:push_socket_client_dart/push_socket_client_dart.dart';void main() {
final options = SocketInputOptions(
user: '0x08f890A796E757714c3472032383634565aF6044',
env: ENV.DEV,
socketType: SOCKETTYPES.NOTIFICATION,
socketOptions: SocketOptions(
autoConnect: true,
reconnectionAttempts: 5,
),
);
final pushSocket = createSocketConnection(options);
print('Result: $pushSocket');if (pushSocket != null) {
pushSocket.connect();pushSocket.on(
EVENTS.CONNECT,
(data) {
print(' EVENTS.CONNECT: $data');
},
);
pushSocket.on(
EVENTS.CHAT_RECEIVED_MESSAGE,
(data) {
print(' EVENTS.CHAT_RECEIVED_MESSAGE: $data');
},
);
pushSocket.on(
EVENTS.CHAT_GROUPS,
(data) {
print(' EVENTS.CHAT_GROUPS: $data');
},
);
pushSocket.on(
EVENTS.USER_FEEDS,
(data) {
print(' EVENTS.USER_FEEDS: $data');
},
);
pushSocket.on(
EVENTS.USER_SPAM_FEEDS,
(data) {
print(' EVENTS.USER_SPAM_FEEDS: $data');
},
);
pushSocket.on(
EVENTS.DISCONNECT,
(data) {
print(' EVENTS.DISCONNECT: $data');
},
);
}
}
```---
## Resources
- **[Website](https://push.org)** To checkout our Product.
- **[Docs](https://docs.push.org/developers/)** For comprehensive documentation.
- **[Blog](https://medium.com/push-protocol)** To learn more about our partners, new launches, etc.
- **[Discord](discord.gg/pushprotocol)** for support and discussions with the community and the team.
- **[GitHub](https://github.com/ethereum-push-notification-service)** for source code, project board, issues, and pull requests.
- **[Twitter](https://twitter.com/pushprotocol)** for the latest updates on the product and published blogs.## Contributing
Push Protocol is an open source Project. We firmly believe in a completely transparent development process and value any contributions. We would love to have you as a member of the community, whether you are assisting us in bug fixes, suggesting new features, enhancing our documentation, or simply spreading the word.
- Bug Report: Please create a bug report if you encounter any errors or problems while utilising the Push Protocol.
- Feature Request: Please submit a feature request if you have an idea or discover a capability that would make development simpler and more reliable.
- Documentation Request: If you're reading the Push documentation and believe that we're missing something, please create a docs request.Read how you can contribute HERE
Not sure where to start? Join our discord and we will help you get started!
## License
Check out our License HERE