flutter_device_separator 1.0.0 copy "flutter_device_separator: ^1.0.0" to clipboard
flutter_device_separator: ^1.0.0 copied to clipboard

Platformweb

This package allows you to change widgets for each device (PC, tablet, mobile).

Motivation #

Current support is web only. In the future, it plans to support a variety of platforms.
This package allows you to change widgets for each device (PC, tablet, mobile).

Getting started #

Add dependency.

dependencies:
  flutter_device_separator: ^1.0.0

Usage #

import 'package:flutter_device_separator/flutter_device_separator.dart';

DeviceSeparatorWidget(
  // Specify widget for PC.
  pc: buildPCWidget(),
  // Specify widget for Tablet.
  tablet: buildTabletWidget(),
  // Specify widget for Mobile.
  mobile: buildMobileWidget(),
  // Specify widget for orElse. If mobile is null and the user is using mobile, display this widget.
  orElse: buildOrElseWidget(),
)

Additional information #

Device is determined by UserAgent.

2
likes
140
points
34
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

This package allows you to change widgets for each device (PC, tablet, mobile).

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_device_separator