Selectively use flat buttons or contained buttons, depending on the situation. Don’t use both a flat button and contained button together on a single screen.
Use a flat button to avoid making an unnecessary layer in a toolbar, dialog, etc.
Use a contained button to emphasize features that the user might miss on a complex screen. In most cases, contained buttons are applied to a flat layout by adding colors. Use a contained button when it is difficult to distinguish the button from the other texts and images in the body.