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

PlatformAndroid

SocketNotifs is a Dart plugin for Flutter applications that facilitates easy WebSocket connections for notifications

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:socketnotifs/socketnotifs.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();
    //Establish connection
    SocketNotifs.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
160
points
2
downloads

Publisher

verified publisheryajatkaul.site

Weekly Downloads

SocketNotifs is a Dart plugin for Flutter applications that facilitates easy WebSocket connections for notifications

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on socketnotifs

Packages that implement socketnotifs