Skip to content

can you create a public function for get display size of device? #346

@shixin627

Description

@shixin627

can you create a public function for get display size of device?

Future getDisplaySize() async {
Display primaryDisplay = await screenRetriever.getPrimaryDisplay();
num visibleWidth = primaryDisplay.size.width;
num visibleHeight = primaryDisplay.size.height;

return Size(visibleWidth.toDouble(), visibleHeight.toDouble());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions