Fish will continue to cook for a minute or two off the heat. If you cook it until it flakes it will dry out and get tough. It is cooked perfectly when moist and silky. Be sure to remove it from the heat when the fish is just shy of done; otherwise, it will overcook by the time you serve it. Many recipes say 10 minutes for each inch but I usually go with 8 minutes, you can always put it back. You don’t need a ruler, just guess.
Use the tip of a small knife to look at the interior of the fish. See how easily it begins to flake. It should give way slightly but still be somewhat firm. Always check on the thickest part of the fish. If the fish is on the bone it should still be holding onto the bone and be very slightly translucent. Check your fish every minute if you think it is close to done.
When fish is raw it is translucent. As it cooks it turns opaque. Since the fish will continue to cook after you remove it from the heat you want it to be slightly translucent.
If you cut a fish fillet into several pieces, some might end up thinner than others these should be taken off heat first. To avoid this, buy the front end of the fillet that has less variation in thickness or fold the thinner end under to make it even thickness.
Firm and dense fish, like striped bass, mahi-mahi, and swordfish do not flake easily. Be assertive when pulling the flakes apart. If you have to, make a small incision in the fish with a knife.
I usually cook tuna and salmon less as I like them to be slightly raw in the center. So when I remove them from the heat they are still translucent in the center and opaque on the outside.