There are several ways this can be done.
The main thing is to explicitly set the locale prop of the MaterialApp widget on language change.
Below, you can find an example of how to do that using the provider package.
Note: For more details, please check out an example on GitHub.