getServerFile function

Future<File> getServerFile()

Implementation

Future<File> getServerFile() async {
  final appName = await getAppName();
  final path = join('bin', '$appName.dart');
  final file = File(path);
  if (!file.existsSync()) {
    throw StateError(
      'Server file does not exist. Please create a bin/$appName.dart file.',
    );
  }
  return file;
}