This repository contains test of platform channels in Flutter. As the use case the device light sensor is used. When there is no light, the color of the whole screen is dark, if not, the screen is light (almost white). Also the font size is changed based on the value of lux. Look at the Android MainActivity file to see an implementation from the native side.
Flutter is 💙!