mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
fix flush bugs
This commit is contained in:
@ -9,7 +9,6 @@ import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor
|
|||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
|
import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/device_settings/settings_page.dart';
|
import 'package:syncrow_app/features/devices/view/device_settings/settings_page.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/device_appbar.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_persence_records.dart';
|
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_persence_records.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_sensor_option.dart';
|
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_sensor_option.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||||
@ -20,7 +19,6 @@ import 'package:syncrow_app/utils/context_extension.dart';
|
|||||||
import 'package:syncrow_app/utils/helpers/misc_string_helpers.dart';
|
import 'package:syncrow_app/utils/helpers/misc_string_helpers.dart';
|
||||||
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
|
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
|
||||||
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||||
part "presence_indicator.dart";
|
part "presence_indicator.dart";
|
||||||
part "flush_sensor_options_list.dart";
|
part "flush_sensor_options_list.dart";
|
||||||
@ -33,7 +31,8 @@ class FlushMountedInterface extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (context) => FlushSensorBloc(deviceId: deviceModel.uuid ?? '')
|
create: (context) => FlushSensorBloc(deviceId: deviceModel.uuid ?? '')
|
||||||
..add(FlushSensorInitialEvent()),
|
..add(FlushSensorInitialEvent())
|
||||||
|
..add(FlushSensorInitialDeviseInfo()),
|
||||||
child: BlocBuilder<FlushSensorBloc, FlushSensorState>(
|
child: BlocBuilder<FlushSensorBloc, FlushSensorState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final bloc = BlocProvider.of<FlushSensorBloc>(context);
|
final bloc = BlocProvider.of<FlushSensorBloc>(context);
|
||||||
|
@ -579,7 +579,7 @@ class DevicesAPI {
|
|||||||
.replaceAll('{code}', code),
|
.replaceAll('{code}', code),
|
||||||
showServerMessage: false,
|
showServerMessage: false,
|
||||||
expectedResponseModel: (json) {
|
expectedResponseModel: (json) {
|
||||||
return DeviceReport.fromJson(json);
|
return DeviceReport.fromJson(json['data']);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
return response;
|
return response;
|
||||||
|
Reference in New Issue
Block a user