FlutterMockServer constructor

FlutterMockServer({
  1. required String configPath,
  2. String host = 'localhost',
  3. int port = 8080,
  4. YamlConfigParser? parser,
  5. TemplateEngine? templateEngine,
  6. Random? random,
})

Creates a mock server instance for the provided config file and bind target.

Implementation

FlutterMockServer({
  required this.configPath,
  this.host = 'localhost',
  this.port = 8080,
  YamlConfigParser? parser,
  TemplateEngine? templateEngine,
  Random? random,
})  : _parser = parser ?? YamlConfigParser(),
      _providedTemplateEngine = templateEngine,
      _providedRandom = random,
      _templateEngine = templateEngine ?? TemplateEngine(random: random),
      _random = random ?? Random();