What I did was, trampoline it

. I did my first frontflip on a trampoline, I think I just did it. You can't really hurt your head much. Backflips I learned off of a diving board, I tried a back dive, over rotated, then I tried a backflip and it worked. Remember to load up on the tutorials. Backflips on trampolines took me like 2 years to be brave enough to try it. Then I pushed off the side and landed near the edge so I was done doing backflips for another year or two. If you have access to a gymnasium and crash mats they help a lot. I had to relearn backflips on a trampoline after I thought I had them down because I clipped my feet on the netting because I was moving back.
So this is how I learned them (if I remember):
1.) Start out walking up near the edge of the trampoline, push up and off of your leg, look over your shoulder. Get comfortable with that.
2.) Then I leaned backflips to side flips is what I called them. basically is that you walk up (about a step) jump, look over your shoulder while going back. you end up doing a side flip.
3.) Once your comfortable with those try doing them without the walk up, its a it more scary.
4.) This is pretty much the point where you just have to go for it. If your just pushing off the edge all you have to do is look backwards. You will go really far on your trampoline, so I don't suggest it if you have a circle one.
5.) Work standing backflips, or with a few small jumps. Kind of throw your hips foward and look backwards. You throw your hips froward before. It'll take a it off tweaking before you get it right.
REMEMBER TO LOAD UP ON TUTORIALS AND VISUALIZE YOUR SELF DOING THEM!!! VISUALIZE YOURSELF DOING THEM WITH PERFECT FORM! Many people skip that, but it helped me a lot!