Now, compare your behavior with your parents' different behavior. There must be differences, whether it's worse or better... the key point is the differences in your attitudes (between the child and the parent). Even though no one guarantees this possibility, gambling in front of kids is still not a positive idea. Don't you have a better goal than doing that in front of your child? There are plenty of other more beneficial activities, like putting together a puzzle or maybe assembling a bike.
At a start in the life of kids, they need to learn things that are positive first and when they get to certain age they socialize themselves into other things but by then they are already knowledgeable on the good ones and when they meet the other side, they know what choice to make, instead having the negative side as the only avenue to learning.
Some fathers gamble and smoke in the presence of the children and that gives the children the impression that it is okay to do that. I believe even in countries where gambling is legal, there is still age limit to start gambling so they don't need to learn it earlier than the age because they will tend to start gambling earlier when they have not mentally mature for it and can gamble away their school fees.
With the development of technology at this time, gambling can be done by anyone regardless of age, unlike gambling in casinos which of course has rules against age limits, but online gambling does not require that, parental supervision of their children will disappear when they grow up because they will have their own thoughts and decide everything around them.
I don't know if this is common but anytime am with my phone and I enter any social app I will always see random videos adverting betting platform, one thing with betting platform they have the best and smart move to advertise their platform even in skit videos I see comedians advertising betting platform.
So keeping our gambling life a secret from our kids that's not enough, but training them and setting a right example for them will be better, educating them about the consequence of playing bet just like what the op did.
That's how marketing ads affects some.people most especially those kids who are into social media. Kid's nowadays are very curious to try everything they see especially if the ads is very catchy with their claims of winning huge prize once you try it, Even some adults can fall into that .Since we're living with this modern technology, It is kinda hard to keep track their activities via phone so parents should know what will be the alternative ways to prevent their kids doing it. Even if a parents is doing well on hiding their gambling activity, their kids can get it from other people especially from those they see on social media so It's better to explain them about it and advice them that gambling is not for kids.