Fix bugs in app
This commit is contained in:
@@ -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