// Flutter imports: import 'package:flutter/material.dart'; // Project imports: import 'package:aku_community_manager/mock_models/outdoor_models/outdoor_model.dart'; class OutdoorProvider extends ChangeNotifier { List _itemOutdoorModel = ItemsOutdoorModel.initList(); List get itemOutdoorModels => _itemOutdoorModel; addOutdoormodel(ItemsOutdoorModel model) { _itemOutdoorModel.insert(0, model); notifyListeners(); } List getOutdoorModels(int index) { return [ _itemOutdoorModel .where((element) => element.status == OUTDOORSTATUS.NOT_OUT) .toList(), _itemOutdoorModel .where((element) => element.status == OUTDOORSTATUS.OUT_DONE) .toList(), _itemOutdoorModel .where((element) => element.status == OUTDOORSTATUS.REJECTED) .toList(), _itemOutdoorModel .where((element) => element.status == OUTDOORSTATUS.CANCELLATION) .toList(), _itemOutdoorModel, ][index]; } }