Oh my, I'm so sorry, I just read this post. How terrible to lose both your babies, but please don't blame yourself, you didn't know. It was a mistake that is common and hopefully others will read this post and it will stop them from making the same mistake, so you're helping in that way, though I know that's of little comfort.
Just to add something for others reading this post to learn from, please, please, everyone that has any type of pet or a child in the house (or even for yourself) should run to the drugstore or Walmart (cheaper) and in the medical supply section or the vitamin/supplement section you'll find bottles of "Activated Charcoal", usually it comes in either tablets that need to be crushed into a very fine powder, or it's already in powder form, so you just have to mix the powder with water and force-feed it to whomever ate something toxic or poisonous as quickly as you possibly can. The charcoal then absorbs everything in their stomach and prevents it from being absorbed into their bloodstream, and then it will carry the toxin/poison out of their body. If you get it in them quickly after they ingest the toxin/poison (usually within an hour of ingesting something you can still absorb a good bit of whatever it is, especially if the animal has a slow metabolism) you can typically save them, also give them lots of water with the Activated Charcoal.
Always keep a bottle of the Activated Charcoal in your house in a spot where you'll remember where it is.
Again, I'm so very sorry for your losses, we'll be thinking about you. Please do not be too hard on yourself about this, it's a very common mistake. I'd bet that the average Bearded Dragon owner doesn't know that onion is toxic to Dragons. It's really not your fault...