import 'package:fcs/data/provider/package_data_provider.dart';
import 'package:fcs/domain/entities/connectivity.dart';
import 'package:fcs/domain/entities/package.dart';
import 'package:flutter/material.dart';

import 'package_service.dart';

class PackageServiceImp implements PackageService {
  PackageServiceImp({
    @required this.connectivity,
    @required this.packageDataProvider,
  });

  final Connectivity connectivity;
  final PackageDataProvider packageDataProvider;

  @override
  Future<void> createPackages(List<Package> packages, String fcsID) {
    return packageDataProvider.createPackages(packages, fcsID);
  }

  @override
  Future<List<Package>> searchPackage(String term) {
    return packageDataProvider.searchPackage(term);
  }

  @override
  Future<void> deletePackage(Package package) {
    return packageDataProvider.deletePackage(package);
  }
}
