Volatile organic compound detection through stimuli-responsive macromolecular materials