You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.6 KiB
56 lines
1.6 KiB
// Flutter imports:
|
|
import 'package:flutter/material.dart';
|
|
|
|
// Package imports:
|
|
import 'package:provider/provider.dart';
|
|
|
|
// Project imports:
|
|
import 'package:aku_community_manager/mock_models/decoration/decoration_data.dart';
|
|
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
|
import 'package:aku_community_manager/provider/fix_provider.dart';
|
|
|
|
@Deprecated('this mock model should be removed')
|
|
class AllModel {
|
|
BuildContext context;
|
|
AllModel(this.context);
|
|
|
|
List get allThings {
|
|
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
return [
|
|
...fixProvider.fixModels,
|
|
...DecorationData.allModels,
|
|
];
|
|
}
|
|
|
|
List get waitThings {
|
|
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
return [
|
|
...fixProvider.fixModels.where((element) {
|
|
return element.type == FIX_ENUM.WAIT_PICKUP;
|
|
}).toList(),
|
|
...DecorationData.getModels(DecorationType.WAIT_HAND_OUT),
|
|
];
|
|
}
|
|
|
|
List get processingThings {
|
|
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
return [
|
|
...fixProvider.fixModels.where((element) {
|
|
return element.type == FIX_ENUM.PROCESSING;
|
|
}).toList(),
|
|
...DecorationData.getModels(DecorationType.HAND_OUT),
|
|
];
|
|
}
|
|
|
|
List get doneThings {
|
|
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
return [
|
|
...fixProvider.fixModels.where((element) {
|
|
return element.type == FIX_ENUM.DONE;
|
|
}).toList(),
|
|
...DecorationData.getModels(DecorationType.DONE),
|
|
];
|
|
}
|
|
}
|