flutter_glove_box
flutter_glove_box copied to clipboard
Introduce support for `TargetPlatform`
Description
Introduce support for overriding TargetPlatform
using the debugDefaultTargetPlatformOverride
.
Proposal
Introduce a non-required platform
(TargetPlatform
) property in Device
.
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 ?~~
@tsimbalar if I understand you correctly, we are indeed saying the same thing right?
@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
@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.
Hey @coreysprague
Sorry for the delay, missed the notification.
Indeed, it would be more appropriate with the multiScreenGolden
API
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.