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.
// 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).
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.
// 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());
MaterialApp home — call init() on app start.FutureBuilder or async/await; never block the UI thread on HTTP.version in code must match App Settings → version on the dashboard.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.