device_frame_plus
Flutter पैकेज आम डिवाइस के मॉकअप प्रदान करता है, जिससे डेवलपर्स अपने एप्लिकेशन को सिमुलेटेड डिवाइस फ्रेम में प्रीव्यू और परीक्षण कर सकते हैं।
सामान्य उपकरणों के मॉकअप।
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Mockups for common devices.
Wrap any widget in a DeviceFrame widget and give it a device (multiple devices are available from the Device accessors).
DeviceFrame(
device: Devices.ios.iPhone11,
isFrameVisible: true,
orientation: Orientation.portrait,
screen: Container(
color: Colors.blue,
child: Text('Hello'),
),
)
|
|
|
To display a generic simulated virtual keyboard, simply wrap any widget in a VirtualKeyboard.
DeviceFrame(
device: Devices.ios.iPhone11,
orientation: orientation,
screen: VirtualKeyboard(
isEnabled: true,
child: // ...
),
)
To make sure that a WidgetsApp uses the simulated MediaQuery from the simulated devices, set its useInheritedMediaQuery property to true.
DeviceFrame(
device: Devices.ios.iPhone11,
orientation: orientation,
screen: Builder(
builder: (deviceContext) => MaterialApp(
useInheritedMediaQuery: true,
theme: Theme.of(context),
),
),
),
Various generic devices are available as DeviceInfo factories to make it easy to create custom device instances.
DeviceInfo.genericPhone(
platform: TargetPlatform.android,
name: 'Medium',
id: 'medium',
screenSize: const Size(412, 732),
safeAreas: const EdgeInsets.only(
left: 0.0,
top: 24.0,
right: 0.0,
bottom: 0.0,
),
rotatedSafeAreas: const EdgeInsets.only(
left: 0.0,
top: 24.0,
right: 0.0,
bottom: 0.0,
),
)
DeviceInfo.genericTablet(
platform: TargetPlatform.android,
name: 'Medium',
id: 'medium',
screenSize: const Size(1024, 1350),
safeAreas: const EdgeInsets.only(
left: 0.0,
top: 24.0,
right: 0.0,
bottom: 0.0,
),
rotatedSafeAreas: const EdgeInsets.only(
left: 0.0,
top: 24.0,
right: 0.0,
bottom: 0.0,
),
)
DeviceInfo.genericDesktopMonitor(
platform: TargetPlatform.windows,
name: 'Wide',
id: 'wide',
screenSize: const Size(1920, 1080),
windowPosition: Rect.fromCenter(
center: const Offset(
1920 * 0.5,
1080 * 0.5,
),
width: 1620,
height: 780,
),
)
DeviceInfo.genericLaptop(
platform: TargetPlatform.windows,
name: 'Laptop',
id: 'laptop',
screenSize: const Size(1920, 1080),
windowPosition: Rect.fromCenter(
center: const Offset(
1920 * 0.5,
1080 * 0.5,
),
width: 1620,
height: 780,
),
)
Screenshots for all available devices are available in the test/devices directory
All frames are designed in a Figma file.
निर्भरता सूची 3 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗