feat(monetization-261): prepare entitlement infrastructure and quota enforcement for release
- Add EntitlementSnapshot, EntitlementRevalidationUseCase, and BillingUseCases - Add DriftEntitlementSnapshotRepository for offline entitlement caching - Add HealthConnect gateway and integration - Add quota enforcement in share acceptance (server and UI) - Add entitlement API endpoints in server - Add privacy policy v1 and release compliance checklist - Add QA gates and device runbooks for release validation - Add demo content screen and settings screen Ticket #261
This commit is contained in:
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../application/application.dart';
|
||||
@ -27,11 +28,20 @@ final class HttpApiClient {
|
||||
static String defaultBaseUrlFor({
|
||||
required bool isAndroid,
|
||||
String configuredBaseUrl = _configuredBaseUrl,
|
||||
bool isReleaseMode = kReleaseMode,
|
||||
}) {
|
||||
final configured = configuredBaseUrl.trim();
|
||||
if (configured.isNotEmpty) {
|
||||
if (isReleaseMode && Uri.tryParse(configured)?.scheme != 'https') {
|
||||
throw StateError(
|
||||
'GAMETIME_API_BASE_URL must be an HTTPS URL in release builds.',
|
||||
);
|
||||
}
|
||||
return configured;
|
||||
}
|
||||
if (isReleaseMode) {
|
||||
throw StateError('GAMETIME_API_BASE_URL is required in release builds.');
|
||||
}
|
||||
if (isAndroid) {
|
||||
return androidEmulatorDefaultBaseUrl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user