Spring flowers mean close-ups to photographers. Close-ups mean problems with getting the subject in focus. The best way to control focus is to use a single-lens reflex camera on a tripod and accurately preview the focus while making adjustments. That’s a good approach if you are not in a public garden with your wife saying “Are you done yet?” There is a strategy for getting the job done quickly with a pocket camera.
Even if your pocket camera has an optical viewfinder, you cannot use it because the viewfinder sees an image offset by an inch or so from the lens. If you are trying to fill the frame with a flower that’s an inch in diameter, that’s fatal. You must use the LCD viewscreen, but the viewscreen has a low resolution, and may be partially washed out by sunlight, so that it’s difficult to detect anything more subtle than a complete loss of focus. The bottom line is that you must trust the automatic focus.
Remember to put the camera in close-up mode. On most pocket cameras that’s done by pressing on a button that has an icon of a flower. You will have to check the manual or experiment under friendly conditions to determine how close to the subject that allows. With many current cameras you can get as close as a few inches; with some even closer.
Usually pressing the shutter halfway kicks the automatic focus into action. With close-ups, its helpful to do that a second before taking the picture to give the focus mechanism extra time to ponder the situation.
Here is what can happen when you let the auto focus do its best:

The flower is about an inch across. The camera decided to focus on the nearest petal of the flower, leaving the rest of the flower out of focus. The trick is to make sure that as much of the subject is parallel to the focal plane of the camera, which is perpendicular to the lens. This accomplishes two things. It provides a lot of leeway on having most of the image in focus no matter how the camera decides to optimize focus. It also ensures that whatever depth-of-field is available will include as much of the subject as possible.

You may wonder about those shadow lines on the flower. One explanation is that I ignored them because I needed examples for a blog post. Another explanation is that they artfully symbolize the encroachment of civilization as a corrupting influence on nature. Take your choice.
The subject does not have to be nearly flat for the technique to work. What matters is that a substantial part of it, maybe two-thirds, is nearly in a plane so that the auto-focus will be able to function reasonably well.
Our final example was taken hand held of a flower less than an inch in diameter, and to make matters worse it was in open shade and swaying a little in the breeze. The location in shadow causes the lens to open up, producing less depth of focus. To help, I stayed back from the subject a little further than necessary. I relied on the high resolution of the camera to allow cropping out two-thirds of the image while still leaving reasonable resolution.

And whatever you do, do it quickly.