Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce support for TargetPlatform #157

Open
jogboms opened this issue Jul 29, 2022 · 6 comments
Open

Introduce support for TargetPlatform #157

jogboms opened this issue Jul 29, 2022 · 6 comments

Comments

@jogboms
Copy link

jogboms commented Jul 29, 2022

Description

Introduce support for overriding TargetPlatform using the debugDefaultTargetPlatformOverride.

Proposal

Introduce a non-required platform(TargetPlatform) property in Device.

@tsimbalar
Copy link
Contributor

tsimbalar commented Aug 1, 2022

IGNORE THIS MESSAGE ... I misunderstood the original one

I wonder if the "platform" should just be part of Device ?

https://github.com/eBay/flutter_glove_box/blob/master/packages/golden_toolkit/lib/src/device.dart

i.e. when you say on which device you want to run your test, that device might be a iOS or Android device, and therefore we want the app to behave accordingly ?

@jogboms
Copy link
Author

jogboms commented Aug 1, 2022

@tsimbalar if I understand you correctly, we are indeed saying the same thing right?

@tsimbalar
Copy link
Contributor

@jogboms oh, my bad I didn't read properly the second part of the message ... I went too fast 🏃 . Yes we are saying the same thing ... will update (or delete?) my comment

@coreysprague
Copy link
Contributor

@jogboms can you elaborate more on your expected/desired behavior?

I believe we could make something like this work for multiScreenGolden, but I don't think it's possible for some of the APIs, such as deviceBuilder.

@jogboms
Copy link
Author

jogboms commented Aug 31, 2022

Hey @coreysprague

Sorry for the delay, missed the notification.

Indeed, it would be more appropriate with the multiScreenGolden API

@maBarabas
Copy link

I would like to use this feature to generate screenshots for the app store. In the current release (0.15.0) every screenshot uses the Android platform adaptations in a MaterialApp. I would like some Devices to use the iOS platform adaptations instead (BackButton has a different icon, and AppBar puts the label in the centre of the screen rather than aligning to the left).

This would be used with the multiScreenGolden function.

A new TargetPlatform platform parameter on Device sounds ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants