free_fire 0.0.3 copy "free_fire: ^0.0.3" to clipboard
free_fire: ^0.0.3 copied to clipboard

A Flutter package for WebSocket communication and persistent data storage.

free_fire #

A Flutter package for WebSocket communication and persistent data storage using SharedPreferences.

Features #

  • WebSocket Integration: Connects to WebSocket servers and manages bidirectional communication.
  • Persistent Data Storage: Stores data locally for seamless app state persistence.

Getting Started #

This project is a Flutter plugin package that simplifies WebSocket handling and persistent data storage.

Installation #

Add free_fire to your pubspec.yaml file:

dependencies:
  free_fire:
    git:
      url: https://github.com/CINO1902/free_fire.git
      ref: main

Run flutter pub get to install the package.

Usage #

Initialize and use FreeFireSocket to connect to a WebSocket server and manage persistent data:

import 'package:flutter/material.dart';
import 'package:free_fire/free_fire_socket/free_fire_socket.dart';
import 'package:free_fire/free_fire_socket/helpers/socket_config.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final socket = FreeFireSocket<String>();
  await socket.init(SocketConfig(
    persistStream: true,
    ws: 'wss://example.com',
    listen: true,
  ));

  // Use socket.send() to send messages and socket.stream to listen to incoming messages
}

Closing #

This README provides an overview of the free_fire package, including installation instructions, usage examples, and how to add repository URL and contributors to your pubspec.yaml. For more detailed information, refer to the online Flutter documentation.

2
likes
120
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package for WebSocket communication and persistent data storage.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface, shared_preferences, web_socket_channel

More

Packages that depend on free_fire