FLUTTER ECOSYSTEM

Workiva/sockjs_client_wrapper

SockJS क्लाइंट के चारों ओर एक Dart वрапर। JS लाइब्रेरी के साथ इंटरॉप के लिए js Dart पैकेज का उपयोग करता है।

sockjs_client_wrapper प्रोजेक्ट कवर
Stars
2
Forks
11
अंतिम पुश (UTC)
31 जुल॰ 2026
प्रोजेक्ट स्थिति
सक्रिय
Workiva GitHub avatar
भाषाएँJavaScriptDartHTML

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 9 आइटम
  • js^0.6.1
  • w_common>=2.0.0 <5.0.0
  • build_runnerडेवलपमेंट^2.1.2
  • build_testडेवलपमेंट^2.1.3
  • build_web_compilersडेवलपमेंट>=3.0.0 <5.0.0
  • dart_devडेवलपमेंट>=3.6.5 <5.0.0
  • dependency_validatorडेवलपमेंट^3.2.0
  • testडेवलपमेंट^1.15.7
  • workiva_analysis_optionsडेवलपमेंट^1.3.0

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

SockJS Client Wrapper

A Dart wrapper around the SockJS Client. Uses the js Dart package to interop with the JS lib.

Usage

Include the SockJS library in your app's index.html prior to the main Dart/JS script:

<!DOCTYPE html>
<html>
  <head> ... </head>
  <body>
    <!-- For local dev/debugging, use the unminified version: -->
    <script src="/packages/sockjs_client_wrapper/sockjs.js"></script>

    <!-- In production, use the minified version:  -->
    <script src="/packages/sockjs_client_wrapper/sockjs_prod.js"></script>
  </body>
</html>

Import package:sockjs_client_wrapper/sockjs_client_wrapper.dart and create a SockJSClient instance that will connect to a SockJS server:

import 'package:sockjs_client_wrapper/sockjs_client_wrapper.dart';

Future<Null> main() async {
  final client = new SockJSClient(Uri.parse('ws://localhost:9000/echo'));
  await client.onOpen.first;
  client.send('Hello!');
  ...
}

Development

Install dependencies
$ npm install
$ dart pub get
Run the example
$ dart run dart_dev serve
Run tests
$ dart run dart_dev test