/// Defines and manages the different services used by the app.
library;


import "src/services/api.dart";
import "src/services/service.dart";
import "src/services/maps.dart";

/// A [Service] that manages all other services used by the app.
class Services extends Service {
	/// Prevents other instances of this class from being created.
	Services._();

  // Define your services here
  final api = ApiService();

  final maps = GoogleMapsService();

	/// The different services to initialize, in this order.
	List<Service> get services => [api, maps];

	@override
	Future<void> init() async {
		for (final service in services) {
      await service.init();
    }
	}
}

/// The global services object.
final services = Services._();
