mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
20 lines
654 B
Dart
20 lines
654 B
Dart
import 'package:syncrow_web/pages/analytics/models/occupacy.dart';
|
|
import 'package:syncrow_web/pages/analytics/params/get_occupancy_param.dart';
|
|
import 'package:syncrow_web/pages/analytics/services/occupacy/occupacy_service.dart';
|
|
|
|
class FakeOccupacyService implements OccupacyService {
|
|
@override
|
|
Future<List<Occupacy>> load(GetOccupancyParam param) async {
|
|
return await Future.delayed(
|
|
const Duration(seconds: 1),
|
|
() => List.generate(
|
|
30,
|
|
(index) => Occupacy(
|
|
date: DateTime.now().subtract(Duration(days: index)).toString(),
|
|
occupancy: ((index / 100)).toString(),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|