Enhanced gas–sensing properties and sensing mechanism of the foam structures assembled from NiO nanoflakes with exposed {1 1 1} facets