Fix bugs in app
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:app_settings/app_settings.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../extention/context_extention.dart';
|
||||
import '../../../extension/context_extension.dart';
|
||||
import '../../../services/language_services.dart';
|
||||
|
||||
class RequestPermissionDialog {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import '../../../feature/sound_notification_test/notification_bloc.dart';
|
||||
import '../../../feature/sound_notification_test/notification_screen.dart';
|
||||
import '../../../bloc/device_detail_bloc.dart';
|
||||
import '../../../feature/devices/device_detail/device_detail_screen.dart';
|
||||
import '../../../bloc/device_notification_settings_bloc.dart';
|
||||
@@ -153,14 +151,6 @@ GoRouter goRouter() {
|
||||
),
|
||||
transitionsBuilder: transitionsRightToLeft),
|
||||
),
|
||||
GoRoute(
|
||||
path: "/notification",
|
||||
name: 'notification',
|
||||
builder: (context, state) => BlocProvider(
|
||||
child: const NotificationScreen(),
|
||||
blocBuilder: () => NotificationBloc(),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"button_fake_fire_message": "False fire alarm",
|
||||
"in_progress_message": "In progress",
|
||||
"smoke_detecting_message": "Smoke detecting!",
|
||||
"low_battery_message": "Low Battery!",
|
||||
"smoke_detecting_message_lowercase": "smoke detecting!",
|
||||
"disconnect_message_uppercase": "Disconnected",
|
||||
"disconnect_message_lowercase": "disconnected",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"button_fake_fire_message": "Cháy giả?",
|
||||
"in_progress_message": "Đang xử lý",
|
||||
"smoke_detecting_message": "Phát hiện khói!",
|
||||
"low_battery_message": "Cảnh báo pin yếu!",
|
||||
"smoke_detecting_message_lowercase": "Phát hiện khói!",
|
||||
"disconnect_message_uppercase": "Mất kết nối",
|
||||
"disconnect_message_lowercase": "mất kết nối",
|
||||
|
||||
@@ -282,7 +282,7 @@ class APIServices {
|
||||
return data;
|
||||
}
|
||||
|
||||
Future<String> getOwnerDevieByState(Map<String, dynamic> params) async {
|
||||
Future<String> getOwnerDeviceByState(Map<String, dynamic> params) async {
|
||||
String? data = await NetworkManager.instance!
|
||||
.getDataFromServerWithParams(APIPathConstants.DEVICE_PATH, params);
|
||||
return data;
|
||||
|
||||
@@ -128,8 +128,6 @@ class NotificationServices {
|
||||
|
||||
void handleMessage(String? payload) {
|
||||
dev.log("Handling notification tap with payload: $payload");
|
||||
// Thêm logic xử lý khi nhấn thông báo ở đây
|
||||
// Ví dụ: Điều hướng màn hình hoặc xử lý dữ liệu
|
||||
}
|
||||
|
||||
Future<void> setupInteractMessage() async {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../extention/context_extention.dart';
|
||||
import '../extension/context_extension.dart';
|
||||
|
||||
InputDecoration borderRadiusTopLeftAndBottomRight(
|
||||
BuildContext context, String hintText) =>
|
||||
|
||||
@@ -2,10 +2,10 @@ import 'dart:developer';
|
||||
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sfm_app/bloc/devices_manager_bloc.dart';
|
||||
import 'package:sfm_app/feature/devices/device_model.dart';
|
||||
import 'package:sfm_app/product/extention/context_extention.dart';
|
||||
import 'package:sfm_app/product/services/language_services.dart';
|
||||
import '../../bloc/devices_manager_bloc.dart';
|
||||
import '../../feature/devices/device_model.dart';
|
||||
import '../extension/context_extension.dart';
|
||||
import '../services/language_services.dart';
|
||||
|
||||
import '../constant/app/app_constants.dart';
|
||||
|
||||
@@ -54,18 +54,18 @@ class _SharedPieChartState extends State<SharedPieChart> {
|
||||
aspectRatio: 1,
|
||||
child: PieChart(
|
||||
PieChartData(
|
||||
pieTouchData: PieTouchData(
|
||||
touchCallback: (FlTouchEvent event, pieTouchResponse) {
|
||||
if (!event.isInterestedForInteractions ||
|
||||
pieTouchResponse == null ||
|
||||
pieTouchResponse.touchedSection == null) {
|
||||
return;
|
||||
}
|
||||
int newTouchedIndex =
|
||||
pieTouchResponse.touchedSection!.touchedSectionIndex;
|
||||
updateDevicesOnTapPieChart(newTouchedIndex);
|
||||
},
|
||||
),
|
||||
// pieTouchData: PieTouchData(
|
||||
// touchCallback: (FlTouchEvent event, pieTouchResponse) {
|
||||
// if (!event.isInterestedForInteractions ||
|
||||
// pieTouchResponse == null ||
|
||||
// pieTouchResponse.touchedSection == null) {
|
||||
// return;
|
||||
// }
|
||||
// int newTouchedIndex =
|
||||
// pieTouchResponse.touchedSection!.touchedSectionIndex;
|
||||
// updateDevicesOnTapPieChart(newTouchedIndex);
|
||||
// },
|
||||
// ),
|
||||
sections: [
|
||||
PieChartSectionData(
|
||||
color: Colors.grey,
|
||||
@@ -96,7 +96,7 @@ class _SharedPieChartState extends State<SharedPieChart> {
|
||||
titleStyle: titleStyle,
|
||||
),
|
||||
PieChartSectionData(
|
||||
color: Colors.black, // Có thể thêm màu cho trạng thái lỗi
|
||||
color: Colors.black,
|
||||
value: errorCount.toDouble(),
|
||||
title: errorCount.toString(),
|
||||
radius: context.dynamicWidth(0.2),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sfm_app/product/extention/context_extention.dart';
|
||||
import 'package:sfm_app/product/extension/context_extension.dart';
|
||||
import 'package:top_snackbar_flutter/custom_snack_bar.dart';
|
||||
import 'package:top_snackbar_flutter/top_snack_bar.dart';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user