Is there a way to add semicolons automatically when inserting a function in JetBrains IDEs? such as Android Studio and IntelliJ IDEA etc.

(in the example here I am using Flutter in Android Studio)
When I press Enter it adds the function, but the semicolon is missing. I know that it's not a big deal nor a problem but why not?! Maybe someone has the answer.

You can try using
Ctrl-Shift-Enter(Windows/Linux) orCommand-Shift-Enter(macOS).Feel free to upvote on the related request in JetBrains issues tracker https://youtrack.jetbrains.com/issue/IDEA-260065