If darkness is cast on a breakable object such as a clay flask of oil, and an action is then used to smash the flask on the floor, what would happen to the spell? Would it still remain active on each shard of the flask, and therefore be a way to cover more area?
The spell goes away.
An "object" is not well defined in the system (discussion here), so it's likely up to a DM's ruling.
However, I would rule that a broken object is not the same as the original object. After you smash the flask, there is no object left that's "the flask". Instead, there remain many objects that are "pieces of the flask". Because the object that the spell was cast on no longer exists, the spell is dispelled.
I think that this is consistent with the game rules. After all, if it were the same item, you would be able to interact with all of the broken shards at once as your free object interaction.
The description of the darkness spell states that the darkness comes from a point on the object, not the object itself. So I would say that whatever broken off piece has that point on it, would still emanate darkness.
The rules don't say what happens to a spell when its target is changed or destroyed. The DM would have to make a ruling.
That said; the idea that the spell would copy onto all the pieces of the original is highly abusable. You don't want someone to cast Glyph of Warding on something and then smash the object to get a dozen copies of it. That would seriously ruin an intruders day. (And remember; the PCs are the intruders for most of their career...)
Probably the most logical thing would be to say that the spell dissipates when someone smashes the enchanted object; that's also what would happen if you were to smash a magic item.