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).
Add dependency.
dependencies:
flutter_device_separator: ^1.0.0
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(),
)
Device is determined by UserAgent.