rohitsangwan01 / flutter_synergy

A Flutter client implementation for synergy servers like Synergy, Barrier, InputLeap
MIT License
22 stars 0 forks source link

Synergy Client Flutter

synergy_client_dart version synergy_client_flutter version

Flutter Synergy

Flutter Synergy Client: A flutter client implementation for synergy servers like Synergy, Barrier, InputLeap

Get started

Disable SSL in server ( Encryption not supported yet )

To use in Flutter, import synergy_client_flutter

Wrap your app in SynergyClientFlutter, That's it, a floating button will appear in app tap on it to enter details and connect to Synergy

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

  runApp(
    const SynergyClientFlutter(
      enabled: true,
      child: MaterialApp(
        ....
      ),
    ),
  );
}

To use in pure Dart, import synergy_client_dart

Create a class extending ScreenInterface

class BasicScreen extends ScreenInterface {
    // Implement all methods
}

Connect with synergy using this screen interface

var screen = BasicScreen();

await SynergyClientDart.connect(
    screen: screen,
    serverIp: serverIp,
    serverPort: serverPort,
    clientName: clientName,
);

To Disconnect

SynergyClientDart.disconnect();

Checkout complete documentation

Demo

flutter_synergy_demo

Note:

Inspired from synergy-android

This project is in initial stage, Api's might change