setBackgroundColor method

Future<void> setBackgroundColor(
  1. Color color
)

Sets the background color to the provided color.

Due to a limitation of the underlying WebView implementation, semi-transparent values are not supported. Any non-zero alpha value will be considered as opaque (0xff).

Implementation

Future<void> setBackgroundColor(Color color) async {
  if (_isDisposed) {
    return;
  }
  assert(value.isInitialized);
  return _methodChannel.invokeMethod(
      'setBackgroundColor', color.value.toSigned(32));
}