Refactor: env variables. 50/29450/1
authorLisandro Pérez Meyer <lpmeyer@ics.com>
Mon, 20 Nov 2023 13:05:49 +0000 (10:05 -0300)
committerLisandro Pérez Meyer <lpmeyer@ics.com>
Mon, 20 Nov 2023 13:05:54 +0000 (10:05 -0300)
Original from: Dominik Wawrzonek <dwawrzonek@ics.com>

Bug-AGL: SPEC-4971

Change-Id: I95f23d4f475aa7db82b6d34f2fc62e9f10092a75
Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
lib/core/constants/constants.dart
lib/main.dart
lib/presentation/screens/apps/widgets/app_button.dart
lib/presentation/screens/home/home.dart

index 902af56..5d79b5a 100644 (file)
@@ -8,4 +8,8 @@ const maxFuelLevel = 100.0;
 const maxSpeed = 240.0;
 const maxRpm = 8000;
 final GlobalKey<ScaffoldState> homeScaffoldKey = GlobalKey();
+const debugDisplay = bool.fromEnvironment('DEBUG_DISPLAY');
+const disableBkgAnimation = bool.fromEnvironment('DISABLE_BKG_ANIMATION');
+
+
 
index 85c7506..c7d84ee 100644 (file)
@@ -4,7 +4,6 @@ import 'export.dart';
 
 void main() async {
   WidgetsFlutterBinding.ensureInitialized();
-  const debugDisplay = bool.fromEnvironment('DEBUG_DISPLAY');
   runApp(DevicePreview(
     enabled: debugDisplay,
     tools: const [
index a890786..2e016ca 100644 (file)
@@ -18,7 +18,6 @@ class AppButton extends StatefulWidget {
 class _AppButtonState extends State<AppButton> {
   @override
   Widget build(BuildContext context) {
-    Size size = MediaQuery.sizeOf(context);
     return Container(
       width: 250,
       height: 250,
index 41f6895..9719f8f 100644 (file)
@@ -31,9 +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');
+      if (disableBkgAnimation) {
+        debugPrint('Background animation: disabled');
+      }
       return Scaffold(
         key: homeScaffoldKey,
         extendBody: true,