socketnotifs 0.0.1 copy "socketnotifs: ^0.0.1" to clipboard
socketnotifs: ^0.0.1 copied to clipboard

SocketNotifs is a Dart plugin for Flutter applications that facilitates easy WebSocket connections and provides notifications. This plugin currently supports the Android platform, while iOS support is [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:socketnotifs/socketnotifs_platform_interface.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    SocketNotifsPlatform.instance.connectToWebSocket("ws://10.0.2.2:4000");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const Center(
          child: Text('Running on: drugs\n'),
        ),
      ),
    );
  }
}
2
likes
0
points
0
downloads

Publisher

verified publisheryajatkaul.site

Weekly Downloads

SocketNotifs is a Dart plugin for Flutter applications that facilitates easy WebSocket connections and provides notifications. This plugin currently supports the Android platform, while iOS support is still under development.

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on socketnotifs

Packages that implement socketnotifs