diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/main.dart | 3 | ||||
-rw-r--r-- | lib/presentation/screens/home/home.dart | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/lib/main.dart b/lib/main.dart index 3b896fc..85c7506 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,8 +4,9 @@ import 'export.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + const debugDisplay = bool.fromEnvironment('DEBUG_DISPLAY'); runApp(DevicePreview( - enabled: false, + enabled: debugDisplay, tools: const [ ...DevicePreview.defaultTools, ], diff --git a/lib/presentation/screens/home/home.dart b/lib/presentation/screens/home/home.dart index a18e640..41f6895 100644 --- a/lib/presentation/screens/home/home.dart +++ b/lib/presentation/screens/home/home.dart @@ -31,6 +31,9 @@ class HomeScreenState extends ConsumerState<HomeScreen> { ) { return Consumer(builder: (context, ref, child) { final state = ref.read(appProvider); + const disableBkgAnimation = bool.fromEnvironment('DISABLE_BKG_ANIMATION'); + if(disableBkgAnimation) + print('Background animation: disabled'); return Scaffold( key: homeScaffoldKey, extendBody: true, @@ -38,11 +41,12 @@ class HomeScreenState extends ConsumerState<HomeScreen> { appBar: const CustomTopBar(), body: Stack( children: [ - Lottie.asset( - 'animations/BG-dotwaveform.json', - fit: BoxFit.cover, - repeat: true, - ), + if (!disableBkgAnimation) + Lottie.asset( + 'animations/BG-dotwaveform.json', + fit: BoxFit.cover, + repeat: true, + ), FlowBuilder<AppState>( state: ref.watch(appProvider), onGeneratePages: onGenerateAppViewPages, |