Dart & Flutter

Build Flutter apps (Android, iOS, Windows, macOS, Linux, Web) with Ghotz Auth. Use a KeyAuth-compatible Dart package or HTTP — point the API base URL at your Ghotz server.

1. Credentials

// lib/ghotz_config.dart — copy from Manage Apps → Dart (Flutter)
class GhotzConfig {
  static const String name = 'YOUR_APP';
  static const String ownerid = 'YOUR_OWNERID';
  static const String version = '1.0';
  static const String url = 'https://keyghotz.space/api/1.2/';
}

Do not put your application secret in a shipped Flutter APK/IPA — use name, ownerid, and version only (same as C# / Swift clients).

2. pubspec.yaml

dependencies:
  http: ^1.2.0
  device_info_plus: ^10.0.0  # optional — for HWID helper

You may use a community KeyAuth Dart package if it supports a custom url / host parameter. Set that URL to GhotzConfig.url.

3. Typical flow

// After constructing your KeyAuth / Ghotz API client with GhotzConfig values:
await api.init();
if (!api.response.success) {
  // show api.response.message in UI
  return;
}

// License key only:
await api.license(key: licenseKey, hwid: await getHwid());

// Username + password:
await api.login(user: username, pass: password, hwid: await getHwid());

// Register (user + key):
await api.register(user: username, pass: password, key: licenseKey, hwid: await getHwid());

4. Flutter UI tips

5. HWID

Use the Dart SDK helper if available, or derive a stable device id (e.g. device_info_plus) and send the same value on every login / license call.

Android (Kotlin) → · iOS (Swift) → · C# → · Full tutorial →