summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/screen/home.dart12
-rw-r--r--lib/screen/widgets/signals.dart2
-rw-r--r--lib/screen/widgets/turn_signal.dart4
-rw-r--r--lib/vehicle_signal/initial_socket_connection.dart56
4 files changed, 44 insertions, 30 deletions
diff --git a/lib/screen/home.dart b/lib/screen/home.dart
index 70bc5c6..4cfa770 100644
--- a/lib/screen/home.dart
+++ b/lib/screen/home.dart
@@ -192,7 +192,7 @@ class Home extends ConsumerWidget {
Padding(
padding: EdgeInsets.fromLTRB(
calcPadding(60, screenHeight),
- calcPadding(10, screenHeight),
+ 0,
calcPadding(60, screenHeight),
0),
child: Row(
@@ -225,9 +225,13 @@ class Home extends ConsumerWidget {
child: (vehicle.isSteeringInfo)
? const NavigationHome()
: Padding(
- padding: EdgeInsets.all(
- (48.0 * screenHeight) /
- 720),
+ padding: EdgeInsets.symmetric(
+ vertical:
+ (36.0 * screenHeight) /
+ 720,
+ horizontal:
+ (48.0 * screenHeight) /
+ 720),
child: Image.asset(
"images/logo_agl.png",
width:
diff --git a/lib/screen/widgets/signals.dart b/lib/screen/widgets/signals.dart
index 788d379..dbdffb5 100644
--- a/lib/screen/widgets/signals.dart
+++ b/lib/screen/widgets/signals.dart
@@ -6,7 +6,7 @@ import 'package:flutter_cluster_dashboard/vehicle_signal/vehicle_signal_model.da
class Signals extends StatelessWidget {
final VehicleSignal vehicle;
final double screenHeight;
- static Color idleColor = const Color.fromARGB(194, 55, 53, 53);
+ static Color idleColor = Colors.grey.shade600;
const Signals({
Key? key,
required this.screenHeight,
diff --git a/lib/screen/widgets/turn_signal.dart b/lib/screen/widgets/turn_signal.dart
index a447cbe..446fbb8 100644
--- a/lib/screen/widgets/turn_signal.dart
+++ b/lib/screen/widgets/turn_signal.dart
@@ -43,7 +43,7 @@ class TurnSignal extends HookConsumerWidget {
Colors.black,
const Color.fromARGB(255, 99, 251, 104),
animationController.value.floorToDouble())
- : const Color.fromARGB(255, 49, 48, 48),
+ : Colors.grey.shade600,
width: 0.125 * screenHeight,
),
Image.asset(
@@ -53,7 +53,7 @@ class TurnSignal extends HookConsumerWidget {
Colors.black,
const Color.fromARGB(255, 99, 251, 104),
animationController.value.floorToDouble())
- : const Color.fromARGB(255, 49, 48, 48),
+ : Colors.grey.shade600,
width: 0.125 * screenHeight,
),
],
diff --git a/lib/vehicle_signal/initial_socket_connection.dart b/lib/vehicle_signal/initial_socket_connection.dart
index 6b9305a..aa13016 100644
--- a/lib/vehicle_signal/initial_socket_connection.dart
+++ b/lib/vehicle_signal/initial_socket_connection.dart
@@ -30,8 +30,8 @@ class InitialScreen extends ConsumerWidget {
backgroundColor: Colors.black,
body: NoticeWidget(
assetImageName: "images/server_error.png",
- text1: "Server Unavailable",
- text2: "Retrying to conncect!",
+ text1: "Server unavailable",
+ text2: "Retrying...",
),
);
},
@@ -39,8 +39,8 @@ class InitialScreen extends ConsumerWidget {
backgroundColor: Colors.black,
body: NoticeWidget(
assetImageName: "images/server.png",
- text1: "Hi!",
- text2: "Connecting...!",
+ text1: "Looking for server",
+ text2: "Connecting...",
),
),
);
@@ -70,6 +70,7 @@ class NoticeWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
direction: Axis.vertical,
children: [
+ Container(),
Flexible(
child: SizedBox(
height: 100,
@@ -77,15 +78,17 @@ class NoticeWidget extends StatelessWidget {
Image(image: AssetImage(assetImageName), fit: BoxFit.fitWidth),
),
),
- Flexible(
- child: Text(text1,
- style: const TextStyle(fontWeight: FontWeight.bold))),
- Flexible(
- child: Text(text2,
- style: const TextStyle(fontWeight: FontWeight.bold))),
+ Column(children: [
+ Text(text1,
+ style:
+ const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
+ SizedBox(height: 6),
+ Text(text2,
+ style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold))
+ ]),
Flexible(
child: Padding(
- padding: const EdgeInsets.fromLTRB(25, 0, 25, 20),
+ padding: const EdgeInsets.fromLTRB(35, 6, 35, 20),
child: LinearProgressIndicator(color: loadingColor ?? Colors.red),
),
)
@@ -100,17 +103,24 @@ class LoadingContainer extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(8.0),
- child: Center(
- child: Container(
- width: MediaQuery.of(context).size.width / 2,
- height: MediaQuery.of(context).size.height * 3 / 4,
- decoration: BoxDecoration(
- color: Colors.white, borderRadius: BorderRadius.circular(40)),
- child: child,
- ),
- ),
- );
+ return Row(children: [
+ Spacer(),
+ Column(children: [
+ Spacer(),
+ Center(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Container(
+ width: MediaQuery.of(context).size.width / 4,
+ height: MediaQuery.of(context).size.height / 5,
+ decoration: BoxDecoration(
+ color: Colors.white, borderRadius: BorderRadius.circular(20)),
+ child: child,
+ ),
+ )),
+ SizedBox(height: 32)
+ ]),
+ Spacer(),
+ ]);
}
}