firebase_auth_demo_flutter icon indicating copy to clipboard operation
firebase_auth_demo_flutter copied to clipboard

Improvement that enables developer to test iOS styles on Android

Open mark-veenstra opened this issue 5 years ago • 0 comments

Within your lib/common_widgets/platform_widget.dart you test if the Platform.isIOS, which is absolutely correct for testing the real Platform. But with the Flutter Inspector you can also change the platform to iOS to test the iOS interface on Android.

If you would change the line:

if(Platform.isIOS) {

to:

if(Platform.isIOS || Theme.of(context)?.platform == TargetPlatform.iOS) {

Then during debugging you can also test iOS styles on Android and visa versa. Without this change the AlertDialog is always the Material one. With the change, you will see the Cupertino dialog.

mark-veenstra avatar Dec 04 '19 14:12 mark-veenstra