feat(demo): honor SCREENSHOT_MODE as alias for the iOS UITest path

The iOS fastlane snapshot UITest already passes --dart-define=SCREENSHOT_MODE=
true; accept it as an alias for DEMO_MODE so the Mac screenshot path drives the
same demo-wallet boot without changing the UITest. Trivial const OR; validated
on next build.
This commit is contained in:
jwinterm
2026-08-03 08:36:30 -04:00
parent 4be2424486
commit 4dd15704b0
+6 -1
View File
@@ -20,8 +20,13 @@ import 'package:shared_preferences/shared_preferences.dart';
///
/// Enable for a local capture build with:
/// flutter run --dart-define=DEMO_MODE=true
///
/// SCREENSHOT_MODE is honored as an alias so the iOS fastlane snapshot UITest
/// (ios/RunnerUITests/HashBagsScreenshotsUITests.swift, which already passes
/// --dart-define=SCREENSHOT_MODE=true) drives this same path unchanged.
const bool _demoModeDefine = bool.fromEnvironment('DEMO_MODE');
bool get isDemoMode => kDebugMode && _demoModeDefine;
const bool _screenshotModeDefine = bool.fromEnvironment('SCREENSHOT_MODE');
bool get isDemoMode => kDebugMode && (_demoModeDefine || _screenshotModeDefine);
/// PIN the demo build "unlocks" with.
const String _demoPin = String.fromEnvironment('DEMO_PIN', defaultValue: '0801');