Overview

This is an unofficial, community maintained, Flutter client for Nakama's open-source game server written in pure Dart. It supports cross platform gaming over Android, iOS, Web, Windows, Linux and Mac.

🚦 Current Status

Almost all basic functions which are necessary to start playing around with Nakama are ready to use. Please feel free to give your feedback with creating an issue. I am currently working on getting a 100 % coverage with this SDK.

🔆 About this docs

I am not associated with Heroic Labs and this project is third party open source. I give my best to I try to make the API as close to the official Nakama SDK as possible, if it makes sense. Therefore, you'll find regular references to the official Nakama docs here to avoid producing duplicate content. Nevertheless, this documentation is intended to show all the specifics of the Flutter SDK.

🚀 Getting Started

1. Setup Nakama Server

You need a Nakama instance for developing. I suggest setting up Nakama with Docker Compose. You find a tutorial here: Install Nakama with Docker Compose and here Installation & Setup.

2. Add flutter_nakama to pubspec.yaml.

name: your_game
dependencies:
    flutter:
        sdk: flutter
    flutter_nakama: ^0.1.0

👨‍🏫 Basics

It is important to understand how Nakama basically works. I tried to make this SDK as similar as possible to the existing SDKs for Swift & JavaScript, so you can use the official Nakama documentation as an additional source.

This package consists of two parts:

REST / gRPC API

The REST / gRPC API (NakamaBaseClient) is responsible for all requests that are not related to realtime multiplayer. So for most of the endpoints.

Normally the communication with Nakama runs via gRPC, but this is not supported in the browser. You can map gRPC via a proxy, but since this requires additional software and setup, this SDK uses the REST API for web builds and gRPC for all other platforms. The base client contains authentication, access to storage, leaderboards, groups and so on.

Realtime WebSocket

As soon as you interact with realtime multiplayer you use NakamaWebsocketClient. The WebSocket client contains matchmaking, match realtime data, notifications, presences, status updates etc.

Last updated