device_detect 1.0.0 copy "device_detect: ^1.0.0" to clipboard
device_detect: ^1.0.0 copied to clipboard

discontinued
PlatformAndroid

Detect android device info, MIUI version, etc.

example/lib/main.dart

import 'package:device_detect/device_detect.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(
          child: Column(
            children: [
              FutureBuilder(
                future: DeviceDetect.isMi,
                builder: (_, snapshot) => Text('MIUI: ${snapshot.data}'),
              ),
              FutureBuilder(
                future: DeviceDetect.hasSystemProperty(
                  'ro.miui.ui.version.name',
                ),
                builder: (_, snapshot) => Text('MIUI: ${snapshot.data}'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
140
points
16
downloads

Publisher

verified publisherwachasit.com

Weekly Downloads

Detect android device info, MIUI version, etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on device_detect