computeSystemOverlayStyle function

SystemUiOverlayStyle computeSystemOverlayStyle(
  1. Color color
)

System overlay should be opposite to the brightness of the background color.

Implementation

SystemUiOverlayStyle computeSystemOverlayStyle(Color color) {
  return (color.isDark ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark)
      .copyWith(
    statusBarColor: Colors.transparent,
  );
}