makeURL static method

String makeURL({
  1. required RolleeUrlType type,
  2. required bool isProduction,
})

This method returns the URL based on the type of URL and the isProduction flag.

example:

final url = RolleeHelpers.makeURL(
 type: RolleeUrlType.config,
 isProduction: false,
);
print(url); // ...

Implementation

static String makeURL({
  required RolleeUrlType type,
  required bool isProduction,
}) {
  String url = isProduction
      ? productionUrlBasedOnUrlType(type)
      : developmentUrlBasedOnUrlType(type);

  url += _endpointBasedOnType(type);

  RolleeLogger.connectLog("URL created: $url");

  return url;
}