पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.5.0

device_frame_plus

Flutter पैकेज आम डिवाइस के मॉकअप प्रदान करता है, जिससे डेवलपर्स अपने एप्लिकेशन को सिमुलेटेड डिवाइस फ्रेम में प्रीव्यू और परीक्षण कर सकते हैं।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
5 लाख
लाइक
57
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add device_frame_plus

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

DeviceFramePlus एक Flutter पैकेज है जो डेवलपर्स को Android, iOS, Web, macOS, Windows और Linux के वास्तविक, पूर्व-डिज़ाइन किए गए उपकरण फ्रेम में अपने ऐप इंटरफ़ेस को दिखाने की अनुमति देता है। यह लोकप्रिय उपकरणों के कस्टमाइज़ेबल मॉकअप प्रदान करके UI प्रीव्यू को सरल बनाता है, जो अलग-अलग स्क्रीन आकारों और ओरिएंटेशन में ऐप के दिखावट को देखने में मदद करता है। प्रस्तुतियों, दस्तावेज़ीकरण और शुरुआती डिज़ाइन समीक्षा के लिए उपयुक्त, यह न्यूनतम सेटअप के साथ विकास कार्यप्रवाह को बढ़ाता है। पैकेज को pub.dev के माध्यम से Flutter प्रोजेक्ट में बिना किसी दिक्कत के एकीकृत किया जा सकता है।

उपयोग

  • एपी यूआई प्रीव्यू
  • डिज़ाइन दस्तावेज़
  • प्रस्तुति सामग्री
  • क्रॉस-प्लेटफॉर्म परीक्षण
  • डेवलपर प्रदर्शन

मुख्य विशेषताएँ

  • पूर्वनिर्धारित उपकरण प्रारूप
  • कस्टमाइज़ किए गए फ्रेम शैली
  • बहु-प्लेटफॉर्म समर्थन
  • आसान एकीकरण
  • प्रतिक्रियाशील लेआउट रेंडरिंग

इनके लिए उपयुक्त

  • UI/UX डिजाइनर
  • Flutter विकासकर्ता
  • उत्पाद प्रबंधक
  • तकनीकी लेखक

विचार योग्य बातें

  • स्थिर मॉकअप तक सीमित
  • कोई इंटरैक्टिव डिवाइस व्यवहार नहीं
  • केवल दृश्य संदर्भ के लिए
  • कार्यात्मक परीक्षण के लिए नहीं बनाया गया है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

device_frame_plus

Mockups for common devices.

Quickstart

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

Examples

Usage

Displaying a virtual keyboard

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: // ...
    ),
)
Maintain device media query and theme in an encapsulated app

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),
        ),
    ),
),
Creating a custom generic device

Various generic devices are available as DeviceInfo factories to make it easy to create custom device instances.

Phone
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,
    ),
)
Tablet
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,
    ),
)
Desktop monitor
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,
    ),
)
Laptop
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,
    ),
)

Available devices

Screenshots for all available devices are available in the test/devices directory

Contributing

Edit device frames

All frames are designed in a Figma file.

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट