device_frame 0.3.0-prerelease4 device_frame: ^0.3.0-prerelease4 copied to clipboard
Mockups for common devices.
device_frame #
Mockups for common devices.
Quickstart #
DeviceFrame.identifier(
identifier: Devices.ios.iPhone11,
isFrameVisible: true,
orientation: Orientation.portrait,
screen: Container(
color: Colors.blue,
child: Text('Hello Android'),
),
)
Usage #
Displaying virtual keyboard #
DeviceFrame.identifier(
identifier: Devices.ios.iPhone11,
orientation: orientation,
screen: VirtualKeyboard(
isEnabled: true,
child: // ...
),
)
Maintain device media query and theme in an encapsulated app #
DeviceFrame.identifier(
identifier: Devices.ios.iPhone11,
orientation: orientation,
screen: Builder(
builder: (deviceContext) => MaterialApp(
theme: Theme.of(context),
builder: (context, widget) => MediaQuery(
data: MediaQuery.of(deviceContext),
child: Theme(
data: Theme.of(deviceContext),
child: widget,
),
),
),
),
),