source_server 0.1.7

  • Example
  • Installing
  • Versions
  • 50

SourceSerer #

A library to connect to Source Dedicated Servers [CS:GO, CSS, TF2, ...]

Get started #

Import the library (make sure to check for the latest version).

    source_server: ^0.1.4

Then Construct our class.

var server = new SourceServer('foo', ip: 'localhost', port: 27015);

The only required parameter is the first, password, the ip and port by default are: localhost:27015

Now we can estabilish a connection to server:

var server;

Here you can optionally provive an onDone callback to know when the connection closes.

Sending commands #


var reply = await server.command('status');

the method command will return a Future string holding the server reply.


Check the issues page on github

1.0.0 #

  • Initial version, created by Stagehand


import '../lib/source_server.dart';

void main() async {
  //By default the IP is: localhost and port: 27015 .
  SourceServer rcon = SourceServer('foo');
  //Attempt to connect.
  await rcon.connect();
  //Print the 'status' reply.
  print(await rcon.command('status'));

  //Print all players name.
  var players = await rcon.getPlayers();
  players.forEach((player) {

  //Print server info.
  print(await rcon.getServerInfo());

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  source_server: ^0.1.7

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:source_server/source_server.dart';
Version Uploaded Documentation Archive
0.1.7 Sep 28, 2018 Go to the documentation of source_server 0.1.7 Download source_server 0.1.7 archive
0.1.6 Sep 21, 2018 Go to the documentation of source_server 0.1.6 Download source_server 0.1.6 archive
0.1.5 Aug 12, 2018 Go to the documentation of source_server 0.1.5 Download source_server 0.1.5 archive
0.1.4 Aug 9, 2018 Go to the documentation of source_server 0.1.4 Download source_server 0.1.4 archive
0.1.3 Aug 6, 2018 Go to the documentation of source_server 0.1.3 Download source_server 0.1.3 archive
0.1.2 Aug 5, 2018 Go to the documentation of source_server 0.1.2 Download source_server 0.1.2 archive
0.1.1 Aug 3, 2018 Go to the documentation of source_server 0.1.1 Download source_server 0.1.1 archive
0.1.0 Aug 3, 2018 Go to the documentation of source_server 0.1.0 Download source_server 0.1.0 archive
0.0.3 Aug 2, 2018 Go to the documentation of source_server 0.0.3 Download source_server 0.0.3 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1


Detected platforms: Flutter, other

Primary library: package:source_server/source_server.dart with components: io.

Health suggestions

Fix lib/src/server.dart. (-1 points)

Analysis of lib/src/server.dart reported 2 hints:

line 148 col 25: Use = to separate a named parameter from its default value.

line 202 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Format lib/source_server.dart.

Run dartfmt to format lib/source_server.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0