Functional high-k nanocomposite dielectrics for flexible transistors and inverters with excellent mechanical properties