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

A plugin specifically designed for obtaining device environment values and paths with Android

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:android_devel/android_devel.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  Future<void> initPlatformState() async {
    // is android call
    AndroidDevel.environmentProvider.getAndroidId();
    AndroidDevel.environmentProvider.getAndroidSdkVersion();
    AndroidDevel.environmentProvider.getCpuAbi();

    AndroidDevel.pathProvider.getPackageCodePath();
    AndroidDevel.pathProvider.getCacheDirAbsolutePath();
    AndroidDevel.pathProvider.getCodeCacheDirAbsolutePath();
    AndroidDevel.pathProvider.getDataDirAbsolutePath();
    AndroidDevel.pathProvider.getFilesDirAbsolutePath();
    AndroidDevel.pathProvider.getObbDirAbsolutePath();
    AndroidDevel.pathProvider.getPackageResourcePath();

  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const Center(
          child: Text('Running on'),
        ),
      ),
    );
  }
}
2
likes
0
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin specifically designed for obtaining device environment values and paths with Android

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on android_devel