setDiscoverySplash method

Future<void> setDiscoverySplash(
  1. File discoverySplash, {
  2. String? reason,
})

Set the server's discovery splash.

await server.assets.setDiscoverySplash(File('discovery_splash.png'), reason: 'Testing');

Implementation

Future<void> setDiscoverySplash(File discoverySplash,
    {String? reason}) async {
  final discoverySplashAsset = ImageAsset.makeAsset(discoverySplash);
  await _serverPart.updateServer(
      serverId, {'discovery_splash': discoverySplashAsset.makeUrl()}, reason);
}