0

I have a setting screen, when I change FontFamily it needs to restart the app to change all app fonts, And it restarts after the app closed, but I want to restart the app with a button instead of closing the app. does there any way to do this ?

  • Hello - which IDE are you using ? VsCode ? Android Studio ? Are you running using debug mode ? – Aristidios Jul 23 '21 at 20:49
  • Iam using VsCode and running with debug mode –  Jul 23 '21 at 21:40
  • Here you will find your answer https://stackoverflow.com/questions/50115311/flutter-how-to-force-an-application-restart-in-production-mode – ahmed-m-abdelfatah Jul 24 '21 at 02:05
  • Does this answer your question? [Flutter: how to force an application restart (in production mode)?](https://stackoverflow.com/questions/50115311/flutter-how-to-force-an-application-restart-in-production-mode) – Jannie Theunissen Mar 03 '22 at 06:18

1 Answers1

0

Use this package https://pub.dev/packages/flutter_phoenix and call Phoenix.rebirth(context); when you want to reload the app

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 14 '22 at 01:29