ing connected, makign some features

This commit is contained in:
davmar
2026-09-07 00:20:58 +02:00
parent 87afe271b7
commit 21df7b0085
15 changed files with 1197 additions and 322 deletions
+15 -12
View File
@@ -13,23 +13,25 @@ const Duration kSplashDuration = Duration(seconds: 2);
/// Base URL for the personal ingtrak FastAPI backend.
///
/// Override at build/run time:
/// `flutter run --dart-define=API_BASE_URL=http://192.168.1.114:8000`
/// `flutter run --dart-define=API_BASE_URL=https://ingtrak.satoshinakamoto.win`
///
/// Defaults:
/// - Android emulator → `http://10.0.2.2:8000` (host loopback)
/// - iOS Simulator → `http://127.0.0.1:8000`
/// - Physical device → Mac LAN IP, e.g. `http://192.168.1.114:8000`
/// Local defaults (when override omitted):
/// - Android emulator → `http://10.0.2.2:8000`
/// - Physical device on LAN → `http://192.168.x.x:8000`
const String kApiBaseUrl = String.fromEnvironment(
'API_BASE_URL',
defaultValue: 'http://10.0.2.2:8000',
defaultValue: 'https://ingtrak.satoshinakamoto.win',
);
/// Enable Banking only accepts http(s) redirect URLs (not custom schemes).
/// Keep this exact value in the Control Panel and backend `REDIRECT_URI`.
/// The app opens auth in a WebView and intercepts this callback to read `code`.
const String kEnableBankingRedirectUri =
'http://localhost:8000/api/connect/callback';
/// Enable Banking redirect derived from [kApiBaseUrl].
/// Must match backend `REDIRECT_URI` and the Control Panel whitelist.
/// The app opens auth in a WebView and intercepts this callback path for `code`.
String get kEnableBankingRedirectUri {
final base = kApiBaseUrl.endsWith('/')
? kApiBaseUrl.substring(0, kApiBaseUrl.length - 1)
: kApiBaseUrl;
return '$base/api/connect/callback';
}
/// Optional app-scheme bounce used after the http callback (not registered
/// with Enable Banking).
const String kBankRedirectScheme = 'ingtrak';
@@ -42,6 +44,7 @@ abstract final class StorageKeys {
static const useRemoteData = 'use_remote_data';
static const txMeta = 'tx_meta_v2';
static const txMetaLegacy = 'tx_meta_v1';
static const bankCache = 'bank_cache_v1';
}
/// Named routes registered on [MaterialApp].