Materials having sensing or indicating function