bizz84 / bizz84/firebase_auth_demo_flutter
Improvement that enables developer to test iOS styles on Android
- Dominant language
- Dart
- Stars
- 674
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Within your [`lib/common_widgets/platform_widget.dart`](https://github.com/bizz84/firebase_auth_demo_flutter/blob/master/lib/common_widgets/platform_widget.dart#L13) 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:
```dart
if(Platform.isIOS) {
```
to:
```dart
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.