aboutsummaryrefslogtreecommitdiffstats
path: root/lib/presentation/screens/home
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-07-31 11:30:22 -0400
committerScott Murray <scott.murray@konsulko.com>2024-08-01 14:29:54 +0000
commit6188a4c545e6e6794eba943431ec20108553b98f (patch)
treecc55957a7f1678078406f38a92be3c12bb663495 /lib/presentation/screens/home
parent60f049213525a7f487d0cd527f2bea675451409f (diff)
Add support for CI screenshot testing
Rework the high-level App & AppView widgets a bit to allow conditionally displaying a simple fixed pattern if the HOMESCREEN_DEMO_CI environment variable is set to anything other than "0". The pattern displayed matches what the Qt homescreen shows for this to allow the CI test to be common. Bug-AGL: SPEC-5203 Change-Id: I36ed77c91304e3b6cdbce6a7350831d52d20d378 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 25b6a079d5fe9c1365d776298ae5230a4de1ba16)
Diffstat (limited to 'lib/presentation/screens/home')
-rw-r--r--lib/presentation/screens/home/home_ci.dart20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/presentation/screens/home/home_ci.dart b/lib/presentation/screens/home/home_ci.dart
new file mode 100644
index 0000000..8584420
--- /dev/null
+++ b/lib/presentation/screens/home/home_ci.dart
@@ -0,0 +1,20 @@
+import 'package:flutter_ics_homescreen/export.dart';
+
+// Simple fixed pattern homescreen for AGL CI screenshot testing
+
+class HomeScreenCI extends StatelessWidget {
+ const HomeScreenCI({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ // Note that the colors are specified with hex in order to match
+ // Qt's red/blue/green constants, which are different than Flutter's.
+ Container(width: 1080, height: 216, color: Color(0xFF0000FF)),
+ Container(width: 1080, height: 1488, color: Color(0xFFFF0000)),
+ Container(width: 1080, height: 216, color: Color(0xFF008000))
+ ],
+ );
+ }
+}