Bad:
if(!context.mounted) return;
Good:
if(!mounted) return;
if you check context.mounted and your context is already popped(if i press the back button) then you will get an exception and your app will be crashed.
always use mounted if you want to check your current context is not popped.
safe and secure.