In the Elizabethan era, Shakespeare often used flower meaning in his plays, but they weren't always light-hearted. In Hamlet, flowers and their symbolism were pivotal. When Ophelia distributed flowers and herbs to her family during her climactic scene, she said, "There's rosemary, that's for remembrance. Pray you, love, remember. And there is pansies, that's for thoughts."
She then passed out fennel (infidelity), columbines (false flattery), rue (sadness or regret), daisies (innocence) and withered violets (faithfulness, but wilted, indicating a lack thereof.)
Most of these flowers and herbs had similar meanings throughout history beginning with the Greeks and Romans which were then handed down through the ages. Shakespeare's audience would inherently understand Ophelia's floral folklore.
Later, when Ophelia drowned, she wore a garland of "crow-flowers, nettles, daisies and long purples." There's some dispute among scholars about "crow-flowers," but nettles were considered a weed, and so signify wastefulness, maybe the wastefulness of her death or life.
Flower meaning can also be revolutionary. From the Qing dynasty in 1903, China's traditional floral emblem was the peony. After the last Chinese Revolution in 1949, the Republic of China (Taiwan), in 1964, formally adopted the plum blossom, Prunus mume, as its national floral emblem.
While peonies were symbolic of kings, royalty, and fertility, according to leaders in Taiwan, the plum blossom symbolized "resiliency and perseverance in adversity" because it blooms early, and can survive harsh winters. The People's Republic of China (mainland China) has not adopted a floral emblem, but the peony remains popular throughout Asia.