From cc9124cd1145ecd0b0c5b2baeb0a3abb7d706a29 Mon Sep 17 00:00:00 2001 From: Felipe Erias Date: Wed, 17 Nov 2021 13:04:50 +0900 Subject: Integrate HVAC page --- images/HMI_HVAC_Active.png | Bin 0 -> 2339 bytes images/HMI_HVAC_Active.svg | 35 ++++++ images/HMI_HVAC_AirDown_Active.png | Bin 0 -> 8320 bytes images/HMI_HVAC_AirDown_Active.svg | 66 ++++++++++ images/HMI_HVAC_AirDown_Inactive.png | Bin 0 -> 7306 bytes images/HMI_HVAC_AirDown_Inactive.svg | 69 +++++++++++ images/HMI_HVAC_AirRight_Active.png | Bin 0 -> 8454 bytes images/HMI_HVAC_AirRight_Active.svg | 69 +++++++++++ images/HMI_HVAC_AirRight_Inactive.png | Bin 0 -> 3730 bytes images/HMI_HVAC_AirRight_Inactive.svg | 72 +++++++++++ images/HMI_HVAC_AirUp_Active.png | Bin 0 -> 8615 bytes images/HMI_HVAC_AirUp_Active.svg | 74 ++++++++++++ images/HMI_HVAC_AirUp_Inactive.png | Bin 0 -> 7281 bytes images/HMI_HVAC_AirUp_Inactive.svg | 75 ++++++++++++ images/HMI_HVAC_ChairIndicator_OFF.png | Bin 0 -> 402 bytes images/HMI_HVAC_ChairIndicator_OFF.svg | 76 ++++++++++++ images/HMI_HVAC_ChairIndicator_One.png | Bin 0 -> 412 bytes images/HMI_HVAC_ChairIndicator_One.svg | 31 +++++ images/HMI_HVAC_ChairIndicator_Two.png | Bin 0 -> 402 bytes images/HMI_HVAC_ChairIndicator_Two.svg | 30 +++++ images/HMI_HVAC_Circulation_Active.png | Bin 0 -> 9031 bytes images/HMI_HVAC_Circulation_Active.svg | 87 ++++++++++++++ images/HMI_HVAC_Circulation_Inactive.png | Bin 0 -> 7425 bytes images/HMI_HVAC_Circulation_Inactive.svg | 87 ++++++++++++++ images/HMI_HVAC_Fan_Icon.png | Bin 0 -> 7407 bytes images/HMI_HVAC_Fan_Icon.svg | 46 +++++++ images/HMI_HVAC_Front_Active.png | Bin 0 -> 11242 bytes images/HMI_HVAC_Front_Active.svg | 75 ++++++++++++ images/HMI_HVAC_Front_Inactive.png | Bin 0 -> 10209 bytes images/HMI_HVAC_Front_Inactive.svg | 72 +++++++++++ images/HMI_HVAC_Inactive.png | Bin 0 -> 380 bytes images/HMI_HVAC_Inactive.svg | 31 +++++ images/HMI_HVAC_Left_Chair_OFF.png | Bin 0 -> 10533 bytes images/HMI_HVAC_Left_Chair_OFF.svg | 87 ++++++++++++++ images/HMI_HVAC_Left_Chair_ON.png | Bin 0 -> 10998 bytes images/HMI_HVAC_Left_Chair_ON.svg | 59 +++++++++ images/HMI_HVAC_Rear_Active.png | Bin 0 -> 8699 bytes images/HMI_HVAC_Rear_Active.svg | 101 ++++++++++++++++ images/HMI_HVAC_Rear_Inactive.png | Bin 0 -> 4253 bytes images/HMI_HVAC_Rear_Inactive.svg | 91 ++++++++++++++ images/HMI_HVAC_Right_Chair_OFF.png | Bin 0 -> 10015 bytes images/HMI_HVAC_Right_Chair_OFF.svg | 87 ++++++++++++++ images/HMI_HVAC_Right_Chair_ON.png | Bin 0 -> 9807 bytes images/HMI_HVAC_Right_Chair_ON.svg | 60 ++++++++++ images/horizontal_background.png | Bin 0 -> 753195 bytes images/vertical_background.png | Bin 0 -> 719555 bytes lib/page_dashboard.dart | 26 +++- lib/page_hvac.dart | 200 ++++++++++++++++++++++++++++++- pubspec.lock | 14 +++ pubspec.yaml | 15 ++- 50 files changed, 1724 insertions(+), 11 deletions(-) create mode 100644 images/HMI_HVAC_Active.png create mode 100644 images/HMI_HVAC_Active.svg create mode 100644 images/HMI_HVAC_AirDown_Active.png create mode 100644 images/HMI_HVAC_AirDown_Active.svg create mode 100644 images/HMI_HVAC_AirDown_Inactive.png create mode 100644 images/HMI_HVAC_AirDown_Inactive.svg create mode 100644 images/HMI_HVAC_AirRight_Active.png create mode 100644 images/HMI_HVAC_AirRight_Active.svg create mode 100644 images/HMI_HVAC_AirRight_Inactive.png create mode 100644 images/HMI_HVAC_AirRight_Inactive.svg create mode 100644 images/HMI_HVAC_AirUp_Active.png create mode 100644 images/HMI_HVAC_AirUp_Active.svg create mode 100644 images/HMI_HVAC_AirUp_Inactive.png create mode 100644 images/HMI_HVAC_AirUp_Inactive.svg create mode 100644 images/HMI_HVAC_ChairIndicator_OFF.png create mode 100644 images/HMI_HVAC_ChairIndicator_OFF.svg create mode 100644 images/HMI_HVAC_ChairIndicator_One.png create mode 100644 images/HMI_HVAC_ChairIndicator_One.svg create mode 100644 images/HMI_HVAC_ChairIndicator_Two.png create mode 100644 images/HMI_HVAC_ChairIndicator_Two.svg create mode 100644 images/HMI_HVAC_Circulation_Active.png create mode 100644 images/HMI_HVAC_Circulation_Active.svg create mode 100644 images/HMI_HVAC_Circulation_Inactive.png create mode 100644 images/HMI_HVAC_Circulation_Inactive.svg create mode 100644 images/HMI_HVAC_Fan_Icon.png create mode 100644 images/HMI_HVAC_Fan_Icon.svg create mode 100644 images/HMI_HVAC_Front_Active.png create mode 100644 images/HMI_HVAC_Front_Active.svg create mode 100644 images/HMI_HVAC_Front_Inactive.png create mode 100644 images/HMI_HVAC_Front_Inactive.svg create mode 100644 images/HMI_HVAC_Inactive.png create mode 100644 images/HMI_HVAC_Inactive.svg create mode 100644 images/HMI_HVAC_Left_Chair_OFF.png create mode 100644 images/HMI_HVAC_Left_Chair_OFF.svg create mode 100644 images/HMI_HVAC_Left_Chair_ON.png create mode 100644 images/HMI_HVAC_Left_Chair_ON.svg create mode 100644 images/HMI_HVAC_Rear_Active.png create mode 100644 images/HMI_HVAC_Rear_Active.svg create mode 100644 images/HMI_HVAC_Rear_Inactive.png create mode 100644 images/HMI_HVAC_Rear_Inactive.svg create mode 100644 images/HMI_HVAC_Right_Chair_OFF.png create mode 100644 images/HMI_HVAC_Right_Chair_OFF.svg create mode 100644 images/HMI_HVAC_Right_Chair_ON.png create mode 100644 images/HMI_HVAC_Right_Chair_ON.svg create mode 100644 images/horizontal_background.png create mode 100644 images/vertical_background.png diff --git a/images/HMI_HVAC_Active.png b/images/HMI_HVAC_Active.png new file mode 100644 index 0000000..f875fcf Binary files /dev/null and b/images/HMI_HVAC_Active.png differ diff --git a/images/HMI_HVAC_Active.svg b/images/HMI_HVAC_Active.svg new file mode 100644 index 0000000..71e6aa0 --- /dev/null +++ b/images/HMI_HVAC_Active.svg @@ -0,0 +1,35 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_AirDown_Active.png b/images/HMI_HVAC_AirDown_Active.png new file mode 100644 index 0000000..06ece7d Binary files /dev/null and b/images/HMI_HVAC_AirDown_Active.png differ diff --git a/images/HMI_HVAC_AirDown_Active.svg b/images/HMI_HVAC_AirDown_Active.svg new file mode 100644 index 0000000..85dd533 --- /dev/null +++ b/images/HMI_HVAC_AirDown_Active.svg @@ -0,0 +1,66 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_AirDown_Inactive.png b/images/HMI_HVAC_AirDown_Inactive.png new file mode 100644 index 0000000..17b051e Binary files /dev/null and b/images/HMI_HVAC_AirDown_Inactive.png differ diff --git a/images/HMI_HVAC_AirDown_Inactive.svg b/images/HMI_HVAC_AirDown_Inactive.svg new file mode 100644 index 0000000..a013f4b --- /dev/null +++ b/images/HMI_HVAC_AirDown_Inactive.svg @@ -0,0 +1,69 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_AirRight_Active.png b/images/HMI_HVAC_AirRight_Active.png new file mode 100644 index 0000000..f7dc92d Binary files /dev/null and b/images/HMI_HVAC_AirRight_Active.png differ diff --git a/images/HMI_HVAC_AirRight_Active.svg b/images/HMI_HVAC_AirRight_Active.svg new file mode 100644 index 0000000..cfb9452 --- /dev/null +++ b/images/HMI_HVAC_AirRight_Active.svg @@ -0,0 +1,69 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_AirRight_Inactive.png b/images/HMI_HVAC_AirRight_Inactive.png new file mode 100644 index 0000000..3c8b4f7 Binary files /dev/null and b/images/HMI_HVAC_AirRight_Inactive.png differ diff --git a/images/HMI_HVAC_AirRight_Inactive.svg b/images/HMI_HVAC_AirRight_Inactive.svg new file mode 100644 index 0000000..991a773 --- /dev/null +++ b/images/HMI_HVAC_AirRight_Inactive.svg @@ -0,0 +1,72 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_AirUp_Active.png b/images/HMI_HVAC_AirUp_Active.png new file mode 100644 index 0000000..0ce3952 Binary files /dev/null and b/images/HMI_HVAC_AirUp_Active.png differ diff --git a/images/HMI_HVAC_AirUp_Active.svg b/images/HMI_HVAC_AirUp_Active.svg new file mode 100644 index 0000000..f168a39 --- /dev/null +++ b/images/HMI_HVAC_AirUp_Active.svg @@ -0,0 +1,74 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_AirUp_Inactive.png b/images/HMI_HVAC_AirUp_Inactive.png new file mode 100644 index 0000000..770496d Binary files /dev/null and b/images/HMI_HVAC_AirUp_Inactive.png differ diff --git a/images/HMI_HVAC_AirUp_Inactive.svg b/images/HMI_HVAC_AirUp_Inactive.svg new file mode 100644 index 0000000..39e1fa1 --- /dev/null +++ b/images/HMI_HVAC_AirUp_Inactive.svg @@ -0,0 +1,75 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_ChairIndicator_OFF.png b/images/HMI_HVAC_ChairIndicator_OFF.png new file mode 100644 index 0000000..510930f Binary files /dev/null and b/images/HMI_HVAC_ChairIndicator_OFF.png differ diff --git a/images/HMI_HVAC_ChairIndicator_OFF.svg b/images/HMI_HVAC_ChairIndicator_OFF.svg new file mode 100644 index 0000000..1fcd17f --- /dev/null +++ b/images/HMI_HVAC_ChairIndicator_OFF.svg @@ -0,0 +1,76 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_ChairIndicator_One.png b/images/HMI_HVAC_ChairIndicator_One.png new file mode 100644 index 0000000..c157391 Binary files /dev/null and b/images/HMI_HVAC_ChairIndicator_One.png differ diff --git a/images/HMI_HVAC_ChairIndicator_One.svg b/images/HMI_HVAC_ChairIndicator_One.svg new file mode 100644 index 0000000..d560c84 --- /dev/null +++ b/images/HMI_HVAC_ChairIndicator_One.svg @@ -0,0 +1,31 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_ChairIndicator_Two.png b/images/HMI_HVAC_ChairIndicator_Two.png new file mode 100644 index 0000000..4257841 Binary files /dev/null and b/images/HMI_HVAC_ChairIndicator_Two.png differ diff --git a/images/HMI_HVAC_ChairIndicator_Two.svg b/images/HMI_HVAC_ChairIndicator_Two.svg new file mode 100644 index 0000000..b31cc90 --- /dev/null +++ b/images/HMI_HVAC_ChairIndicator_Two.svg @@ -0,0 +1,30 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Circulation_Active.png b/images/HMI_HVAC_Circulation_Active.png new file mode 100644 index 0000000..8a9028d Binary files /dev/null and b/images/HMI_HVAC_Circulation_Active.png differ diff --git a/images/HMI_HVAC_Circulation_Active.svg b/images/HMI_HVAC_Circulation_Active.svg new file mode 100644 index 0000000..def92bb --- /dev/null +++ b/images/HMI_HVAC_Circulation_Active.svg @@ -0,0 +1,87 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Circulation_Inactive.png b/images/HMI_HVAC_Circulation_Inactive.png new file mode 100644 index 0000000..fa86d8e Binary files /dev/null and b/images/HMI_HVAC_Circulation_Inactive.png differ diff --git a/images/HMI_HVAC_Circulation_Inactive.svg b/images/HMI_HVAC_Circulation_Inactive.svg new file mode 100644 index 0000000..9c7d43f --- /dev/null +++ b/images/HMI_HVAC_Circulation_Inactive.svg @@ -0,0 +1,87 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_Fan_Icon.png b/images/HMI_HVAC_Fan_Icon.png new file mode 100644 index 0000000..c539f03 Binary files /dev/null and b/images/HMI_HVAC_Fan_Icon.png differ diff --git a/images/HMI_HVAC_Fan_Icon.svg b/images/HMI_HVAC_Fan_Icon.svg new file mode 100644 index 0000000..ee583a0 --- /dev/null +++ b/images/HMI_HVAC_Fan_Icon.svg @@ -0,0 +1,46 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Front_Active.png b/images/HMI_HVAC_Front_Active.png new file mode 100644 index 0000000..bdf3ac4 Binary files /dev/null and b/images/HMI_HVAC_Front_Active.png differ diff --git a/images/HMI_HVAC_Front_Active.svg b/images/HMI_HVAC_Front_Active.svg new file mode 100644 index 0000000..146e509 --- /dev/null +++ b/images/HMI_HVAC_Front_Active.svg @@ -0,0 +1,75 @@ + + + + + + + + + + +]> + + + + + + + FRONT + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Front_Inactive.png b/images/HMI_HVAC_Front_Inactive.png new file mode 100644 index 0000000..69453ff Binary files /dev/null and b/images/HMI_HVAC_Front_Inactive.png differ diff --git a/images/HMI_HVAC_Front_Inactive.svg b/images/HMI_HVAC_Front_Inactive.svg new file mode 100644 index 0000000..c5d9166 --- /dev/null +++ b/images/HMI_HVAC_Front_Inactive.svg @@ -0,0 +1,72 @@ + + + +image/svg+xmlFRONT + \ No newline at end of file diff --git a/images/HMI_HVAC_Inactive.png b/images/HMI_HVAC_Inactive.png new file mode 100644 index 0000000..a9a63f2 Binary files /dev/null and b/images/HMI_HVAC_Inactive.png differ diff --git a/images/HMI_HVAC_Inactive.svg b/images/HMI_HVAC_Inactive.svg new file mode 100644 index 0000000..2956a26 --- /dev/null +++ b/images/HMI_HVAC_Inactive.svg @@ -0,0 +1,31 @@ + + + + + + + + + + +]> + + + + + + + + + + diff --git a/images/HMI_HVAC_Left_Chair_OFF.png b/images/HMI_HVAC_Left_Chair_OFF.png new file mode 100644 index 0000000..5096eb4 Binary files /dev/null and b/images/HMI_HVAC_Left_Chair_OFF.png differ diff --git a/images/HMI_HVAC_Left_Chair_OFF.svg b/images/HMI_HVAC_Left_Chair_OFF.svg new file mode 100644 index 0000000..1412266 --- /dev/null +++ b/images/HMI_HVAC_Left_Chair_OFF.svg @@ -0,0 +1,87 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_Left_Chair_ON.png b/images/HMI_HVAC_Left_Chair_ON.png new file mode 100644 index 0000000..c09921d Binary files /dev/null and b/images/HMI_HVAC_Left_Chair_ON.png differ diff --git a/images/HMI_HVAC_Left_Chair_ON.svg b/images/HMI_HVAC_Left_Chair_ON.svg new file mode 100644 index 0000000..b27b126 --- /dev/null +++ b/images/HMI_HVAC_Left_Chair_ON.svg @@ -0,0 +1,59 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Rear_Active.png b/images/HMI_HVAC_Rear_Active.png new file mode 100644 index 0000000..21ad47a Binary files /dev/null and b/images/HMI_HVAC_Rear_Active.png differ diff --git a/images/HMI_HVAC_Rear_Active.svg b/images/HMI_HVAC_Rear_Active.svg new file mode 100644 index 0000000..182ccbd --- /dev/null +++ b/images/HMI_HVAC_Rear_Active.svg @@ -0,0 +1,101 @@ + + + + + + + + + + +]> + + + + + + REAR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/HMI_HVAC_Rear_Inactive.png b/images/HMI_HVAC_Rear_Inactive.png new file mode 100644 index 0000000..9a9dadf Binary files /dev/null and b/images/HMI_HVAC_Rear_Inactive.png differ diff --git a/images/HMI_HVAC_Rear_Inactive.svg b/images/HMI_HVAC_Rear_Inactive.svg new file mode 100644 index 0000000..574c541 --- /dev/null +++ b/images/HMI_HVAC_Rear_Inactive.svg @@ -0,0 +1,91 @@ + + + +image/svg+xmlREAR + \ No newline at end of file diff --git a/images/HMI_HVAC_Right_Chair_OFF.png b/images/HMI_HVAC_Right_Chair_OFF.png new file mode 100644 index 0000000..f20048c Binary files /dev/null and b/images/HMI_HVAC_Right_Chair_OFF.png differ diff --git a/images/HMI_HVAC_Right_Chair_OFF.svg b/images/HMI_HVAC_Right_Chair_OFF.svg new file mode 100644 index 0000000..711a942 --- /dev/null +++ b/images/HMI_HVAC_Right_Chair_OFF.svg @@ -0,0 +1,87 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/images/HMI_HVAC_Right_Chair_ON.png b/images/HMI_HVAC_Right_Chair_ON.png new file mode 100644 index 0000000..5f19eaf Binary files /dev/null and b/images/HMI_HVAC_Right_Chair_ON.png differ diff --git a/images/HMI_HVAC_Right_Chair_ON.svg b/images/HMI_HVAC_Right_Chair_ON.svg new file mode 100644 index 0000000..74b4861 --- /dev/null +++ b/images/HMI_HVAC_Right_Chair_ON.svg @@ -0,0 +1,60 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/horizontal_background.png b/images/horizontal_background.png new file mode 100644 index 0000000..b5a36e4 Binary files /dev/null and b/images/horizontal_background.png differ diff --git a/images/vertical_background.png b/images/vertical_background.png new file mode 100644 index 0000000..3f553fe Binary files /dev/null and b/images/vertical_background.png differ diff --git a/lib/page_dashboard.dart b/lib/page_dashboard.dart index bce7590..2ab1d38 100644 --- a/lib/page_dashboard.dart +++ b/lib/page_dashboard.dart @@ -58,10 +58,7 @@ class DashboardPage extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text( - 'RPM', - style: Theme.of(context).textTheme.headline4, - ), + _RPMWidget(), Text( 'Fuel', style: Theme.of(context).textTheme.headline4, @@ -73,3 +70,24 @@ class DashboardPage extends StatelessWidget { ); } } + +// ignore: unused_element +class _RPMWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(Icons.fastfood), + Container( + height: 20, + width: 70, + child: LinearProgressIndicator( + value: 0.75, + semanticsLabel: 'Linear progress indicator', + ), + ), + ], + ); + } +} diff --git a/lib/page_hvac.dart b/lib/page_hvac.dart index ea38cb9..df5027e 100644 --- a/lib/page_hvac.dart +++ b/lib/page_hvac.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:numberpicker/numberpicker.dart'; class HVACPage extends StatelessWidget { @@ -6,13 +7,204 @@ class HVACPage extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - color: Colors.lime.shade50, constraints: BoxConstraints.expand(), alignment: Alignment.center, - child: Text( - 'HVAC', - style: Theme.of(context).textTheme.headline1, + child: const MainPage(title: 'AGL - Flutter HVAC'), + ); + } +} + +class _TemperatureSelector extends StatefulWidget { + @override + _TemperatureSelectorState createState() => _TemperatureSelectorState(); +} + +class _TemperatureSelectorState extends State<_TemperatureSelector> { + int _currentValue = 22; // INIT FROM AGLJS wrapper + + @override + Widget build(BuildContext context) { + return Column( + children: [ + NumberPicker( + value: _currentValue, + minValue: 18, + maxValue: 25, + onChanged: (value) => setState(() => _currentValue = value), ), + ], ); } } + +/// This is the stateful widget that the main application instantiates. +class HVACFanSpeed extends StatefulWidget { + const HVACFanSpeed({Key? key}) : super(key: key); + @override + State createState() => _HVACFanSpeedState(); +} + +/// This is the private State class that goes with MyStatefulWidget. +class _HVACFanSpeedState extends State { + double _currentSliderValue = 20; + + @override + Widget build(BuildContext context) { + return Slider( + value: _currentSliderValue, + min: 0, + max: 300, + label: _currentSliderValue.round().toString(), + onChanged: (double value) { + setState(() { + _currentSliderValue = value; + }); + }, + ); + } +} + +class MainPage extends StatefulWidget { + const MainPage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +String chairOn = 'images/HMI_HVAC_Left_Chair_ON.png'; +String chairOff = 'images/HMI_HVAC_Right_Chair_ON.png'; +bool selected = true; // Get from API + +class _MyHomePageState extends State { + final double fanSpeed = 20; + + Widget titleSection = Container( + padding: const EdgeInsets.all(32), + child: Row( + children: [ + Expanded(flex: 2, child: const HVACFanSpeed()), + Image.asset('images/HMI_HVAC_Fan_Icon.png', + width: 100, height: 100, fit: BoxFit.cover), + ], + ), + ); + + Widget rightSeat = Container( + padding: const EdgeInsets.all(32), + child: Column( + children: [ + IconButton( + iconSize: 100.0, + icon: Image.asset(selected ? chairOn : chairOff, + width: 100, height: 100, fit: BoxFit.cover), + onPressed: () { + selected = !selected; + }, + ), + _TemperatureSelector(), + ], + ), + ); + + Widget leftSeat = Container( + padding: const EdgeInsets.all(32), + child: Column( + children: [ + Image.asset('images/HMI_HVAC_Right_Chair_ON.png', + width: 100, height: 100, fit: BoxFit.cover), + _TemperatureSelector() + ], + ), + ); + + Widget centerView = Container( + padding: const EdgeInsets.all(32), + child: Column( + children: [ + Container( + width: 140, + height: 100, + margin: const EdgeInsets.all(15.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.green), + borderRadius: BorderRadius.circular(20)), + child: OutlinedButton( + onPressed: () { + // Respond to button press + }, + child: Text("A / C"), + ), + ), + Container( + width: 140, + height: 100, + margin: const EdgeInsets.all(15.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.green), + borderRadius: BorderRadius.circular(20)), + child: OutlinedButton( + onPressed: () { + // Respond to button press + }, + child: Text("Auto"), + ), + ), + Container( + width: 140, + height: 100, + margin: const EdgeInsets.all(15.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.green), + borderRadius: BorderRadius.circular(20)), + child: OutlinedButton( + onPressed: () { + // Respond to button press + }, + child: Image.asset('images/HMI_HVAC_Circulation_Inactive.png', + width: 100, height: 100, fit: BoxFit.cover)), + ), + ], + ), + ); + Widget actions = Container( + padding: const EdgeInsets.all(32), + child: Column( + children: [ + Image.asset('images/HMI_HVAC_AirDown_Inactive.png', + width: 100, height: 100, fit: BoxFit.cover), + Image.asset('images/HMI_HVAC_AirUp_Inactive.png', + width: 100, height: 100, fit: BoxFit.cover), + Image.asset('images/HMI_HVAC_Front_Inactive.png', + width: 100, height: 100, fit: BoxFit.cover), + Image.asset('images/HMI_HVAC_Rear_Active.png', + width: 100, height: 100, fit: BoxFit.cover), + ], + ), + ); + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [Colors.black, Colors.teal.shade900])), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + titleSection, + Row(children: [ + Expanded(flex: 2, child: rightSeat), + Expanded(flex: 2, child: centerView), + Expanded(flex: 2, child: leftSeat), + Expanded(flex: 2, child: actions) + ]) + ], + ), + )); + } +} diff --git a/pubspec.lock b/pubspec.lock index ecacb4a..120db0e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -67,6 +67,13 @@ packages: description: flutter source: sdk version: "0.0.0" + infinite_listview: + dependency: transitive + description: + name: infinite_listview + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" intl: dependency: "direct main" description: @@ -88,6 +95,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + numberpicker: + dependency: "direct main" + description: + name: numberpicker + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" path: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 6c50869..d416d2f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 intl: ^0.17.0 + numberpicker: ^2.1.1 dev_dependencies: flutter_test: @@ -46,9 +47,17 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - images/HMI_HVAC_Fan_Icon.png + - images/HMI_HVAC_Left_Chair_ON.png + - images/HMI_HVAC_Right_Chair_ON.png + - images/HMI_HVAC_Left_Chair_OFF.png + - images/HMI_HVAC_Right_Chair_OFF.png + - images/HMI_HVAC_Circulation_Inactive.png + - images/HMI_HVAC_Rear_Active.png + - images/HMI_HVAC_Front_Inactive.png + - images/HMI_HVAC_AirDown_Inactive.png + - images/HMI_HVAC_AirUp_Inactive.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. -- cgit 1.2.3-korg