setBackgroundImage method

  1. @override
Future setBackgroundImage(
  1. String path, {
  2. bool fillHeight = false,
})
override

Implementation

@override
Future setBackgroundImage(String path, {bool fillHeight = false}) async {
  final imageData = await FilamentApp.instance!.loadResource(path);
  await getBackgroundImage();

  bool isKtx = path.endsWith(".ktx");
  if (isKtx) {
    final bundle = await FFIKtx1Bundle.create(imageData);
    await _backgroundImage!.setImageFromKtxBundle(bundle);
  } else {
    await _backgroundImage!.setImage(imageData);
  }
  return (_backgroundImage!.width!, _backgroundImage!.height!);
}