device_type

Creator: coderz1093

Last updated:

Add to Cart

Description:

device type

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 #

Add the latest version of package to your pubspec.yaml (and rundart pub get):

dependencies:
device_type: ^0.0.6
copied to clipboard

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'),
),
),
);
}
copied to clipboard
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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.