device_frame 0.3.0-prerelease8 copy "device_frame: ^0.3.0-prerelease8" to clipboard
device_frame: ^0.3.0-prerelease8 copied to clipboard

outdated

Mockups for common devices.

device_frame #

Device Frame for Flutter

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,
                ),
            ),
        ),
    ),
),