init static method

Overlay init({
  1. required Brightness brightness,
  2. required VoidCallback refresh,
  3. required ValueChanged<Overlay> changeOverlay,
})

Implementation

static Overlay init({
  required Brightness brightness,
  required VoidCallback refresh,
  required ValueChanged<Overlay> changeOverlay,
}) {
  _refresh = refresh;
  _changeOverlay = changeOverlay;
  return (brightness.isLight ? LightOverlay() : DarkOverlay())..apply();
}