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

retracted

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

device_type #

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

class _MyAppState extends State

@override void initState() { super.initState(); // Call the function to get the device type in initState

}

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'), ), ), ); } }

5
likes
0
pub points
78%
popularity

Publisher

verified publishervinothmuthu.in

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on device_type