> ## Documentation Index
> Fetch the complete documentation index at: https://starrycodes.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# BuildContext - Platform Extensions

> Instantly check which OS your app is running on (Mobile, Desktop, or specific OS) using simple, direct context getters.

<Warning>
  Since these getters rely on dart:io.Platform, they will throw an error when compiled for the web. Ensure you only use these methods in mobile and desktop applications.
</Warning>

<br />

{/*     title="⚡ Quick Usage" */}

{/* > */}

{/* // Mobile vs. Desktop */}

{/* // OS-specific UI */}

{/*   // Use Cupertino widgets */}

{/* ``` */}

<Steps titleSize="h3">
  <Step title="📱 Platform Type">
    {/*  isMobile */}

    <ResponseField name="isMobile" type="bool">
      Checks if the application is running on a mobile OS (Android or iOS).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isMobile) { ... }
      ```
    </ResponseField>

    {/*  Desktop */}

    <ResponseField name="isDesktop" type="bool">
      Checks if the application is running on a desktop OS (Windows, Linux, or macOS).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isDesktop) {
        // Use a wider, more complex sidebar layout
      }
      ```
    </ResponseField>
  </Step>

  <Step title="🍎 Specific Operating System">
    {/* IOS */}

    <ResponseField name="isIOS" type="bool">
      Checks if the application is running on an iOS device.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isIOS) { ... }
      ```
    </ResponseField>

    {/* Android */}

    <ResponseField name="isAndroid" type="bool">
      Checks if the application is running on an Android device.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isAndroid) { ... }
      ```
    </ResponseField>

    {/* MacOS */}

    <ResponseField name="isMacOS" type="bool">
      Checks if the application is running on a macOS desktop environment.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isMacOS) { ... }
      ```
    </ResponseField>

    {/* Widnows */}

    <ResponseField name="isWindows" type="bool">
      Checks if the application is running on a Windows desktop environment.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isWindows) { ... }
      ```
    </ResponseField>

    {/* Linux */}

    <ResponseField name="isLinux" type="bool">
      Checks if the application is running on a Linux desktop environment.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isLinux) { ... }
      ```
    </ResponseField>

    {/* isFuchsia */}

    <ResponseField name="isFuchsia" type="bool">
      Checks if the application is running on the experimental Fuchsia OS.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      if (context.isFuchsia) { ... }
      ```
    </ResponseField>
  </Step>
</Steps>
