device_user_agent 0.1.1 copy "device_user_agent: ^0.1.1" to clipboard
device_user_agent: ^0.1.1 copied to clipboard

Flutter plugin to build user agent containing device information.

Device User Agent #

Flutter plugin for building the user agent for the device.

The built user agent is based on the device's platform, version, and the app's package name and version.

Sample built user agent:

com.acmesoftware.dua/1.0.0 (iOS 17.5; iPhone 15 Pro Max; build: 2345678) oem/Apple model/iPhone15,4 screen/1290*2796/3.0

Usage #

import 'package:device_user_agent/device_user_agent.dart';

Future<void> displayUserAgent() async {
  final userAgent = await DeviceUserAgent.instance.build();
  print(userAgent); // com.acmesoftware.dua/1.0.0 (iOS 17.5; iPhone 15 Pro Max; build: 2345678) oem/Apple model/iPhone15,4 screen/1290*2796/3.0
}
0
likes
160
pub points
71%
popularity

Publisher

verified publisheracmesoftware.com

Flutter plugin to build user agent containing device information.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

device_info_plus, flutter, package_info_plus, web

More

Packages that depend on device_user_agent