The speaker says that he is unable to answer the child, but in fact, he then launches into a series of metaphors, in which he imagines the grass as a number of things. First, he describes it as "the flag of my disposition," suggesting that his nature, like the grass, is verdant, hopeful, and ever growing; next, he calls it God's "handkerchief," as if it were a gift given to us by God and filled with his essence and his personality in the same way that a handkerchief might smell of its owner and be embroidered with his or her initials.
A further metaphor describes the grass as itself a child, the offspring of the earth. It is also a "uniform hieroglyphic"—and this metaphor in particular does contain some socio-cultural context relevant to Whitman's time. The speaker notes that grass grows alike in all "zones," whether populated by black or white. Remember that Whitman lived through, and served in hospitals during, the American Civil War. The country has never been more divided at any point than during this period, and there were, of course, particular tensions related to race. Note also the reference to the "young men" "taken soon" from their families —this could be construed as a reference to the young men wounded by war, the "dead young men and women" Whitman looked after.