I don't let my dogs have the snack on the floor. I think it's easier. Once an item is "left," it's left forever (I pick it up.) This way, if I'm walking down the street, or sitting outside a coffee shop and there's food on the ground, once I say "leave it," my dog knows it's off limits forever.
Here's how I do it.
Put a leash on your dog. Toss a treat on the floor a few feet away. Your dog will move toward it. As she gets near it, tell her "leave it," THEN lightly pull her leash and redirect her toward you, who of course have a more wonderful treat (and praise as though she won the Nobel Prize) as a reward (I use biscuits on the floor and scrumptious meaty venison or liver treats as the redirect treats to start off. Then I work up to delicious treats on the floor as well).
Don't pull the leash when you say "leave it." You'll see folks doing this all the time. Then the dog learns to associate "leave it" with "I'm about to be yanked into the proper position." What you want to do, of course, is teach your dog that "leave it" is something she does on her own (with a reward for that good behavior).
When you're first starting out on this training, don't actually give her enough leash to be able to reach the treat on the floor, start a few inches short. Otherwise, you have to reach into her mouth and take the treat out if she does get it. She can't ever take what you've told her to leave. Also, you can't *ever* give her permission to eat something that you've told her to leave. If you later decide that it's ok for her to do so, pick it up, and give it to her, like it's a whole new treat. (I don't do this. I just don't want my dog to get ideas that food that has been the subject of a leave it is ever edible. And I'm always packing treats. But if you run out, it's an option.)
Then, you can easily work up to toys, cats, squirrels, children, whatever. Leave it, means leave it. Now and forever.
Just another way of doing it.