diff --git a/assets/icons/CO2.svg b/assets/icons/CO2.svg
new file mode 100644
index 0000000..09a2db6
--- /dev/null
+++ b/assets/icons/CO2.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/Devices-fill.png b/assets/icons/Devices-fill.png
deleted file mode 100644
index 9abef55..0000000
Binary files a/assets/icons/Devices-fill.png and /dev/null differ
diff --git a/assets/icons/Devices-fill.svg b/assets/icons/Devices-fill.svg
new file mode 100644
index 0000000..de6e9af
--- /dev/null
+++ b/assets/icons/Devices-fill.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/Devices.png b/assets/icons/Devices.png
deleted file mode 100644
index b8de335..0000000
Binary files a/assets/icons/Devices.png and /dev/null differ
diff --git a/assets/icons/Devices.svg b/assets/icons/Devices.svg
new file mode 100644
index 0000000..00904ad
--- /dev/null
+++ b/assets/icons/Devices.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/Layout-fill.png b/assets/icons/Layout-fill.png
deleted file mode 100644
index 30435d4..0000000
Binary files a/assets/icons/Layout-fill.png and /dev/null differ
diff --git a/assets/icons/Layout-fill.svg b/assets/icons/Layout-fill.svg
new file mode 100644
index 0000000..0e69648
--- /dev/null
+++ b/assets/icons/Layout-fill.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/Layout.png b/assets/icons/Layout.png
deleted file mode 100644
index 7a07715..0000000
Binary files a/assets/icons/Layout.png and /dev/null differ
diff --git a/assets/icons/Layout.svg b/assets/icons/Layout.svg
new file mode 100644
index 0000000..568b6d7
--- /dev/null
+++ b/assets/icons/Layout.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/Menu-fill.png b/assets/icons/Menu-fill.png
deleted file mode 100644
index 3f079b2..0000000
Binary files a/assets/icons/Menu-fill.png and /dev/null differ
diff --git a/assets/icons/Menu-fill.svg b/assets/icons/Menu-fill.svg
new file mode 100644
index 0000000..db5821c
--- /dev/null
+++ b/assets/icons/Menu-fill.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/Menu.png b/assets/icons/Menu.png
deleted file mode 100644
index 1379ff6..0000000
Binary files a/assets/icons/Menu.png and /dev/null differ
diff --git a/assets/icons/Menu.svg b/assets/icons/Menu.svg
new file mode 100644
index 0000000..072d3e9
--- /dev/null
+++ b/assets/icons/Menu.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/Routine-fill.svg b/assets/icons/Routine-fill.svg
new file mode 100644
index 0000000..99cbc5d
--- /dev/null
+++ b/assets/icons/Routine-fill.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/icons/Routines-fill.png b/assets/icons/Routines-fill.png
deleted file mode 100644
index 1df576e..0000000
Binary files a/assets/icons/Routines-fill.png and /dev/null differ
diff --git a/assets/icons/Routines.png b/assets/icons/Routines.png
deleted file mode 100644
index 8d80229..0000000
Binary files a/assets/icons/Routines.png and /dev/null differ
diff --git a/assets/icons/Routines.svg b/assets/icons/Routines.svg
new file mode 100644
index 0000000..adcf9b8
--- /dev/null
+++ b/assets/icons/Routines.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/Summer.svg b/assets/icons/Summer.svg
new file mode 100644
index 0000000..32a0c3c
--- /dev/null
+++ b/assets/icons/Summer.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/icons/Winter.svg b/assets/icons/Winter.svg
new file mode 100644
index 0000000..1494cc0
--- /dev/null
+++ b/assets/icons/Winter.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/active.svg b/assets/icons/active.svg
new file mode 100644
index 0000000..7ea03f0
--- /dev/null
+++ b/assets/icons/active.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/dashboard-fill.png b/assets/icons/dashboard-fill.png
deleted file mode 100644
index 7b18c46..0000000
Binary files a/assets/icons/dashboard-fill.png and /dev/null differ
diff --git a/assets/icons/dashboard-fill.svg b/assets/icons/dashboard-fill.svg
new file mode 100644
index 0000000..ed518e5
--- /dev/null
+++ b/assets/icons/dashboard-fill.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/dashboard.png b/assets/icons/dashboard.png
deleted file mode 100644
index 2a457b2..0000000
Binary files a/assets/icons/dashboard.png and /dev/null differ
diff --git a/assets/icons/dashboard.svg b/assets/icons/dashboard.svg
new file mode 100644
index 0000000..e112256
--- /dev/null
+++ b/assets/icons/dashboard.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/frequency.svg b/assets/icons/frequency.svg
new file mode 100644
index 0000000..3054ec7
--- /dev/null
+++ b/assets/icons/frequency.svg
@@ -0,0 +1,25 @@
+
diff --git a/assets/icons/home-2.svg b/assets/icons/home-2.svg
new file mode 100644
index 0000000..d700dde
--- /dev/null
+++ b/assets/icons/home-2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/home.svg b/assets/icons/home.svg
new file mode 100644
index 0000000..a0c2e64
--- /dev/null
+++ b/assets/icons/home.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/icons/sustainability.svg b/assets/icons/sustainability.svg
new file mode 100644
index 0000000..ce1ce44
--- /dev/null
+++ b/assets/icons/sustainability.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/volt-meter.svg b/assets/icons/volt-meter.svg
new file mode 100644
index 0000000..6691a7d
--- /dev/null
+++ b/assets/icons/volt-meter.svg
@@ -0,0 +1,26 @@
+
diff --git a/assets/images/Background.png b/assets/images/Background.png
new file mode 100644
index 0000000..02529ba
Binary files /dev/null and b/assets/images/Background.png differ
diff --git a/assets/images/test_dash.png b/assets/images/test_dash.png
new file mode 100644
index 0000000..efa07cf
Binary files /dev/null and b/assets/images/test_dash.png differ
diff --git a/assets/images/test_dash2.png b/assets/images/test_dash2.png
new file mode 100644
index 0000000..b4cfa2a
Binary files /dev/null and b/assets/images/test_dash2.png differ
diff --git a/devtools_options.yaml b/devtools_options.yaml
new file mode 100644
index 0000000..7e7e7f6
--- /dev/null
+++ b/devtools_options.yaml
@@ -0,0 +1 @@
+extensions:
diff --git a/lib/features/dashboard/view/carbon_emission.dart b/lib/features/dashboard/view/carbon_emission.dart
new file mode 100644
index 0000000..8691729
--- /dev/null
+++ b/lib/features/dashboard/view/carbon_emission.dart
@@ -0,0 +1,99 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:gap/gap.dart';
+import 'package:syncrow_app/features/dashboard/view/card_title.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
+import 'package:syncrow_app/features/shared_widgets/united_text.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
+
+class CarbonEmission extends StatelessWidget {
+ const CarbonEmission({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const CardTitle(
+ title: "Carbon Emission",
+ ),
+ const Gap(10),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox.square(
+ dimension: 30,
+ child: SvgPicture.asset(
+ IconsManager.CO2,
+ fit: BoxFit.contain,
+ ),
+ ),
+ const Gap(5),
+ const Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ BodySmall(
+ text: StringsManager.emissions,
+ ),
+ UnitedText(
+ value: '120.00',
+ valueSize: 14,
+ unit: 'kg',
+ unitSize: 10,
+ ),
+ ],
+ ),
+ ],
+ ),
+ const Gap(20),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox.square(
+ dimension: 30,
+ child: SvgPicture.asset(
+ IconsManager.sustainability,
+ fit: BoxFit.contain,
+ ),
+ ),
+ const Gap(5),
+ const Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ BodySmall(
+ text: StringsManager.reductions,
+ ),
+ UnitedText(
+ value: '20.00',
+ valueSize: 14,
+ unit: 'kg',
+ unitSize: 10,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/card_title.dart b/lib/features/dashboard/view/card_title.dart
new file mode 100644
index 0000000..123a4b0
--- /dev/null
+++ b/lib/features/dashboard/view/card_title.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
+
+class CardTitle extends StatelessWidget {
+ const CardTitle({
+ super.key,
+ required this.title,
+ });
+
+ final String title;
+
+ @override
+ Widget build(BuildContext context) {
+ return BodySmall(
+ text: title,
+ fontColor: Colors.grey,
+ fontSize: 12,
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/consumption.dart b/lib/features/dashboard/view/consumption.dart
new file mode 100644
index 0000000..fafba8a
--- /dev/null
+++ b/lib/features/dashboard/view/consumption.dart
@@ -0,0 +1,65 @@
+import 'package:flutter/material.dart';
+import 'package:gap/gap.dart';
+import 'package:syncrow_app/features/dashboard/view/card_title.dart';
+import 'package:syncrow_app/features/shared_widgets/united_text.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
+
+class Consumption extends StatelessWidget {
+ const Consumption({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ const Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ CardTitle(
+ title: StringsManager.ACConsumption,
+ ),
+ Gap(10),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ UnitedText(
+ value: "2",
+ valueSize: 35,
+ valueWeight: FontWeight.normal,
+ unit: "Units",
+ ),
+ Gap(30),
+ UnitedText(
+ value: "720",
+ valueSize: 35,
+ valueWeight: FontWeight.normal,
+ unit: "kWh",
+ ),
+ ],
+ ),
+ ],
+ ),
+ //TODO: Replace with actual pie chart
+ SizedBox.square(
+ dimension: 60,
+ child: Image.asset(
+ ImageManager.testDash2,
+ fit: BoxFit.contain,
+ ),
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/dashboard_view.dart b/lib/features/dashboard/view/dashboard_view.dart
index 9c132b1..8d76c60 100644
--- a/lib/features/dashboard/view/dashboard_view.dart
+++ b/lib/features/dashboard/view/dashboard_view.dart
@@ -1,10 +1,49 @@
import 'package:flutter/material.dart';
+import 'package:gap/gap.dart';
+import 'package:syncrow_app/features/dashboard/view/carbon_emission.dart';
+import 'package:syncrow_app/features/dashboard/view/consumption.dart';
+import 'package:syncrow_app/features/dashboard/view/live_monitor_tab.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
+import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
+
+import 'energy_usage.dart';
class DashboardView extends StatelessWidget {
const DashboardView({super.key});
@override
Widget build(BuildContext context) {
- return const Placeholder();
+ return const Padding(
+ padding: EdgeInsets.only(top: 60, right: 15, left: 15, bottom: 100),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ TitleMedium(
+ text: StringsManager.dashboard,
+ style: TextStyle(
+ fontSize: 32,
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ LiveMonitorTab(),
+ Gap(10),
+ EnergyUsage(),
+ Expanded(
+ child: Padding(
+ padding: EdgeInsets.only(top: 20),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Consumption(),
+ Gap(20),
+ CarbonEmission(),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
}
}
diff --git a/lib/features/dashboard/view/energy_usage.dart b/lib/features/dashboard/view/energy_usage.dart
new file mode 100644
index 0000000..d05edf8
--- /dev/null
+++ b/lib/features/dashboard/view/energy_usage.dart
@@ -0,0 +1,34 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/dashboard/view/energy_usage_header.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+
+class EnergyUsage extends StatelessWidget {
+ const EnergyUsage({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Expanded(
+ child: DecoratedBox(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const EnergyUsageHeader(),
+ Expanded(
+ child: Image.asset(ImageManager.testDash),
+ )
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/energy_usage_header.dart b/lib/features/dashboard/view/energy_usage_header.dart
new file mode 100644
index 0000000..05585da
--- /dev/null
+++ b/lib/features/dashboard/view/energy_usage_header.dart
@@ -0,0 +1,74 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/dashboard/view/card_title.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
+import 'package:syncrow_app/features/shared_widgets/united_text.dart';
+import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
+
+class EnergyUsageHeader extends StatelessWidget {
+ const EnergyUsageHeader({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return const Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ CardTitle(
+ title: StringsManager.energyUsage,
+ ),
+ Padding(
+ padding: EdgeInsets.only(top: 10),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ BodySmall(
+ text: StringsManager.totalConsumption,
+ ),
+ BodySmall(
+ text: "JAN 2024",
+ fontSize: 12,
+ fontColor: Colors.grey,
+ ),
+ ],
+ ),
+ Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ UnitedText(
+ value: "1200.00",
+ valueStyle: TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ height: 0,
+ ),
+ unit: "kWh",
+ ),
+ UnitedText(
+ value: "430",
+ valueStyle: TextStyle(
+ fontSize: 14,
+ color: Colors.grey,
+ ),
+ unit: "AED",
+ unitStyle: TextStyle(
+ fontSize: 12,
+ color: Colors.grey,
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ )
+ ],
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/live_monitor_tab.dart b/lib/features/dashboard/view/live_monitor_tab.dart
new file mode 100644
index 0000000..71b8ede
--- /dev/null
+++ b/lib/features/dashboard/view/live_monitor_tab.dart
@@ -0,0 +1,39 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/dashboard/view/live_monitor_widget.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
+
+class LiveMonitorTab extends StatelessWidget {
+ const LiveMonitorTab({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return const Row(
+ children: [
+ Expanded(
+ child: LiveMonitorWidget(
+ image: IconsManager.active,
+ title: StringsManager.active,
+ value: '10.00w',
+ ),
+ ),
+ Expanded(
+ child: LiveMonitorWidget(
+ image: IconsManager.voltMeter,
+ title: StringsManager.current,
+ value: '12.1 A',
+ ),
+ ),
+ Expanded(
+ child: LiveMonitorWidget(
+ image: IconsManager.frequency,
+ title: StringsManager.frequency,
+ value: '50 Hz',
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/features/dashboard/view/live_monitor_widget.dart b/lib/features/dashboard/view/live_monitor_widget.dart
new file mode 100644
index 0000000..d670232
--- /dev/null
+++ b/lib/features/dashboard/view/live_monitor_widget.dart
@@ -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,
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/features/devices/bloc/devices_cubit.dart b/lib/features/devices/bloc/devices_cubit.dart
new file mode 100644
index 0000000..8062933
--- /dev/null
+++ b/lib/features/devices/bloc/devices_cubit.dart
@@ -0,0 +1,25 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+
+import '../model/device_model.dart';
+
+part 'devices_state.dart';
+
+class DevicesCubit extends Cubit {
+ DevicesCubit() : super(DevicesInitial()) {
+ getDevices();
+ }
+
+ //TODO separate the navigation logic to another cubit
+ static DevicesCubit get(context) => BlocProvider.of(context);
+
+ var devices = [];
+
+ Future> getDevices() async {
+ emit(DevicesLoading());
+ await Future.delayed(const Duration(seconds: 2));
+ emit(DevicesSuccess());
+
+ return devices = [];
+ }
+}
diff --git a/lib/features/devices/bloc/devices_state.dart b/lib/features/devices/bloc/devices_state.dart
new file mode 100644
index 0000000..25bb4f3
--- /dev/null
+++ b/lib/features/devices/bloc/devices_state.dart
@@ -0,0 +1,14 @@
+part of 'devices_cubit.dart';
+
+@immutable
+abstract class DevicesState {}
+
+class DevicesInitial extends DevicesState {}
+
+class DevicesLoading extends DevicesState {}
+
+class DevicesSuccess extends DevicesState {}
+
+class DevicesFailure extends DevicesState {}
+
+class ChangeIndex extends DevicesState {}
diff --git a/lib/features/home/model/device_model.dart b/lib/features/devices/model/device_model.dart
similarity index 100%
rename from lib/features/home/model/device_model.dart
rename to lib/features/devices/model/device_model.dart
diff --git a/lib/features/devices/view/devices_view.dart b/lib/features/devices/view/devices_view.dart
new file mode 100644
index 0000000..e46862d
--- /dev/null
+++ b/lib/features/devices/view/devices_view.dart
@@ -0,0 +1,18 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
+import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
+
+class DevicesView extends StatelessWidget {
+ const DevicesView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocProvider(
+ create: (context) => DevicesCubit(),
+ child: BlocBuilder(
+ builder: (context, state) => const DevicesViewBody(),
+ ),
+ );
+ }
+}
diff --git a/lib/features/devices/view/widgets/devices_view_body.dart b/lib/features/devices/view/widgets/devices_view_body.dart
new file mode 100644
index 0000000..06fb86e
--- /dev/null
+++ b/lib/features/devices/view/widgets/devices_view_body.dart
@@ -0,0 +1,24 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+
+import '../../bloc/devices_cubit.dart';
+import 'no_devices_view.dart';
+
+class DevicesViewBody extends StatelessWidget {
+ const DevicesViewBody({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocProvider(
+ create: (context) => DevicesCubit(),
+ child: BlocBuilder(
+ builder: (context, state) {
+ return DevicesCubit.get(context).devices.isEmpty
+ ? const NoDevicesView()
+ : const SizedBox();
+ },
+ ));
+ }
+}
diff --git a/lib/features/home/view/widgets/home_view_no_devices.dart b/lib/features/devices/view/widgets/no_devices_view.dart
similarity index 92%
rename from lib/features/home/view/widgets/home_view_no_devices.dart
rename to lib/features/devices/view/widgets/no_devices_view.dart
index b597f4c..0646bf2 100644
--- a/lib/features/home/view/widgets/home_view_no_devices.dart
+++ b/lib/features/devices/view/widgets/no_devices_view.dart
@@ -3,8 +3,8 @@ import 'package:gap/gap.dart';
import 'package:syncrow_app/features/shared_widgets/default_text_button.dart';
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
-class HomeViewNoDevices extends StatelessWidget {
- const HomeViewNoDevices({
+class NoDevicesView extends StatelessWidget {
+ const NoDevicesView({
super.key,
});
diff --git a/lib/features/home/bloc/home_cubit.dart b/lib/features/home/bloc/home_cubit.dart
deleted file mode 100644
index 0d08783..0000000
--- a/lib/features/home/bloc/home_cubit.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-
-import '../../profile/view/profile_view.dart';
-import '../../scene/view/scene_view.dart';
-import '../../smart/view/smart_view.dart';
-import '../model/device_model.dart';
-import '../view/widgets/home_view_body.dart';
-
-part 'home_state.dart';
-
-class HomeCubit extends Cubit {
- HomeCubit() : super(HomeInitial()) {
- getDevices();
- }
-
- //TODO separate the navigation logic to another cubit
- static HomeCubit get(context) => BlocProvider.of(context);
-
- static int pageIndex = 0;
-
- var devices = [];
-
- Future> getDevices() async {
- emit(HomeLoading());
- await Future.delayed(const Duration(seconds: 2));
- emit(HomeSuccess());
-
- return devices = [];
- }
-
- Map> appBarActions = {
- 'Home': [
- IconButton(
- icon: const Icon(Icons.mic),
- onPressed: () {},
- ),
- IconButton(
- icon: const Icon(Icons.add_circle),
- onPressed: () {},
- ),
- ],
- 'Scene': [],
- 'Smart': [],
- 'Profile': [],
- };
-
- var bottomNavItems = [
- const BottomNavigationBarItem(
- icon: Icon(Icons.home_outlined),
- label: 'Home',
- ),
- const BottomNavigationBarItem(
- icon: Icon(Icons.check_box_outlined),
- label: 'Scene',
- ),
- const BottomNavigationBarItem(
- icon: Icon(Icons.view_in_ar),
- label: 'Smart',
- ),
- const BottomNavigationBarItem(
- icon: Icon(Icons.account_circle),
- label: 'Profile',
- ),
- ];
-
- final List pages = [
- const HomeViewBody(),
- const SceneView(),
- const SmartPage(),
- const ProfileView(),
- ];
-
- static Widget get currentPage => HomeCubit().pages[pageIndex];
-
- void updatePageIndex(int index, BuildContext context) {
- emit(HomeChangeIndex());
- pageIndex = index;
- }
-}
diff --git a/lib/features/home/bloc/home_state.dart b/lib/features/home/bloc/home_state.dart
deleted file mode 100644
index fe73ce7..0000000
--- a/lib/features/home/bloc/home_state.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-part of 'home_cubit.dart';
-
-@immutable
-abstract class HomeState {}
-
-class HomeInitial extends HomeState {}
-
-class HomeLoading extends HomeState {}
-
-class HomeSuccess extends HomeState {}
-
-class HomeFailure extends HomeState {}
-
-class HomeChangeIndex extends HomeState {}
diff --git a/lib/features/home/view/home_view.dart b/lib/features/home/view/home_view.dart
deleted file mode 100644
index 6e565df..0000000
--- a/lib/features/home/view/home_view.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:syncrow_app/features/home/bloc/home_cubit.dart';
-
-import '../../shared_widgets/default_app_bar.dart';
-import '../../shared_widgets/default_nav_bar.dart';
-
-class HomeView extends StatelessWidget {
- const HomeView({super.key});
-
- @override
- Widget build(BuildContext context) {
- return BlocProvider(
- create: (context) => HomeCubit(),
- child: BlocBuilder(
- builder: (context, state) {
- return Scaffold(
- appBar: const DefaultAppBar(),
- body: state is HomeLoading
- ? const Center(child: CircularProgressIndicator())
- : HomeCubit.currentPage,
- bottomNavigationBar: const DefaultNavBar(),
- );
- },
- ),
- );
- }
-}
diff --git a/lib/features/home/view/widgets/home_view_body.dart b/lib/features/home/view/widgets/home_view_body.dart
deleted file mode 100644
index 83f7eea..0000000
--- a/lib/features/home/view/widgets/home_view_body.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:syncrow_app/features/home/bloc/home_cubit.dart';
-
-import 'home_view_no_devices.dart';
-
-class HomeViewBody extends StatelessWidget {
- const HomeViewBody({
- super.key,
- });
-
- @override
- Widget build(BuildContext context) {
- return BlocProvider(
- create: (context) => HomeCubit(),
- child: BlocBuilder(
- builder: (context, state) {
- return HomeCubit.get(context).devices.isEmpty
- ? const HomeViewNoDevices()
- : const SizedBox();
- },
- ));
- }
-}
diff --git a/lib/features/layout/bloc/layout_cubit.dart b/lib/features/layout/bloc/layout_cubit.dart
new file mode 100644
index 0000000..5285190
--- /dev/null
+++ b/lib/features/layout/bloc/layout_cubit.dart
@@ -0,0 +1,8 @@
+import 'package:bloc/bloc.dart';
+import 'package:meta/meta.dart';
+
+part 'layout_state.dart';
+
+class LayoutCubit extends Cubit {
+ LayoutCubit() : super(LayoutInitial());
+}
diff --git a/lib/features/layout/bloc/layout_state.dart b/lib/features/layout/bloc/layout_state.dart
new file mode 100644
index 0000000..d09b4e0
--- /dev/null
+++ b/lib/features/layout/bloc/layout_state.dart
@@ -0,0 +1,6 @@
+part of 'layout_cubit.dart';
+
+@immutable
+abstract class LayoutState {}
+
+class LayoutInitial extends LayoutState {}
diff --git a/lib/features/layout/view/layout_view.dart b/lib/features/layout/view/layout_view.dart
new file mode 100644
index 0000000..eac9dd1
--- /dev/null
+++ b/lib/features/layout/view/layout_view.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/layout/bloc/layout_cubit.dart';
+
+class LayoutPage extends StatelessWidget {
+ const LayoutPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocProvider(
+ create: (context) => LayoutCubit(),
+ child: BlocBuilder(
+ builder: (context, state) {
+ return const Center(
+ child: Text('Layout Page'),
+ );
+ },
+ ));
+ }
+}
diff --git a/lib/features/menu/bloc/menu_cubit.dart b/lib/features/menu/bloc/menu_cubit.dart
new file mode 100644
index 0000000..45b937b
--- /dev/null
+++ b/lib/features/menu/bloc/menu_cubit.dart
@@ -0,0 +1,8 @@
+import 'package:bloc/bloc.dart';
+import 'package:meta/meta.dart';
+
+part 'menu_state.dart';
+
+class MenuCubit extends Cubit {
+ MenuCubit() : super(MenuInitial());
+}
diff --git a/lib/features/menu/bloc/menu_state.dart b/lib/features/menu/bloc/menu_state.dart
new file mode 100644
index 0000000..b1b5cd9
--- /dev/null
+++ b/lib/features/menu/bloc/menu_state.dart
@@ -0,0 +1,6 @@
+part of 'menu_cubit.dart';
+
+@immutable
+abstract class MenuState {}
+
+class MenuInitial extends MenuState {}
diff --git a/lib/features/menu/view/menu_view.dart b/lib/features/menu/view/menu_view.dart
new file mode 100644
index 0000000..e650c6e
--- /dev/null
+++ b/lib/features/menu/view/menu_view.dart
@@ -0,0 +1,12 @@
+import 'package:flutter/material.dart';
+
+class MenuView extends StatelessWidget {
+ const MenuView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const Center(
+ child: Text('Menu View'),
+ );
+ }
+}
diff --git a/lib/features/navigation/bloc/nav_cubit.dart b/lib/features/navigation/bloc/nav_cubit.dart
new file mode 100644
index 0000000..79ac46e
--- /dev/null
+++ b/lib/features/navigation/bloc/nav_cubit.dart
@@ -0,0 +1,66 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart';
+import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
+import 'package:syncrow_app/features/layout/view/layout_view.dart';
+import 'package:syncrow_app/features/profile/view/profile_view.dart';
+import 'package:syncrow_app/features/scene/view/scene_view.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
+
+part 'nav_state.dart';
+
+class NavCubit extends Cubit {
+ NavCubit() : super(NavInitial());
+
+ static NavCubit of(context) => BlocProvider.of(context);
+ static int pageIndex = 0;
+
+ int get getPageIndex => pageIndex;
+
+ Map> appBarActions = {
+ 'Home': [],
+ 'Scene': [],
+ 'Smart': [],
+ 'Profile': [],
+ };
+
+ var bottomNavItems = [
+ defaultBottomNavBarItem(icon: IconsManager.dashboard, label: 'Dashboard'),
+ defaultBottomNavBarItem(icon: IconsManager.layout, label: 'Layout'),
+ defaultBottomNavBarItem(icon: IconsManager.devices, label: 'Devices'),
+ defaultBottomNavBarItem(icon: IconsManager.routine, label: 'Routine'),
+ defaultBottomNavBarItem(icon: IconsManager.menu, label: 'Menu'),
+ ];
+
+ final List pages = [
+ const DashboardView(),
+ const LayoutPage(),
+ const DevicesViewBody(),
+ const SceneView(),
+ const ProfileView(),
+ ];
+
+ Widget get currentPage => NavCubit().pages[pageIndex];
+
+ void updatePageIndex(int index, BuildContext context) {
+ emit(NavChangePage());
+ pageIndex = index;
+ }
+}
+
+BottomNavigationBarItem defaultBottomNavBarItem(
+ {required String icon, required String label}) {
+ return BottomNavigationBarItem(
+ icon: SvgPicture.asset(icon),
+ activeIcon: SvgPicture.asset(
+ icon.replaceAll('.svg', '-fill.svg'),
+ colorFilter: const ColorFilter.mode(
+ ColorsManager.primaryColor,
+ BlendMode.srcIn,
+ ),
+ ),
+ label: label,
+ );
+}
diff --git a/lib/features/navigation/bloc/nav_state.dart b/lib/features/navigation/bloc/nav_state.dart
new file mode 100644
index 0000000..558ef39
--- /dev/null
+++ b/lib/features/navigation/bloc/nav_state.dart
@@ -0,0 +1,7 @@
+part of 'nav_cubit.dart';
+
+abstract class NavState {}
+
+class NavInitial extends NavState {}
+
+class NavChangePage extends NavState {}
diff --git a/lib/features/navigation/view/navigation_view.dart b/lib/features/navigation/view/navigation_view.dart
new file mode 100644
index 0000000..661b44f
--- /dev/null
+++ b/lib/features/navigation/view/navigation_view.dart
@@ -0,0 +1,36 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
+import 'package:syncrow_app/features/navigation/view/widgets/app_body.dart';
+import 'package:syncrow_app/features/navigation/view/widgets/default_app_bar.dart';
+import 'package:syncrow_app/features/navigation/view/widgets/default_nav_bar.dart';
+import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
+
+class NavigationView extends StatelessWidget {
+ const NavigationView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (context, state) {
+ return AnnotatedRegion(
+ value: SystemUiOverlayStyle(
+ statusBarColor: ColorsManager.primaryColor.withOpacity(0.5),
+ statusBarIconBrightness: Brightness.light,
+ ),
+ child: const SafeArea(
+ child: Scaffold(
+ backgroundColor: ColorsManager.backgroundColor,
+ extendBodyBehindAppBar: true,
+ extendBody: true,
+ appBar: DefaultAppBar(),
+ body: AppBody(),
+ bottomNavigationBar: DefaultNavBar(),
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
diff --git a/lib/features/navigation/view/widgets/app_bar_home_dropdown.dart b/lib/features/navigation/view/widgets/app_bar_home_dropdown.dart
new file mode 100644
index 0000000..e5c622c
--- /dev/null
+++ b/lib/features/navigation/view/widgets/app_bar_home_dropdown.dart
@@ -0,0 +1,40 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:gap/gap.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+
+import '../../../shared_widgets/text_widgets/body_large.dart';
+
+class AppBarHomeDropdown extends StatelessWidget {
+ const AppBarHomeDropdown({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return TextButton(
+ onPressed: () {},
+ child: SizedBox(
+ width: 150,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SvgPicture.asset(
+ IconsManager.home,
+ width: 30,
+ height: 30,
+ ),
+ const Gap(5),
+ const BodyLarge(text: 'Home'),
+ const Gap(5),
+ const Icon(
+ Icons.expand_more,
+ color: Colors.black,
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/features/navigation/view/widgets/app_body.dart b/lib/features/navigation/view/widgets/app_body.dart
new file mode 100644
index 0000000..a700fe2
--- /dev/null
+++ b/lib/features/navigation/view/widgets/app_body.dart
@@ -0,0 +1,32 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
+import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
+
+class AppBody extends StatelessWidget {
+ const AppBody({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (context, state) {
+ return Container(
+ width: MediaQuery.sizeOf(context).width,
+ height: MediaQuery.sizeOf(context).height,
+ decoration: const BoxDecoration(
+ image: DecorationImage(
+ image: AssetImage(
+ ImageManager.background,
+ ),
+ fit: BoxFit.cover,
+ opacity: 0.4,
+ ),
+ ),
+ child: NavCubit.of(context).currentPage,
+ );
+ },
+ );
+ }
+}
diff --git a/lib/features/navigation/view/widgets/default_app_bar.dart b/lib/features/navigation/view/widgets/default_app_bar.dart
new file mode 100644
index 0000000..f4a3d2b
--- /dev/null
+++ b/lib/features/navigation/view/widgets/default_app_bar.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
+import 'package:syncrow_app/features/navigation/view/widgets/app_bar_home_dropdown.dart';
+
+class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
+ const DefaultAppBar({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (context, state) {
+ return Padding(
+ padding: const EdgeInsets.only(
+ top: 20,
+ ),
+ child: AppBar(
+ backgroundColor: Colors.transparent,
+ leadingWidth: 150,
+ leading: const AppBarHomeDropdown(),
+ actions: [
+ IconButton(
+ icon: const Icon(
+ Icons.add,
+ size: 35,
+ ),
+ onPressed: () {},
+ ),
+ ],
+ ),
+ );
+ },
+ );
+ }
+
+ @override
+ Size get preferredSize => const Size.fromHeight(100);
+}
diff --git a/lib/features/navigation/view/widgets/default_nav_bar.dart b/lib/features/navigation/view/widgets/default_nav_bar.dart
new file mode 100644
index 0000000..57fef54
--- /dev/null
+++ b/lib/features/navigation/view/widgets/default_nav_bar.dart
@@ -0,0 +1,41 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
+import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
+
+class DefaultNavBar extends StatelessWidget {
+ const DefaultNavBar({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (context, state) {
+ var cubit = NavCubit.of(context);
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 27),
+ child: BottomNavigationBar(
+ backgroundColor: Colors.transparent,
+ onTap: (int index) => cubit.updatePageIndex(index, context),
+ currentIndex: cubit.getPageIndex,
+ selectedItemColor: ColorsManager.primaryColor,
+ selectedLabelStyle: const TextStyle(
+ color: ColorsManager.primaryColor,
+ fontSize: 10,
+ ),
+ showUnselectedLabels: true,
+ unselectedItemColor: Colors.grey,
+ type: BottomNavigationBarType.fixed,
+ elevation: 0,
+ items: cubit.bottomNavItems,
+ ),
+ );
+ },
+ );
+ }
+}
+
+class DefaultBottomNavBarItem extends BottomNavigationBarItem {
+ DefaultBottomNavBarItem({required super.icon});
+}
diff --git a/lib/features/shared_widgets/default_app_bar.dart b/lib/features/shared_widgets/default_app_bar.dart
deleted file mode 100644
index 518f82a..0000000
--- a/lib/features/shared_widgets/default_app_bar.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:syncrow_app/features/home/bloc/home_cubit.dart';
-import 'package:syncrow_app/features/shared_widgets/syncrow_logo.dart';
-import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
-
-class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
- const DefaultAppBar({super.key});
-
- @override
- Widget build(BuildContext context) {
- return BlocBuilder(
- builder: (context, state) {
- return AppBar(
- title: const SyncrowLogo(),
- actions: [
- IconButton(
- icon: const Icon(Icons.mic),
- onPressed: () {},
- ),
- IconButton(
- icon: const Icon(Icons.add_circle,
- color: ColorsManager.primaryColor),
- onPressed: () {},
- ),
- ],
- );
- },
- );
- }
-
- @override
- Size get preferredSize => const Size.fromHeight(50);
-}
diff --git a/lib/features/shared_widgets/default_nav_bar.dart b/lib/features/shared_widgets/default_nav_bar.dart
deleted file mode 100644
index 8d3068f..0000000
--- a/lib/features/shared_widgets/default_nav_bar.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:syncrow_app/features/home/bloc/home_cubit.dart';
-import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
-
-class DefaultNavBar extends StatelessWidget {
- const DefaultNavBar({
- super.key,
- });
-
- @override
- Widget build(BuildContext context) {
- return BlocBuilder(
- builder: (context, state) {
- return BottomNavigationBar(
- onTap: (int index) =>
- HomeCubit.get(context).updatePageIndex(index, context),
- currentIndex: HomeCubit.pageIndex,
- selectedItemColor: ColorsManager.primaryColor,
- selectedLabelStyle: const TextStyle(
- color: ColorsManager.primaryColor,
- ),
- unselectedItemColor: Colors.grey,
- elevation: 10,
- items: HomeCubit.get(context).bottomNavItems,
- );
- },
- );
- }
-}
-
-class DefaultBottomNavBarItem extends BottomNavigationBarItem {
- DefaultBottomNavBarItem({required super.icon});
-}
diff --git a/lib/features/shared_widgets/text_widgets/body_large.dart b/lib/features/shared_widgets/text_widgets/body_large.dart
new file mode 100644
index 0000000..471dbbb
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/body_large.dart
@@ -0,0 +1,28 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+import 'custom_text_widget.dart';
+
+class BodyLarge extends StatelessWidget {
+ const BodyLarge({
+ required this.text,
+ super.key,
+ this.textAlign,
+ this.style,
+ this.height,
+ });
+
+ final String text;
+ final TextAlign? textAlign;
+
+ final TextStyle? style;
+
+ final double? height;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? context.bodyLarge.copyWith(height: height ?? 1.5),
+ textAlign: textAlign,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/body_medium.dart b/lib/features/shared_widgets/text_widgets/body_medium.dart
new file mode 100644
index 0000000..ae7fdc7
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/body_medium.dart
@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+class BodyMedium extends StatelessWidget {
+ const BodyMedium({
+ required this.text,
+ super.key,
+ this.style,
+ this.maxLines,
+ this.overflow,
+ this.textAlign,
+ });
+
+ final String text;
+ final TextStyle? style;
+ final int? maxLines;
+ final TextOverflow? overflow;
+
+ final TextAlign? textAlign;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? context.bodyMedium,
+ // softWrap: true,
+ maxLines: maxLines,
+ // overflow: overflow,
+ textAlign: textAlign,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/body_small.dart b/lib/features/shared_widgets/text_widgets/body_small.dart
new file mode 100644
index 0000000..2cf842d
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/body_small.dart
@@ -0,0 +1,28 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+class BodySmall extends StatelessWidget {
+ const BodySmall({
+ required this.text,
+ super.key,
+ this.style,
+ this.fontColor,
+ this.fontSize,
+ });
+
+ final String text;
+ final TextStyle? style;
+
+ final Color? fontColor;
+
+ final double? fontSize;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? context.bodySmall,
+ fontColor: fontColor,
+ fontSize: fontSize,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/custom_text_widget.dart b/lib/features/shared_widgets/text_widgets/custom_text_widget.dart
new file mode 100644
index 0000000..2d886f0
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/custom_text_widget.dart
@@ -0,0 +1,42 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
+
+class CustomText extends StatelessWidget {
+ const CustomText(this.text,
+ {super.key,
+ this.style,
+ this.textAlign,
+ this.onTap,
+ this.minLines,
+ this.maxLines,
+ this.textDirection,
+ this.fontSize,
+ this.fontColor});
+
+ final String text;
+ final TextStyle? style;
+ final TextAlign? textAlign;
+ final Function()? onTap;
+ final int? minLines;
+ final int? maxLines;
+ final TextDirection? textDirection;
+
+ final double? fontSize;
+ final Color? fontColor;
+
+ @override
+ Widget build(BuildContext context) {
+ return SelectableText(
+ text,
+ style: style!.copyWith(
+ fontSize: fontSize,
+ color: fontColor ?? ColorsManager.textPrimaryColor,
+ ),
+ textAlign: textAlign,
+ onTap: onTap,
+ minLines: minLines,
+ maxLines: maxLines,
+ textDirection: textDirection,
+ );
+ }
+}
diff --git a/lib/features/shared_widgets/text_widgets/display_large.dart b/lib/features/shared_widgets/text_widgets/display_large.dart
new file mode 100644
index 0000000..3bd9888
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/display_large.dart
@@ -0,0 +1,24 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
+
+class DisplayLarge extends StatelessWidget {
+ const DisplayLarge({
+ required this.text,
+ super.key,
+ this.style,
+ this.textAlign,
+ });
+
+ final String text;
+ final TextStyle? style;
+
+ final TextAlign? textAlign;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? Theme.of(context).textTheme.displayLarge,
+ textAlign: textAlign,
+ // softWrap: true,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/display_medium.dart b/lib/features/shared_widgets/text_widgets/display_medium.dart
new file mode 100644
index 0000000..2561dc3
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/display_medium.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/material.dart';
+
+import 'custom_text_widget.dart';
+
+class DisplayMedium extends StatelessWidget {
+ const DisplayMedium({
+ required this.text,
+ super.key,
+ this.style,
+ });
+
+ final String text;
+ final TextStyle? style;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? Theme.of(context).textTheme.displayMedium,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/display_small.dart b/lib/features/shared_widgets/text_widgets/display_small.dart
new file mode 100644
index 0000000..f94d0e4
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/display_small.dart
@@ -0,0 +1,25 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+import 'custom_text_widget.dart';
+
+class DisplaySmall extends StatelessWidget {
+ const DisplaySmall({
+ required this.text,
+ super.key,
+ this.textAlign,
+ });
+
+ final String text;
+ final TextAlign? textAlign;
+
+ @override
+ Widget build(BuildContext context) => Padding(
+ padding: const EdgeInsets.only(bottom: 20),
+ child: CustomText(
+ text,
+ style: context.displaySmall,
+ textAlign: textAlign,
+ ),
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/title_large.dart b/lib/features/shared_widgets/text_widgets/title_large.dart
new file mode 100644
index 0000000..8edba90
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/title_large.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+class TitleLarge extends StatelessWidget {
+ const TitleLarge({
+ required this.text,
+ super.key,
+ });
+
+ final String text;
+
+ @override
+ Widget build(BuildContext context) => Padding(
+ padding: const EdgeInsets.only(top: 20, bottom: 10),
+ child: SelectableText(
+ text,
+ style: context.titleLarge,
+ ),
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/title_medium.dart b/lib/features/shared_widgets/text_widgets/title_medium.dart
new file mode 100644
index 0000000..4a26916
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/title_medium.dart
@@ -0,0 +1,28 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+import 'custom_text_widget.dart';
+
+class TitleMedium extends StatelessWidget {
+ const TitleMedium({
+ required this.text,
+ super.key,
+ this.maxLines,
+ this.textAlign,
+ this.style,
+ });
+
+ final String text;
+ final int? maxLines;
+ final TextAlign? textAlign;
+
+ final TextStyle? style;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? context.titleMedium,
+ maxLines: maxLines,
+ textAlign: textAlign,
+ );
+}
diff --git a/lib/features/shared_widgets/text_widgets/title_small.dart b/lib/features/shared_widgets/text_widgets/title_small.dart
new file mode 100644
index 0000000..73a5f85
--- /dev/null
+++ b/lib/features/shared_widgets/text_widgets/title_small.dart
@@ -0,0 +1,24 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/utils/context_extension.dart';
+
+import 'custom_text_widget.dart';
+
+class TitleSmall extends StatelessWidget {
+ const TitleSmall({
+ required this.text,
+ super.key,
+ this.style,
+ this.textAlign,
+ });
+
+ final String text;
+ final TextStyle? style;
+ final TextAlign? textAlign;
+
+ @override
+ Widget build(BuildContext context) => CustomText(
+ text,
+ style: style ?? context.titleSmall,
+ textAlign: textAlign,
+ );
+}
diff --git a/lib/features/shared_widgets/united_text.dart b/lib/features/shared_widgets/united_text.dart
new file mode 100644
index 0000000..461d146
--- /dev/null
+++ b/lib/features/shared_widgets/united_text.dart
@@ -0,0 +1,63 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
+import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
+
+class UnitedText extends StatelessWidget {
+ const UnitedText({
+ super.key,
+ required this.value,
+ required this.unit,
+ this.valueStyle,
+ this.unitStyle,
+ this.valueSize,
+ this.valueWeight,
+ this.valueColor,
+ this.unitSize,
+ this.unitWeight,
+ this.unitColor,
+ });
+
+ final String value;
+
+ final TextStyle? valueStyle;
+ final double? valueSize;
+ final FontWeight? valueWeight;
+
+ final Color? valueColor;
+ final String unit;
+
+ final TextStyle? unitStyle;
+ final double? unitSize;
+ final FontWeight? unitWeight;
+ final Color? unitColor;
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ crossAxisAlignment: CrossAxisAlignment.baseline,
+ textBaseline: TextBaseline.alphabetic,
+ children: [
+ BodyLarge(
+ text: value,
+ style: valueStyle ??
+ TextStyle(
+ fontSize: valueSize ?? 20,
+ fontWeight: valueWeight ?? FontWeight.bold,
+ color: valueColor,
+ height: 0,
+ ),
+ ),
+ BodySmall(
+ text: unit,
+ style: unitStyle ??
+ TextStyle(
+ fontSize: unitSize ?? 10,
+ fontWeight: unitWeight,
+ color: unitColor,
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/features/smart/bloc/smart_cubit.dart b/lib/features/smart/bloc/smart_cubit.dart
deleted file mode 100644
index 272b6bf..0000000
--- a/lib/features/smart/bloc/smart_cubit.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-import 'package:bloc/bloc.dart';
-import 'package:meta/meta.dart';
-
-part 'smart_state.dart';
-
-class SmartCubit extends Cubit {
- SmartCubit() : super(SmartInitial());
-}
diff --git a/lib/features/smart/bloc/smart_state.dart b/lib/features/smart/bloc/smart_state.dart
deleted file mode 100644
index 612fcf6..0000000
--- a/lib/features/smart/bloc/smart_state.dart
+++ /dev/null
@@ -1,6 +0,0 @@
-part of 'smart_cubit.dart';
-
-@immutable
-abstract class SmartState {}
-
-class SmartInitial extends SmartState {}
diff --git a/lib/features/smart/view/smart_view.dart b/lib/features/smart/view/smart_view.dart
deleted file mode 100644
index 039126a..0000000
--- a/lib/features/smart/view/smart_view.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:syncrow_app/features/smart/bloc/smart_cubit.dart';
-
-class SmartPage extends StatelessWidget {
- const SmartPage({super.key});
-
- @override
- Widget build(BuildContext context) {
- return BlocProvider(
- create: (context) => SmartCubit(),
- child: BlocBuilder(
- builder: (context, state) {
- return const Center(
- child: Text('Smart Page'),
- );
- },
- ));
- }
-}
diff --git a/lib/features/splash/view/splash_view.dart b/lib/features/splash/view/splash_view.dart
index 02c118d..d3e1dab 100644
--- a/lib/features/splash/view/splash_view.dart
+++ b/lib/features/splash/view/splash_view.dart
@@ -8,20 +8,17 @@ class SplashView extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ //TODO remove this delay
+ Future.delayed(
+ const Duration(seconds: 3),
+ () {
+ Navigator.popAndPushNamed(
+ context,
+ Routes.authRoute,
+ );
+ },
+ );
return Scaffold(
- appBar: AppBar(
- actions: [
- IconButton(
- icon: const Icon(Icons.arrow_forward),
- onPressed: () {
- Navigator.popAndPushNamed(
- context,
- Routes.authRoute,
- );
- },
- ),
- ],
- ),
body: Center(
child: InkWell(
//TODO check if user agreement is accepted
diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart
new file mode 100644
index 0000000..affb124
--- /dev/null
+++ b/lib/generated/assets.dart
@@ -0,0 +1,21 @@
+///This file is automatically generated. DO NOT EDIT, all your changes would be lost.
+class Assets {
+ Assets._();
+
+ static const String fontsAftikaRegular = 'assets/fonts/AftikaRegular.ttf';
+ static const String iconsDashboard = 'assets/icons/dashboard-fill.svg';
+ static const String iconsDashboardFill = 'assets/icons/dashboard.svg';
+ static const String iconsDevices = 'assets/icons/Devices.svg';
+ static const String iconsDevicesFill = 'assets/icons/Devices-fill.svg';
+ static const String iconsHome = 'assets/icons/home.svg';
+ static const String iconsLayout = 'assets/icons/Layout.svg';
+ static const String iconsLayoutFill = 'assets/icons/Layout-fill.svg';
+ static const String iconsMenu = 'assets/icons/Menu.svg';
+ static const String iconsMenuFill = 'assets/icons/Menu-fill.svg';
+ static const String iconsRoutineFill = 'assets/icons/Routine-fill.svg';
+ static const String iconsRoutines = 'assets/icons/Routines.svg';
+ static const String imagesAutomation = 'assets/images/automation.jpg';
+ static const String imagesBlackLogo = 'assets/images/black-logo.png';
+ static const String imagesBoxEmpty = 'assets/images/box-empty.jpg';
+ static const String imagesWhiteLogo = 'assets/images/white-logo.png';
+}
diff --git a/lib/main.dart b/lib/main.dart
index 45efa52..edb3229 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,33 +1,43 @@
+import 'dart:async';
+
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:syncrow_app/services/locator.dart';
import 'package:syncrow_app/utils/bloc_observer.dart';
+import 'package:syncrow_app/utils/helpers/localization_helpers.dart';
import 'my_app.dart';
void main() {
+ //to observe the state of the blocs in the output console
Bloc.observer = MyBlocObserver();
- //TODO: Uncomment
- // runZonedGuarded(() async {
- // const environment =
- // String.fromEnvironment('FLAVOR', defaultValue: 'production');
- // await dotenv.load(fileName: '.env.$environment');
- //
- // HttpOverrides.global = MyHttpOverrides();
- // WidgetsFlutterBinding.ensureInitialized();
- // LicenseRegistry.addLicense(() async* {
- // final license =
- // await rootBundle.loadString('assets/fonts/roboto/LICENSE.txt');
- // yield LicenseEntryWithLineBreaks(['google_fonts'], license);
- // });
- // initialSetup();
- // await LocalizationService.saveLocale(const Locale("en", "AE"));
- //
- // final savedLocale = await LocalizationService.savedLocale();
- //
- // runApp(const MyApp(Locale('en', '')));
- // }, (error, stackTrace) {
- // FirebaseCrashlytics.instance.recordError(error, stackTrace, fatal: true);
- // });
+ //to catch all the errors in the app and send them to firebase
+ runZonedGuarded(() async {
+ //to load the environment variables
+ // const environment =
+ // String.fromEnvironment('FLAVOR', defaultValue: 'production');
+ // await dotenv.load(fileName: '.env.$environment');
- runApp(const MyApp(Locale('en', '')));
+ // //this is to make the app work with the self-signed certificate
+ // HttpOverrides.global = MyHttpOverrides();
+ WidgetsFlutterBinding.ensureInitialized();
+
+ //license for the font
+ // LicenseRegistry.addLicense(() async* {
+ // final license =
+ // await rootBundle.loadString('assets/fonts/roboto/LICENSE.txt');
+ // yield LicenseEntryWithLineBreaks(['google_fonts'], license);
+ // });
+
+ //to initialize the locator
+ initialSetup();
+
+ //to save the locale in the shared preferences
+ await LocalizationService.saveLocale(const Locale("en", "AE"));
+ final savedLocale = await LocalizationService.savedLocale();
+
+ runApp(MyApp(savedLocale));
+ }, (error, stackTrace) {
+ // FirebaseCrashlytics.instance.recordError(error, stackTrace, fatal: true);
+ });
}
diff --git a/lib/my_app.dart b/lib/my_app.dart
index 7cc8ed0..e83955e 100644
--- a/lib/my_app.dart
+++ b/lib/my_app.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
-import 'package:syncrow_app/features/home/bloc/home_cubit.dart';
+import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/theme_manager.dart';
@@ -21,7 +21,7 @@ class MyApp extends StatelessWidget {
create: (context) => AuthCubit(),
),
BlocProvider(
- create: (context) => HomeCubit(),
+ create: (context) => NavCubit(),
),
],
child: MaterialApp(
diff --git a/lib/navigation/router.dart b/lib/navigation/router.dart
index ffe84d1..5a13864 100644
--- a/lib/navigation/router.dart
+++ b/lib/navigation/router.dart
@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/features/auth/view/auth_view.dart';
-import 'package:syncrow_app/features/home/view/home_view.dart';
+import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart';
+import 'package:syncrow_app/features/devices/view/devices_view.dart';
+import 'package:syncrow_app/features/layout/view/layout_view.dart';
+import 'package:syncrow_app/features/navigation/view/navigation_view.dart';
import 'package:syncrow_app/features/profile/view/profile_view.dart';
import 'package:syncrow_app/features/scene/view/scene_view.dart';
-import 'package:syncrow_app/features/smart/view/smart_view.dart';
import 'package:syncrow_app/features/splash/view/splash_view.dart';
import 'routing_constants.dart';
@@ -15,9 +17,9 @@ class Router {
return MaterialPageRoute(
builder: (_) => const SplashView(), settings: settings);
- case Routes.homeRoute:
+ case Routes.devicesRoute:
return MaterialPageRoute(
- builder: (_) => const HomeView(), settings: settings);
+ builder: (_) => const DevicesView(), settings: settings);
case Routes.profileRoute:
return MaterialPageRoute(
@@ -27,14 +29,22 @@ class Router {
return MaterialPageRoute(
builder: (_) => const SceneView(), settings: settings);
- case Routes.smartRoute:
+ case Routes.layoutRoute:
return MaterialPageRoute(
- builder: (_) => const SmartPage(), settings: settings);
+ builder: (_) => const LayoutPage(), settings: settings);
case Routes.authRoute:
return MaterialPageRoute(
builder: (_) => const AuthView(), settings: settings);
+ case Routes.dashboardRoute:
+ return MaterialPageRoute(
+ builder: (_) => const DashboardView(), settings: settings);
+
+ case Routes.homeRoute:
+ return MaterialPageRoute(
+ builder: (_) => const NavigationView(), settings: settings);
+
default:
return MaterialPageRoute(
builder: (_) => Scaffold(
diff --git a/lib/navigation/routing_constants.dart b/lib/navigation/routing_constants.dart
index 4093b7e..1f5ec34 100644
--- a/lib/navigation/routing_constants.dart
+++ b/lib/navigation/routing_constants.dart
@@ -1,8 +1,10 @@
class Routes {
static const String splash = '/';
- static const String homeRoute = '/home';
+ static const String homeRoute = '/navigation';
+ static const String devicesRoute = '/devices';
+ static const String dashboardRoute = '/dashboard';
static const String sceneRoute = '/scene';
- static const String smartRoute = '/smart';
+ static const String layoutRoute = '/layout';
static const String profileRoute = '/profile';
static const String authRoute = '/auth';
}
diff --git a/lib/services/locator.dart b/lib/services/locator.dart
index 9ea5fc7..6cbe235 100644
--- a/lib/services/locator.dart
+++ b/lib/services/locator.dart
@@ -1,4 +1,6 @@
+import 'package:dio/dio.dart';
import 'package:get_it/get_it.dart';
+import 'package:syncrow_app/services/api/http_service.dart';
import 'api/http_interceptor.dart';
@@ -8,5 +10,5 @@ GetIt locator = GetIt.instance;
initialSetup() async {
locator.registerSingleton(HTTPInterceptor());
//Base classes
- // locator.registerSingleton(HTTPService.setupDioClient());
+ locator.registerSingleton(HTTPService.setupDioClient());
}
diff --git a/lib/utils/context_extension.dart b/lib/utils/context_extension.dart
new file mode 100644
index 0000000..93c4b4d
--- /dev/null
+++ b/lib/utils/context_extension.dart
@@ -0,0 +1,30 @@
+import 'package:flutter/material.dart';
+
+extension ContextExtension on BuildContext {
+ Future goTo(String newRouteName) async {
+ // go(newRouteName);
+ await Navigator.pushNamed(this, newRouteName);
+ }
+
+ double get width => MediaQuery.sizeOf(this).width;
+
+ double get height => MediaQuery.sizeOf(this).height;
+
+ TextStyle get displayLarge => Theme.of(this).textTheme.displayLarge!;
+
+ TextStyle get displayMedium => Theme.of(this).textTheme.displayMedium!;
+
+ TextStyle get displaySmall => Theme.of(this).textTheme.displaySmall!;
+
+ TextStyle get titleLarge => Theme.of(this).textTheme.titleLarge!;
+
+ TextStyle get titleMedium => Theme.of(this).textTheme.titleMedium!;
+
+ TextStyle get titleSmall => Theme.of(this).textTheme.titleSmall!;
+
+ TextStyle get bodyLarge => Theme.of(this).textTheme.bodyLarge!;
+
+ TextStyle get bodyMedium => Theme.of(this).textTheme.bodyMedium!;
+
+ TextStyle get bodySmall => Theme.of(this).textTheme.bodySmall!;
+}
diff --git a/lib/utils/helpers/localization_helpers.dart b/lib/utils/helpers/localization_helpers.dart
index 9d9482d..8cadc78 100644
--- a/lib/utils/helpers/localization_helpers.dart
+++ b/lib/utils/helpers/localization_helpers.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
+import 'package:syncrow_app/utils/resource_manager/constants.dart';
class LocalizationService {
static saveLocale(Locale locale) async {
@@ -11,15 +12,14 @@ class LocalizationService {
}
static Future savedLocale() async {
- //todo: uncomment
SharedPreferences prefs = await SharedPreferences.getInstance();
- // var savedLanguageCode = prefs.getString(Constants.languageCode);
- // var savedCountryCode = prefs.getString(Constants.countryCode);
+ var savedLanguageCode = prefs.getString(Constants.languageCode);
+ var savedCountryCode = prefs.getString(Constants.countryCode);
var savedLocale = const Locale("ar", "JO");
- // if (savedCountryCode != null && savedLanguageCode != null) {
- // savedLocale = Locale(savedLanguageCode, savedCountryCode);
- // }
+ if (savedCountryCode != null && savedLanguageCode != null) {
+ savedLocale = Locale(savedLanguageCode, savedCountryCode);
+ }
return savedLocale;
}
diff --git a/lib/utils/resource_manager/assets_manager.dart b/lib/utils/resource_manager/assets_manager.dart
index bcf4dc7..0b469b4 100644
--- a/lib/utils/resource_manager/assets_manager.dart
+++ b/lib/utils/resource_manager/assets_manager.dart
@@ -1,16 +1,43 @@
-class ImageManager {
+abstract class ImageManager {
static const String base = 'assets/images';
static const String whiteLogo = '$base/white-logo.png';
static const String blackLogo = '$base/black-logo.png';
static const String boxEmpty = '$base/box-empty.jpg';
static const String automation = '$base/automation.jpg';
+ static const String background = '$base/Background.png';
+ static const String testDash = '$base/test_dash.png';
+ static const String testDash2 = '$base/test_dash2.png';
}
-class IconsManager {
- // static const String facebookIcon = 'assets/icons/icon.png';
+abstract class IconsManager {
+ static const String base = 'assets/icons';
+
+ static const String home = '$base/home-2.svg';
+
+ static const String dashboardFill = '$base/dashboard-fill.svg';
+ static const String dashboard = '$base/dashboard.svg';
+
+ static const String devices = '$base/Devices.svg';
+ static const String devicesFill = '$base/Devices-fill.svg';
+
+ static const String routine = '$base/Routines.svg';
+ static const String routineFill = '$base/Routine-fill.svg';
+
+ static const String menu = '$base/Menu.svg';
+ static const String menuFill = '$base/Menu-fill.svg';
+
+ static const String layout = '$base/Layout.svg';
+ static const String layoutFill = '$base/Layout-fill.svg';
+ static const String frequency = '$base/frequency.svg';
+ static const String winter = '$base/winter.svg';
+ static const String active = '$base/active.svg';
+ static const String voltMeter = '$base/volt-meter.svg';
+ static const String summer = '$base/Summer.svg';
+ static const String CO2 = '$base/CO2.svg';
+ static const String sustainability = '$base/sustainability.svg';
}
-class VideosManager {
+abstract class VideosManager {
// static const String registrationVideo = 'assets/videos/video.mp4';
}
diff --git a/lib/utils/resource_manager/color_manager.dart b/lib/utils/resource_manager/color_manager.dart
index 39a7377..f4d2977 100644
--- a/lib/utils/resource_manager/color_manager.dart
+++ b/lib/utils/resource_manager/color_manager.dart
@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
-class ColorsManager {
+abstract class ColorsManager {
+ static const Color textPrimaryColor = Color(0xFF5D5D5D);
static const Color primaryColor = Color(0xFF023dfe);
static const Color secondaryColor = Colors.white;
static const Color primaryTextColor = Colors.black;
static const Color greyColor = Color(0xFFd9d9d9);
+ static const Color backgroundColor = Color(0xFFececec);
}
diff --git a/lib/utils/resource_manager/constants.dart b/lib/utils/resource_manager/constants.dart
index e201407..34e955e 100644
--- a/lib/utils/resource_manager/constants.dart
+++ b/lib/utils/resource_manager/constants.dart
@@ -1 +1,5 @@
-abstract class Constants {}
+abstract class Constants {
+ static const String languageCode = "en";
+
+ static const String countryCode = "US";
+}
diff --git a/lib/utils/resource_manager/font_manager.dart b/lib/utils/resource_manager/font_manager.dart
index 691e3e0..9eecf92 100644
--- a/lib/utils/resource_manager/font_manager.dart
+++ b/lib/utils/resource_manager/font_manager.dart
@@ -14,7 +14,7 @@ import 'dart:ui';
/// - asset: assets/ fonts/Montserrat-SemiB01d. ttf
/// weight: 600
-class FontsManager {
+abstract class FontsManager {
static const FontWeight light = FontWeight.w300;
static const FontWeight regular = FontWeight.w400;
static const FontWeight medium = FontWeight.w500;
diff --git a/lib/utils/resource_manager/strings_manager.dart b/lib/utils/resource_manager/strings_manager.dart
index bd14653..31dd807 100644
--- a/lib/utils/resource_manager/strings_manager.dart
+++ b/lib/utils/resource_manager/strings_manager.dart
@@ -1,428 +1,17 @@
-// // ignore_for_file: lines_longer_than_80_chars
+// ignore_for_file: lines_longer_than_80_chars
-// class StringsManager {
-// static const noRouteFound = 'No route found';
-// static const switchToAWiderScreenToSeeTheTable =
-// 'Switch to a wider screen to see the table';
-// static const home = 'Home';
-// static const aboutUs1 = 'About Us';
-// static const complains = 'Complains';
-// static const registration = 'Registration';
-// static const commissionAndTransactions = 'Commission';
-// static const termsAndConditions = 'Terms & Conditions';
-// static const agents = 'Agents';
-// static const webApp = 'Web App';
-// static const contact = 'Contact Us';
-// static const bannerText = 'Aya for electronic payment services';
-// static const bannerSubText = '#Your money, in your mobile';
-// static const downloadApp = 'Download App Now!';
-// static const clickHere = 'Click Here To Try The App';
-// static const inquireAboutYourWallet = 'Inquire About Your Wallet';
-// static const readMore = 'Read More';
-// static const forMoreDetailsAndToKnowCommissionRate =
-// 'For more details and to know commission rate click here';
-// static const forMoreDetails = 'For more details click here here';
-// static const payYourBillsFromYourMobile = 'Pay your bills from your mobile!';
-// static const payYourBillsFromYourMobileDetails =
-// 'What you need to consume! Your bills and obligations will easily drive them with # verses from your mobile';
-// static const allFinancialServicesYouNeedWithOneApp =
-// 'All financial services you need with one application';
-// static const allFinancialServicesYouNeedWithOneAppDetails =
-// 'AYA provides you with your electronic wallet for free and compatible with all electronic payment services By estimated you pay: -Invoices -recharge - Payment of violations :( #Aea #Payment_Story_Assist ...';
-// static const transferAndReceiveYourMoneySafely =
-// 'Transfer and receive your money safely';
-// static const transferAndReceiveYourMoneySafelyDetails =
-// 'By creating an Aya wallet with a push of a button, you can easily transfer and receive your money What do you wait? Call to let you know about the network of agents deployed in all governorates of the Kingdom to benefit from the service free of charge 065509292...';
-// static const payYouUniversityFees =
-// 'Pay your university fees easily and securely';
-// static const payYouUniversityFeesDetails =
-// 'Wherever you are not, they are not pushing with any payment Contact us to create your wallet for free: 065509292 # Aya # Payment_right_First #Floosk_Bmobilek';
-// static const sendAndReceiveYourFinancialTransaction =
-// 'Send and receive your financial transaction from anywhere around the world';
-// static const sendAndReceiveYourFinancialTransactionDetails =
-// 'Send and receive your financial transaction from anywhere around the world using aya application';
-// static const emptyValidator = 'This field is required';
+class StringsManager {
+ static const noRouteFound = 'No route found';
+ static const noInternetConnection = 'No internet connection';
-// static const servicesProvidedApp = 'Services provided App by Aya Pay';
-// static const paymentService = 'Payment service';
-// static const paymentServiceSubText = 'Payment through electronic wallet';
-// static const electronicWallet = 'Electronic wallet';
-// static const electronicWalletSubText =
-// 'Inquire about the balance in the portfolio';
-// static const nfcTag = 'NFC Tag';
-// static const nfcTagSubText =
-// 'Electronic payment in transportation that supports electronic payment.';
-// static const cashout = 'Cashout';
-// static const cashoutSubText =
-// 'ATM Cashout service or through the nearest agent';
-// static const payBills = 'pay bills';
-// static const payBillsSubText = 'Billing Payment Service (EFAWATEERCOM)';
-// static const atmCashout = 'ATM Cashout';
-// static const atmCashoutSubText = 'Cash Cashout from Cairo Amman Bank';
-
-// static const aboutUs = 'About Us';
-// static const aboutUsDetails =
-// 'AYA-JO is a mobile payment service provider licensed by the Central Bank of Jordan to operate in the Jordanian market. AYA-JO provides various ways to allow users to purchase their own goods using mobile phone applications. Approval of the entire process and its monitoring by the Central Bank of Jordan';
-// static const footerSubmitAComplaint = 'Submit a complaint';
-// static const footerSubmitAComplaintDetails =
-// 'Call 06/5509292, ext. 300, available around the clock Or on the website, in the complaints tab, by all available means In the event that a solution to the problem is not reached within 30 working days, or in the absence of a convincing response from the company, or if the company refuses to receive the complaint, please contact the Central Bank of Jordan, Consumer Financial Protection Department, at 06/4630301.';
-// static const footerContactUs = 'Contact Us';
-// static const footerContactUsDetails =
-// 'Amman - Garden Street - Building Carrefour No. 90 Floor 3\n\nTelephone: +962 6 092 92\n\nE-mail : info@aya.jo';
-// static const footerEmail = 'E-mail : info@aya.jo';
-// static const footerPhone = 'Telephone: +962 6 092 92';
-// static const footerAddress =
-// 'Amman - Garden Street - Building Carrefour No. 90 Floor 3';
-// static const footerSubCategories = 'Sub Categories';
-// static const footerLastNews = 'Last News';
-// static const footerLastNewsDetails =
-// 'Save your effort and time and pay from your mobile and win whatever you are Buy Online! Or even Freelancer!\nSave your time with Aya and open your portfolio with us at your nearest authorized agent.';
-// static const footerCopyRight = '© 2017 - All Rights with aya';
-
-// ///About Us Page Strings
-// static const serviceFeature = 'Service Features';
-// static const flexibleApplication =
-// 'Flexible application: Our application allows multiple features and languages to be more user friendly.';
-// static const protection =
-// 'Protection: Save all your data and protect it with our security system to avoid data leakage.';
-// static const ourMission = 'Our Mission';
-// static const ourMissionDetails =
-// 'Aya seeks to empower its employees and provide them with the best means of knowledge using state-of- the-art electronic payment technology to provide innovative solutions to achieve customer satisfaction and improve the level of services provided in line with the highest standards of quality and excellence.';
-// static const ourVision = 'Our Vision';
-// static const ourVisionDetails =
-// 'Play a leading role in the mobile payment market in Jordan.';
-// static const ourValues = 'Our Values';
-// static const ourValuesDetails =
-// 'High professionalism, credibility, fair competition, integration.';
-// static const companyServices = 'Company Services';
-
-// static const personalWallets = 'Personal Wallets';
-// static const moneyDeposit =
-// 'Money deposit and withdrawal: by charge your e-wallet through our agent network, payment cards and efawateercom.';
-// static const moneyWithdrawal =
-// 'Money withdrawal: proceeding a cash-out process through our agent network, POS machines, CAB ATMs network.';
-// static const transferMoney =
-// 'Transfer money between AYAJO customers or by sending/receiving transfers with any E-wallet account in jordan from any company.';
-// static const payBillsForMoreThan250Services =
-// 'Pay bills for more than 250 services (Internet, phone, electricity, water, government service..etc) through eFAWATEERcom system.';
-
-// static const businessSolutions = 'Business Solutions';
-// static const transportationSolution = 'Transportation Solution';
-// static const posSystem = 'POS System';
-// static const agentMerchantSystems = 'Agent Merchant Systems';
-// static const technicalChannelsAndSolutions =
-// 'Technical Channels and Solutions';
-// static const eWalletMobileApp =
-// 'E-wallet Mobile application with ability to access through web page';
-// static const paymentCards = 'Payment Cards';
-// static const qrCode = 'QR Code';
-
-// ///Complains Page Strings
-
-// static const complainsTitle = 'Submit a complaint';
-// static const complainsDetails =
-// 'Call 06/5509292, ext. 300, available around the clock Or on the website, in the complaints tab, by all available means In the event that a solution to the problem is not reached within 30 working days, or in the absence of a convincing response from the company, or if the company refuses to receive the complaint, please contact the Central Bank of Jordan, Consumer Financial Protection Department, at 06/4630301.';
-// static const call06 =
-// '1. Call 06/5509292, ext. 300, available around the clock';
-// static const orOnTheWebsite =
-// '2. Or on the website, in the complaints tab, by all available means';
-// static const inTheEvent =
-// '3. In the event that a solution to the problem is not reached within 30 working days, or in the absence of a convincing response from the company, or if the company refuses to receive the complaint, please contact the Central Bank of Jordan, Consumer Financial Protection Department, at 06/4630301.';
-// static const name = 'name';
-// static const enterYourName = 'Enter your name';
-// static const email = 'email';
-// static const enterYourEmail = 'Enter your email';
-// static const mobileNumber = 'mobile number';
-// static const enterYourMobileNumber = 'Enter your mobile number';
-// static const dateOfTheProblem = 'date of the problem';
-// static const enterDateOfTheProblem = 'Enter date of the problem';
-// static const complaintText = 'complaint text';
-// static const enterComplaintText = 'Enter complaint text';
-// static const submitComplaint = 'Submit Complaint';
-// static const complaintSubmitted = 'Complaint Submitted';
-
-// ///registration page
-
-// static const howToRegister = 'how to register - open E-wallet';
-// static const afterSigningTheContract =
-// 'After signing the contract at the agent, you will receive an SMS message containing the activation code';
-// static const enterTheActivationCode =
-// 'Enter the activation code and the mobile number by clicking on the Create Account button and then enter your password and your security code';
-// static const thereIsNoMinimumBalance =
-// 'There is no minimum balance, as you can open the wallet with a zero balance.';
-// static const usingTheElectronicWallet = 'Using the electronic wallet: ';
-// static const youCanPayThroughTheNumber =
-// 'You can pay through the number of another subscriber with an electronic wallet';
-// static const youCanAlsoBuyFromAnyStore =
-// 'You can also buy from any store or supermarket that serves the electronic wallet';
-// static const whenYouSubscribeToAya =
-// 'When you subscribe to Aya, you get an NFC-Tag sticker that allows you to pay electronically in transportation that supports electronic payment.';
-// static const yourMobileIsOld =
-// 'Your mobile is old .... Simply you can also call * 999 # and follow the instructions';
-// static const youCanPayMobileBills =
-// 'You can pay mobile bills or electricity, water and more than sixty types of bills.';
-// static const youCanGetAMasterCard =
-// 'You can get a Master Card linked to your electronic wallet and enable you to withdraw cash from any ATM, buy goods and shop online, with the ability to control it through the application.';
-
-// ///commission and transactions page
-
-// static const transactionsTitle = 'Transactions:';
-// static const service = 'Service';
-// static const serviceDetails = 'Service Details';
-// static const fees = 'Fees/ Dinar';
-
-// static const transferBetweenIndividualsService =
-// 'Transfer between individuals';
-// static const transferBetweenSameIndividualsDetails =
-// 'Transfer from individual aya pay wallet to individual aya pay wallet';
-// static const transferBetweenSameIndividualsFees = 'Free';
-
-// static const transferBetweenDifferentIndividualsDetails =
-// 'Transfer from individual aya pay wallet to other individual wallet';
-// static const transferBetweenIndividualsFeesDetailsLessThan50 =
-// 'Less than 50 dinars';
-// static const transferBetweenIndividualsFeesDetailsFrom50 =
-// 'From 50 dinars to 100 dinars';
-// static const transferBetweenIndividualsFeesDetailsFrom100 =
-// 'From 100 dinars to 500 dinars';
-// static const transferBetweenIndividualsFeesDetailsFrom500 =
-// 'From 500 dinars to 1000 dinars';
-// static const transferBetweenIndividualsFeesDetailsLessThan50Fees = '0.15';
-// static const transferBetweenIndividualsFeesDetailsFrom50Fees = '0.25';
-// static const transferBetweenIndividualsFeesDetailsFrom100Fees = '0.35';
-// static const transferBetweenIndividualsFeesDetailsFrom500Fees = '0.5';
-
-// static const cashDepositService = 'Cash deposit';
-// static const cashDepositIndividualDetails =
-// 'Deposit with an individual wallet at agents';
-// static const cashDepositIndividualFees = 'Free';
-// static const cashDepositCompanyDetails =
-// 'Deposit with a corporate wallet at agents';
-// static const cashDepositCompanyFees = '0.50';
-// static const cashDepositAtATMDetails =
-// 'Cash deposit through ATM without card';
-// static const cashDepositAtATMFees = '1.0';
-
-// static const cashWithdrawalService = 'Cash withdrawal';
-// static const cashWithdrawalFromAgent = 'Cash withdrawal from agents';
-// static const cashWithdrawalFromAgentLessThan20 = 'Less than 20 dinars';
-// static const cashWithdrawalFromAgentFrom20 = 'From 20 dinars to 50 dinars';
-// static const cashWithdrawalFromAgentFrom50 = 'From 50 dinars to 1000 dinars';
-// static const cashWithdrawalFromAgentLessThan20Fees = '0.5';
-// static const cashWithdrawalFromAgentFrom20Fees = '0.75';
-// static const cashWithdrawalFromAgentFrom50Fees = '1';
-// static const cashWithdrawalAtATMDetails =
-// 'Cash withdrawal through ATM with card/without card';
-// static const cashWithdrawalAtATMFees = '1';
-
-// static const otherAdditionalServices = 'Other additional services';
-// static const otherAdditionalPayThroughDetails = 'Pay through eFawateercom';
-// static const otherAdditionalEVouchersDetails = 'E-vouchers';
-// static const otherAdditionalPayThroughFees = 'No additional fees';
-// static const otherAdditionalEVouchersFees = 'According to the voucher';
-
-// static const internationalTransfersService = 'International transfers';
-// static const internationalTransfersSendDetails =
-// 'Send international transfers';
-// static const internationalTransfersReceiveDetails =
-// 'Receive international transfers';
-// static const internationalTransfersSendFees = 'According to the country';
-// static const internationalTransfersReceiveFees = 'Free';
-
-// static const electronicCardsService = 'Electronic cards';
-// static const electronicCardsIssueDetails =
-// 'Issue an electronic card linked to the electronic wallet';
-// static const electronicCardsResendDetails = "Resend the card's secret code";
-// static const electronicCardsIssueFees = '5';
-// static const electronicCardsResendFees = '1';
-
-// static const solidAccountService = 'Solid account';
-// static const solidAccountDetails = 'Monthly fees';
-// static const solidAccountFees = '1';
-
-// ///Services Page Strings
-
-// static const definitions = 'Definitions';
-// static const definitionsDescription =
-// 'Since Aya Company for Electronic Payment Services is licensed by the Central Bank to connect to the national exchange and provide payment service through mobile phones in the Hashemite Kingdom of Jordan. Where I wish the site below to contract with the company or one of its agents for the purposes of opening an electronic wallet, and to benefit from payment services through mobile phones, in accordance with the terms and conditions of those services.';
-
-// static const generalConditions = 'General Conditions';
-// static const generalConditionsDescription =
-// 'I hereby acknowledge that once I sign these Terms and Conditions, an agreement will be created in force and binding on me to apply to all transactions I carry out through the Mobile Payment Services.';
-
-// static const clientResponsibilities = 'Client Responsibilities';
-// static const clientResponsibilitiesDescription =
-// 'The customer acknowledges that all data, information and documents provided by him are true and original and acknowledges his full responsibility for what is stated therein, the extent of its legality and any matters related to it.';
-
-// static const companyResponsibilities = 'Company Responsibilities';
-// static const companyResponsibilitiesDescription =
-// 'The Company/Service Provider is obligated to inform the Client of the balance of his wallet immediately upon the end of any financial movement on his wallet.';
-
-// ///Definitions Page Strings
-
-// static const definitionsCompanyServiceProvider =
-// 'Company/Service Provider: Aya Electronic Payment Company';
-// static const definitionsAgent =
-// 'Agent: One of the authorized agents of Aya Company for electronic payment service';
-// static const definitionsServices = 'Service(s): Mobile Payment Service';
-// static const definitionsBank = 'Bank:Central Bank of Jordan';
-// static const definitionsCustomer =
-// 'Customer: The natural and/or legal person who will open an electronic wallet in his name and who has signed these terms and conditions and who has been registered at the National Exchange through the service provider for the purposes of using the mobile payment service.';
-// static const definitionsEWallet =
-// 'E-wallet: It is the default account that is opened with the company in the name of the client to enable him to carry out mobile payment transactions';
-// static const definitionsElectronicMoney =
-// 'Electronic money: The value of cash stored electronically and issued against the receipt of cash amounts in the same type of currency and its value and is a means of payment transferable between the parties dealing in it by electronic means';
-
-// ///general conditions
-
-// static const conditionsIntroductionAndDefinitions =
-// 'Introduction and Definitions are an integral part of this Agreement';
-// static const conditionsApplicantMustBeAtLeast18YearsOld =
-// 'The applicant must be at least 18 years old, and those under the age of 18 are required to submit the application by their guardian or his legal representative.';
-// static const conditionsClientAuthorizesTheCompany =
-// 'The Client authorizes the Company to send his data to the National Exchange for the purposes of registration and the Company is obligated to send the result of the registration process to the Client.';
-// static const conditionsClientAuthorizesTheCompany2 =
-// "The Client authorizes the Company/Service Provider with absolute and irrevocable authorization to credit the value of any executed transaction to the Client's wallet account with the Company/Service Provider.";
-// static const conditionsUponTheOfficialRegistration =
-// 'Upon the official registration of the Customer and activation of the Service, the Company/Service Provider issues a user code and PIN for the Customer and the Customer is committed to maintaining it and at his full responsibility.';
-// static const conditionsTheUserCodeReceivedByTheCustomer =
-// 'The "User and PIN" code received by the customer is considered as an acknowledgment by him of his consent to the execution of any orders, services or payment orders.';
-// static const conditionsMobilePaymentServiceIsProvided =
-// 'Mobile payment service is provided within the Hashemite Kingdom of Jordan exclusively and in Jordanian dinars only.';
-// static const conditionsFinancialTransactionsThatTheCustomer =
-// 'Financial transactions that the customer is allowed to carry out through the wallet without limitation: transfer and receipt of funds, payment of bills, payment to the merchant, withdrawal and deposit through ATMs or agents.';
-
-// ///client responsibilities
-
-// static const clientResTheCustomerAcknowledges =
-// 'The customer acknowledges that all data, information and documents provided by him are duly correct and acknowledges his full responsibility for what is stated therein, the extent of its legality and any matters related to it.';
-// static const clientResTheCustomerAcknowledges2 =
-// 'The customer acknowledges that he has seen and understood the mechanism of operation of the services and any published information and can view it.';
-// static const clientResTheCustomerIsObligated =
-// 'The customer is obligated to review the mobile payment instructions, the operational framework and the instructions issued by the Central Bank of Jordan in this regard and any amendments that occur to them.';
-// static const clientResTheClientAgrees =
-// 'The Client agrees to consider all electronic records of the Company certified, documented, conclusive evidence and binding on him. It also agrees that the electronic register maintained and extracted from the national exchange and for all movements and operations carried out through the national exchange shall be considered the approved electronic register in the event of any dispute.';
-// static const clientResTheCustomerIsInformed =
-// 'The customer is informed that the service will be in Jordanian Dinars only, until the legislative authorities approve otherwise.';
-
-// static const clientResTheClientAgrees2 =
-// "The Client agrees to authorize the Company to have an absolute and irrevocable general authorization to credit the value of any executed transaction to the Client's Wallet Account with the Company.";
-// static const clientResTheCustomerAcknowledges3 =
-// 'The customer acknowledges that the use of the service is subject to the legislation in force issued by the Central Bank of Jordan.';
-// static const clientResTheCustomerAcknowledges4 =
-// "The customer acknowledges with his knowledge and personal consent that the customer's subscription is linked to the national number for Jordanians, or the national number of the establishment for private/public companies, or the identity identification number accepted in accordance with the legislation in force for non-Jordanians, and as stipulated in the instructions of combating money laundering and terrorist financing.";
-// static const clientResTheCustomerIsObligated2 =
-// 'The customer is obligated to replenish the electronic wallet and maintain sufficient balance for the purposes of using the electronic wallet, and it is not permissible to use mobile phone recharge cards for the purposes of replenishing the balance of electronic wallets.';
-// static const clientResTheCustomerAcknowledges5 =
-// "The customer acknowledges with his knowledge and personal consent that the customer's subscription is linked to the national number for Jordanians, or the national number of the establishment for private/public companies, or the identity identification number accepted in accordance with the legislation in force for non-Jordanians, and as stipulated in the instructions of combating money laundering and terrorist financing.";
-
-// static const clientResTheCustomerIsObligated3 =
-// 'The customer is obligated to replenish the electronic wallet and maintain sufficient balance for the purposes of using the electronic wallet, and it is not permissible to use mobile phone recharge cards for the purposes of replenishing the balance of electronic wallets.';
-// static const clientResTheCustomerAcknowledges6 =
-// "The customer acknowledges that the electronic wallet is linked to the mobile phone number provided / chosen by him, so that payment is made through electronic money that is transferred by the service provider / agent to the customer's wallet against the cash received, and then those electronic money are dealt with by the customer.";
-// static const clientResTheCustomerAcknowledges7 =
-// 'The customer acknowledges that he has reviewed the monthly limits for mobile payment transactions as stated in the instructions issued by the system administrator and any amendments that may occur to them.';
-// static const clientResTheCustomerIsCommitted =
-// 'The customer is committed to the ceiling of daily movements as stipulated in the instructions issued by the system administrator and any amendments that may occur to them.';
-// static const clientResTheClientIsObliged =
-// 'The Client is obliged, at his own risk, to inform the Company immediately in the event of loss and/or change of the mobile number registered with the Company, through the customer service available around the clock.';
-
-// static const clientResTheCustomerMustSend =
-// "The customer must send any complaints to the company's complaints center and/or call the number of the complaints center available around the clock.";
-// static const clientResTheCustomerAcknowledges8 =
-// 'The Customer acknowledges that if the mobile number is linked to his account, his data will be displayed at the originator of the transfer on the payment channels of the participants on the system.';
-// static const clientResTheCustomerAgrees =
-// "The Customer agrees in advance to show his/her personal data (name, account number and/or service provider name) to the originator of the remittance on the participants' payment channels on the system, when making a sending, receiving and/or inquiry for any money transfer.";
-// static const clientResTheCustomerMustSend2 =
-// "The Customer must send any suggestion to the Company's Customer Service Center and/or call the number of the Customer Service Center available around the clock.";
-// static const clientResTheCustomerIsObligated4 =
-// 'The customer is obliged, on his personal responsibility, to verify the details of the transaction in terms of the phone number of the receiver of the transaction and the value before executing the transaction, ensuring the protection of the personal password and adhering to all security and confidentiality rules as approved by the company, in addition to not issuing transactions without sufficient balances in his accounts.';
-
-// static const clientResTheCustomerAcknowledges9 =
-// 'The customer acknowledges and agrees that the company / service provider reserves the right at all times to amend the terms and conditions related to this service and after being notified of this procedure at his address shown above and by all available means with reasons, and also acknowledges his commitment to those terms and conditions after being amended and agrees that if he uses this service / services after making any amendments or changes to its terms or conditions, he accepts and agrees to all new and/or amended terms, conditions and conditions.';
-// static const clientResTheCustomerIsObligated5 =
-// "The customer is obligated to verify the movements he has made by entering the service provider's application or communicating with customer service in this regard.";
-// static const clientResTheCustomerHasTheRight =
-// 'The customer has the right to submit any suggestion or submit any complaint without incurring additional fees or commissions that may hinder his right to submit a complaint.';
-// static const clientResInCaseOfDeath =
-// 'In the event of the death of the customer, the funds in the electronic wallet will be seized, the seizure will not be released unless all requirements under the law in force in the Hashemite Kingdom of Jordan are met.';
-// static const clientResTheElectronicWalletIsConsidered =
-// "The electronic wallet is considered rigid if no financial movement is made on it for a period of one year, and in the event that it is not possible to communicate with the customer who owns the wallet and exhaust all means of communication with him, a commission will be collected in accordance with the pricing policy published on the company's website.";
-
-// static const clientResTheCompanyShallNotify =
-// 'The Company shall notify the Client at his address available with the Company that his electronic wallet will be considered rigid at least one month before the expiry of the period stipulated above.';
-// static const clientResItIsNotAllowed =
-// 'It is not allowed to accept any withdrawal or transfer transactions from the rigid electronic wallet except through the customer personally or his representative under a judicial power of attorney or duly approved authorization, or the authorized signatory of the electronic wallet in the case of a legal person to visit the payment service provider at its headquarters.';
-// static const clientResInCaseTheClientOrHisLegal =
-// 'In the event that the Client or his legal representative reviews the Company with the aim of reactivating the rigid electronic wallet or withdrawing the balance, the Company is obligated to reactivate the electronic wallet or disburse the existing balance.';
-// static const clientResTheClientAcknowledges =
-// 'The Client acknowledges that the Company has the right, after being informed of this, and in the event of any reason or in the event that the Client breaches the terms of the contract or shows the invalidity of';
-
-// ///company responsibilities
-
-// static const companyResTheCompanyIsObligated =
-// 'The Company / Service Provider is obligated to inform the Client about the balance of his wallet, the type of movement he made and the remaining balance in the wallet immediately after the end of any movement executed on his wallet.';
-// static const companyResTheCompanyIsCommitted =
-// "The company is committed to the refund mechanism to customers in the event that the company / service provider stops providing the service in accordance with the company's work procedures.";
-// static const companyResTheCompanyIsCommitted2 =
-// "The company is committed to taking all necessary measures and precautionary measures to ensure the security and confidentiality of the client's information.";
-// static const companyResTheCompanyIsCommitted3 =
-// 'The company is committed to taking all necessary measures to comply with the service with all legislation in force in the Kingdom and any instructions issued by the Central Bank of Jordan and to comply with the requirements of money laundering and terrorist financing.';
-// static const companyResTheCompanyIsCommitted4 =
-// 'The Company is committed to providing the Client with a list of commissions, fees and benefits collected by the payment service provider for all products and services provided by the Company, as shown in the Special tab on commissions and commission ceilings on the website.';
-// static const companyResTheCompanyIsCommitted5 =
-// 'The company / service provider is committed to providing the appropriate environment and safe procedures to protect data and information related to customers.';
-// static const companyResTheCompanyIsCommitted6 =
-// 'The Company is committed to informing the Clients of the appropriate and available methods of any amendment that may occur to the list of commissions and fees that affect the Clients, 30 days before the application of the new prices and commissions.';
-// static const companyResTheCompanyIsObligated2 =
-// 'The company is obligated to accept any suggestions or complaints by customers without charging the client any commissions or additional fees and without imposing any conditions that may hinder his right to submit a complaint.';
-// static const companyResTheCompanyIsObligated3 =
-// 'The Company is committed to following special procedures in these cases (death of the client, freezing of the wallet, closure of the electronic payment account, or suspension of any payment tools or electronic means associated with them).';
-// static const companyResTheCompanyIsObligated4 =
-// 'The Company is obliged to clarify or inform the Client of the financial transactions allowed to be carried out as described in the General Conditions tab.';
-// static const companyResTheCompanyIsObligated5 =
-// 'The Company is obligated to provide the Client with a copy of the subscription contract signed with him and any notices, data or statements related to his electronic wallet, even if there is a judicial dispute between the Customer and the Service Provider.';
-
-// ///agents
-
-// static const agentsFindYour = 'Find your nearest agent with\nAya Finder';
-// static const agentsHowToBecome = 'HOW TO BECOME AN AGENT';
-// static const agentsFindYourDetails =
-// 'You can now search for the nearest agent or service provider using Google Maps in an easy and fast way';
-
-// ///agent finder
-
-// static const ayaFinder = 'AYA Finder';
-// static const ayaFinderDetails =
-// 'You can search for your nearest agent to open a new wallet or top up your wallet using the map or visit one of our agents from the table below :';
-
-// ///how to become an agent
-
-// static const howToBecomeAnAgent = 'How to become an agent !';
-// static const howToBecomeAnAgentDetails =
-// 'To apply for Aya Agency for Electronic Payment Services, please fill out the application form below and we will contact you as soon as possible.';
-
-// ///map
-// static const howToSearchByMapTitle = 'How to search by map:';
-// static const howToSearchByMapDetails =
-// 'To determine your location, click on a bookmark, or you can type the place in the search box, then you have to click on the search button to have the map find your nearest agents';
-
-// ///Error 404
-
-// static const error404 = 'Error 404';
-// static const error404Details =
-// 'The page you are looking for does not exist or has been moved';
-
-// ///contact us
-
-// static const contactUsGetInTouch = 'GET IN TOUCH WITH US';
-// static const contactUsGetInTouchDetails =
-// 'Dear visitors, thank you for visiting Aya.Jo website. We welcome your letters, questions and suggestions that will receive attention and welcome from the team. We are always keen to build a relationship of mutual trust between us and our visitors, and to enhance interaction through responses to your messages. Feel free to send us your questions and suggestions, and our team will get back to you as soon as possible.';
-// static const contactUsPublicAdministration = 'Public Administration';
-// static const contactUsPublicAdministrationDetails =
-// 'Amman - Garden Street - Carrefour Building No. 90, 3rd floor\nTel: (+92) 092 55 6 962\nFax: (+19) 880 56 6 962\nToll Free : 080022068\nsupport@aya.jo\nP.O.Box:930587 , Postal Code:11193 – Amman, Jordan';
-// static const contactUsWorkingHours = 'working hours';
-// static const contactUsWorkingHoursDetails =
-// 'Official working hours are from Sunday to Thursday from half past eight in the morning until half past five in the evening or call us at any time through the customer service center available seven days a week 24 hours a day.';
-// static const contactUsFollowUsOn = 'Follow us on';
-// }
+ static const dashboard = 'Dashboard';
+ static const active = 'Active';
+ static const current = 'Current';
+ static const frequency = 'Frequency';
+ static const energyUsage = 'Energy Usage';
+ static const totalConsumption = 'Total Consumption';
+ static const ACConsumption = 'AC Consumption';
+ static const units = 'Units';
+ static const emissions = 'Emissions';
+ static const reductions = 'Reductions';
+}
diff --git a/lib/utils/resource_manager/theme_manager.dart b/lib/utils/resource_manager/theme_manager.dart
index 867c04a..0a84eee 100644
--- a/lib/utils/resource_manager/theme_manager.dart
+++ b/lib/utils/resource_manager/theme_manager.dart
@@ -16,19 +16,19 @@ ThemeData myTheme = ThemeData(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s35,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
displayMedium: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s20,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
displaySmall: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s16,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
///title
@@ -36,19 +36,19 @@ ThemeData myTheme = ThemeData(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s48,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
titleMedium: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s30,
- fontWeight: FontsManager.regular,
- color: Colors.black,
+ fontWeight: FontsManager.bold,
+ color: ColorsManager.textPrimaryColor,
),
titleSmall: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s25,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
///body
@@ -56,38 +56,38 @@ ThemeData myTheme = ThemeData(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s18,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
bodyMedium: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s14,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
bodySmall: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s12,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
labelLarge: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s18,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
labelMedium: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s16,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
labelSmall: TextStyle(
fontFamily: FontsManager.fontFamily,
fontSize: FontSize.s14,
fontWeight: FontsManager.regular,
- color: Colors.black,
+ color: ColorsManager.textPrimaryColor,
),
),
diff --git a/lib/utils/resource_manager/values_manager.dart b/lib/utils/resource_manager/values_manager.dart
index c7d4c39..4898fdb 100644
--- a/lib/utils/resource_manager/values_manager.dart
+++ b/lib/utils/resource_manager/values_manager.dart
@@ -1,61 +1,59 @@
-// import '../../imports.dart';
+abstract class AppMargin {
+ static const m8 = 8.0;
+ static const m12 = 12.0;
+ static const m14 = 14.0;
+ static const m16 = 16.0;
+ static const m18 = 18.0;
+ static const m20 = 20.0;
+ static const m24 = 24.0;
+ static const m32 = 32.0;
+ static const m40 = 40.0;
+ static const m65 = 65.0;
+}
-// class AppMargin {
-// static const m8 = 8.0;
-// static const m12 = 12.0;
-// static const m14 = 14.0;
-// static const m16 = 16.0;
-// static const m18 = 18.0;
-// static const m20 = 20.0;
-// static const m24 = 24.0;
-// static const m32 = 32.0;
-// static const m40 = 40.0;
-// static const m65 = 65.0;
-// }
+abstract class AppPadding {
+ static const p4 = 4.0;
+ static const p8 = 8.0;
+ static const p12 = 12.0;
+ static const p14 = 14.0;
+ static const p16 = 16.0;
+ static const paragraphPadding = 15.0;
+ static const p18 = 18.0;
+ static const p20 = 20.0;
+ static const titleSmallPadding = 20.0;
+ static const p24 = 24.0;
+ static const p32 = 32.0;
+ static const p40 = 40.0;
+ static const p65 = 65.0;
+ static const p80 = 80.0;
+ static const p100 = 100.0;
+ static const p150 = 150.0;
+ static const deskTopPadding = 160.0;
+ static const tabletPadding = 100.0;
+ static const mobilePadding = 40.0;
+}
-// class AppPadding {
-// static const p4 = 4.0;
-// static const p8 = 8.0;
-// static const p12 = 12.0;
-// static const p14 = 14.0;
-// static const p16 = 16.0;
-// static const paragraphPadding = 15.0;
-// static const p18 = 18.0;
-// static const p20 = 20.0;
-// static const titleSmallPadding = 20.0;
-// static const p24 = 24.0;
-// static const p32 = 32.0;
-// static const p40 = 40.0;
-// static const p65 = 65.0;
-// static const p80 = 80.0;
-// static const p100 = 100.0;
-// static const p150 = 150.0;
-// static const deskTopPadding = 160.0;
-// static const tabletPadding = 100.0;
-// static const mobilePadding = 40.0;
-// }
+abstract class AppSize {
+ static const s8 = 8.0;
+ static const s12 = 12.0;
+ static const s14 = 14.0;
+ static const s16 = 16.0;
+ static const s18 = 18.0;
+ static const s20 = 20.0;
+ static const s24 = 24.0;
+ static const s32 = 32.0;
+ static const s40 = 40.0;
-// class AppSize {
-// static const s8 = 8.0;
-// static const s12 = 12.0;
-// static const s14 = 14.0;
-// static const s16 = 16.0;
-// static const s18 = 18.0;
-// static const s20 = 20.0;
-// static const s24 = 24.0;
-// static const s32 = 32.0;
-// static const s40 = 40.0;
+ static const double logoHeight = 80;
+ static const double appBarHeight = 40;
+}
-// static const double logoHeight = 80;
-// static const double appBarHeight = 40;
-// }
-
-// class AppRadius {
-// static const r4 = 4.0;
-// static const r8 = 8.0;
-// static const r12 = 12.0;
-// static const r14 = 14.0;
-// static const r16 = 16.0;
-// static const r18 = 18.0;
-// static const r50 = 50.0;
-// }
+abstract class AppRadius {
+ static const r4 = 4.0;
+ static const r8 = 8.0;
+ static const r12 = 12.0;
+ static const r14 = 14.0;
+ static const r16 = 16.0;
+ static const r18 = 18.0;
+ static const r50 = 50.0;
+}
diff --git a/pubspec.lock b/pubspec.lock
index 13815b6..5d7bf13 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -5,10 +5,18 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
- sha256: "1a52f1afae8ab7ac4741425114713bdbba802f1ce1e0648e167ffcc6e05e96cf"
+ sha256: "737321f9be522620ed3794937298fb0027a48a402624fa2500f7532f94aea810"
url: "https://pub.dev"
source: hosted
- version: "1.3.21"
+ version: "1.3.22"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
async:
dependency: transitive
description:
@@ -101,10 +109,10 @@ packages:
dependency: "direct main"
description:
name: dio
- sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3"
+ sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8"
url: "https://pub.dev"
source: hosted
- version: "5.4.0"
+ version: "5.4.1"
fake_async:
dependency: transitive
description:
@@ -133,26 +141,26 @@ packages:
dependency: "direct main"
description:
name: firebase_analytics
- sha256: edb9f9eaecf0e6431e5c12b7fabdb68be3e85ce51f941ccbfa6cb71327e8b535
+ sha256: "54681f6a8c35ec782c86680919953edbae66517a718fe7606a7ba52cfa1b36ca"
url: "https://pub.dev"
source: hosted
- version: "10.8.5"
+ version: "10.8.6"
firebase_analytics_platform_interface:
dependency: transitive
description:
name: firebase_analytics_platform_interface
- sha256: de4a54353cf58412c6da6b660a0dbad8efacb33b345c0286bc3a2edb869124d8
+ sha256: cf7378f407c26fd1f1cc808c0d791f2a15dd4f1fe0626bb2ce6a96663c4d8470
url: "https://pub.dev"
source: hosted
- version: "3.9.5"
+ version: "3.9.6"
firebase_analytics_web:
dependency: transitive
description:
name: firebase_analytics_web
- sha256: "77e4c02ffd0204ccc7856221193265c807b7e056fa62855f973a7f77435b5d41"
+ sha256: f62c7a2514771f6e122c5b55227c0c7fdaa253cc2fe6efce768897c0fb68a5ab
url: "https://pub.dev"
source: hosted
- version: "0.5.5+17"
+ version: "0.5.5+18"
firebase_core:
dependency: "direct main"
description:
@@ -181,18 +189,18 @@ packages:
dependency: "direct main"
description:
name: firebase_crashlytics
- sha256: efd096e4c3d2c568e128505b6e4ce5f5d5a1629f700a4d6fee6bd25b85937dde
+ sha256: "4c754db28a7daabe03c4cbf1079dbe81e6f0681284fed6d07e0e640b7f1027c4"
url: "https://pub.dev"
source: hosted
- version: "3.4.14"
+ version: "3.4.15"
firebase_crashlytics_platform_interface:
dependency: transitive
description:
name: firebase_crashlytics_platform_interface
- sha256: "225a54d834a118be262c1f1096d407515e35b99d9b474c987abdcff7663f2b81"
+ sha256: "08c5d7b5f93dbad7306d26702935abd8b579313ea256eb27006562a1867df249"
url: "https://pub.dev"
source: hosted
- version: "3.6.21"
+ version: "3.6.22"
fixnum:
dependency: transitive
description:
@@ -307,6 +315,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
+ flutter_svg:
+ dependency: "direct main"
+ description:
+ name: flutter_svg
+ sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.9"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -421,6 +437,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.3"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
path_provider:
dependency: transitive
description:
@@ -469,6 +493,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.2"
platform:
dependency: transitive
description:
@@ -722,6 +754,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.3.3"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.10+1"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.10+1"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.10+1"
vector_math:
dependency: transitive
description:
@@ -754,6 +810,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.5.0"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 20b5b39..58f1382 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -18,6 +18,7 @@ dependencies:
shared_preferences: ^2.2.2
flutter_animated_dialog: ^2.0.1
gap: ^3.0.1
+ flutter_svg: ^2.0.9
# Utility Packages
flutter_secure_storage: ^9.0.0
@@ -26,12 +27,12 @@ dependencies:
intl: ^0.18.1
get_it: ^7.6.7
url_launcher: ^6.2.4
- dio: ^5.4.0
+ dio: ^5.4.1
flutter_localization: ^0.2.0
flutter_bloc: ^8.1.4
firebase_core: ^2.25.4
- firebase_analytics: ^10.8.5
- firebase_crashlytics: ^3.4.14
+ firebase_analytics: ^10.8.6
+ firebase_crashlytics: ^3.4.15
dev_dependencies:
flutter_test: