mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
initialized Dashboard Page
This commit is contained in:
62
lib/features/dashboard/view/live_monitor_widget.dart
Normal file
62
lib/features/dashboard/view/live_monitor_widget.dart
Normal file
@ -0,0 +1,62 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
|
||||
class LiveMonitorWidget extends StatelessWidget {
|
||||
const LiveMonitorWidget({
|
||||
super.key,
|
||||
required this.image,
|
||||
required this.title,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
final String image;
|
||||
final String title;
|
||||
final String value;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
padding: const EdgeInsets.only(left: 10, top: 5, bottom: 5),
|
||||
margin: const EdgeInsets.only(right: 5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 23,
|
||||
width: 20,
|
||||
child: SvgPicture.asset(
|
||||
image,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BodySmall(
|
||||
text: title,
|
||||
style: const TextStyle(fontSize: 10, color: Colors.grey)),
|
||||
BodyMedium(
|
||||
text: value,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user