windows_apps_infos 0.0.2 copy "windows_apps_infos: ^0.0.2" to clipboard
windows_apps_infos: ^0.0.2 copied to clipboard

PlatformWindows

Package that allows you to get information of Installed applications in Windows

example/lib/main.dart

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




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

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

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

class _MyAppState extends State<MyApp> {
  String _appVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    getAppVersion();
  }

  Future<void> getAppVersion() async {
    String appVersion;

    try {
      appVersion =
          await DeviceApps.getAppVersion(path: 'C:/Windows/System32/notepad.exe');
    } on PlatformException {
      appVersion = 'Failed to get platform version.';
    }

    if (!mounted) return;

    setState(() {
      _appVersion = appVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Notepad Version: $_appVersion\n'),
        ),
      ),
    );
  }
}
3
likes
140
pub points
25%
popularity

Publisher

verified publisherahmetaydin.dev

Package that allows you to get information of Installed applications in Windows

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on windows_apps_infos