Skip to content

Conversation

@Levi-Lesches
Copy link

@Levi-Lesches Levi-Lesches commented Apr 10, 2025

Adds a new -r --rotation argument to flutterpi_tool run that mirrors flutter-pi

Closes #44

Copy link
Owner

@ardera ardera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, looks good! Just the FlutterPiToolConfig thing.

What would also be good is if you could specify a rotation when adding a device, since people are probably not rotating their Pi in new ways every time they're launching an app, but rather have a single fixed rotation they want to use for a device (Having the arg for the run command is still useful, since you might want to override)

required this.fs,
required this.logger,
required this.platform,
required this.rotation,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this isn't really clear in the code, but the FlutterPiToolConfig class basically represents the persistent configuration file of the flutterpi_tool, where the devices and their options are stored. I think the rotation might be better fit somewhere else

final Logger logger;
final FlutterpiCache cache;
final MoreOperatingSystemUtils os;
final FlutterPiToolConfig config;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above, maybe instead introduce a final int? rotation member instead, just like the explicitDevicePixelRatio and explicitDisplaySizeMillimeters.

@CodeCuration
Copy link

@ardera Please add the rotation functionality.

@EthanHipps
Copy link

Any updates on this pr?

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

Successfully merging this pull request may close these issues.

Add Rotation

4 participants