add fillHeight option to setBackgroundImage

This commit is contained in:
Nick Fisher
2023-09-15 13:00:58 +08:00
parent 3312b88f0a
commit f72ffd6c6a
5 changed files with 23 additions and 8 deletions

View File

@@ -131,11 +131,11 @@ class FilamentController {
await _channel.invokeMethod("clearBackgroundImage");
}
Future setBackgroundImage(String path) async {
Future setBackgroundImage(String path, {bool fillHeight = false}) async {
if (_viewer == null || _resizing) {
throw Exception("No viewer available, ignoring");
}
await _channel.invokeMethod("setBackgroundImage", path);
await _channel.invokeMethod("setBackgroundImage", [path, fillHeight]);
}
Future setBackgroundColor(Color color) async {