device_type 0.0.6 copy "device_type: ^0.0.6" to clipboard
device_type: ^0.0.6 copied to clipboard

A new Flutter plugin used to determine whether the device is a Phone, Phablet, Tablet, or a Larger Device like a Desktop.

0.0.6 #

device_type #

A new Flutter plugin used to determine whether the device is a Phone, Phablet, Tablet, or a Larger Device like a Desktop.

Essential Guide #

Flutter Device Type Medium

Installation #

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  device_type: ^0.0.6
  1. Import the package and use it in your Flutter App.
import 'package:device_type/device_type.dart';


String _getDeviceType(BuildContext context) {
  return DeviceType.getDeviceType(context);
}

@override
Widget build(BuildContext context) {
  deviceType = _getDeviceType(context);
  return MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text('Plugin Device Type'),
      ),
      body: Center(
        child: Text('Running on: $deviceType\n'),
      ),
    ),
  );
}

Package Documentation #

Example of using the library to determine whether the device is a Phone, Phablet, Tablet, or a Larger Device.

Find Package at pub.dev #

Example of using the library to determine whether the device is a Phone, Phablet, Tablet, or a Larger Device.

8
likes
150
points
355
downloads

Publisher

verified publishervinothmuthu.in

Weekly Downloads

A new Flutter plugin used to determine whether the device is a Phone, Phablet, Tablet, or a Larger Device like a Desktop.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on device_type