mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 22:44:54 +00:00
Refactor API endpoint for getting device reports and fix the record title
This commit is contained in:
@ -119,7 +119,7 @@ class FlushSensorBloc extends Bloc<FlushSensorEvent, FlushSensorState> {
|
||||
Emitter<FlushSensorState> emit) async {
|
||||
emit(FlushSensorLoadingInitialState());
|
||||
try {
|
||||
await DevicesAPI.getDeviceReports(deviceId, event.code).then((value) {
|
||||
await DevicesAPI.getReports(deviceId, event.code).then((value) {
|
||||
emit(FlushSensorDeviceReportsState(
|
||||
deviceReport: value, code: event.code));
|
||||
});
|
||||
|
||||
@ -23,7 +23,7 @@ class FlushPresenceRecords extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultScaffold(
|
||||
title: title,
|
||||
title: 'Presence Record',
|
||||
child: BlocProvider(
|
||||
create: (context) => FlushSensorBloc(deviceId: deviceId)
|
||||
..add(FlushSensorGetDeviceReportsEvent(
|
||||
|
||||
@ -61,7 +61,7 @@ class FlushMountedInterface extends StatelessWidget {
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
),
|
||||
child: DefaultScaffold(
|
||||
title: deviceModel.name!,
|
||||
title: FlushSensorBloc.deviceName,
|
||||
actions: [
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
|
||||
Reference in New Issue
Block a user