Gordon  Murray

Gordon Murray


Path_provider_linux: The Linux Implementation Of Path_provider


The linux implementation of path_provider.


This package is endorsed, which means you can simply use path_provider normally. This package will be automatically included in your app when you do.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add path_provider_linux

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

  path_provider_linux: ^2.1.6

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:path_provider_linux/path_provider_linux.dart';


// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:path_provider_linux/path_provider_linux.dart';

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

/// Sample app
class MyApp extends StatefulWidget {
  /// Default Constructor
  const MyApp({Key? key}) : super(key: key);

  State<MyApp> createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  String? _tempDirectory = 'Unknown';
  String? _downloadsDirectory = 'Unknown';
  String? _appSupportDirectory = 'Unknown';
  String? _documentsDirectory = 'Unknown';
  final PathProviderLinux _provider = PathProviderLinux();

  void initState() {

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initDirectories() async {
    String? tempDirectory;
    String? downloadsDirectory;
    String? appSupportDirectory;
    String? documentsDirectory;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      tempDirectory = await _provider.getTemporaryPath();
    } on PlatformException catch (e, stackTrace) {
      tempDirectory = 'Failed to get temp directory.';
      print('$tempDirectory $e $stackTrace');
    try {
      downloadsDirectory = await _provider.getDownloadsPath();
    } on PlatformException catch (e, stackTrace) {
      downloadsDirectory = 'Failed to get downloads directory.';
      print('$downloadsDirectory $e $stackTrace');

    try {
      documentsDirectory = await _provider.getApplicationDocumentsPath();
    } on PlatformException catch (e, stackTrace) {
      documentsDirectory = 'Failed to get documents directory.';
      print('$documentsDirectory $e $stackTrace');

    try {
      appSupportDirectory = await _provider.getApplicationSupportPath();
    } on PlatformException catch (e, stackTrace) {
      appSupportDirectory = 'Failed to get documents directory.';
      print('$appSupportDirectory $e $stackTrace');
    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) {

    setState(() {
      _tempDirectory = tempDirectory;
      _downloadsDirectory = downloadsDirectory;
      _appSupportDirectory = appSupportDirectory;
      _documentsDirectory = documentsDirectory;

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Path Provider Linux example app'),
        body: Center(
          child: Column(
            children: <Widget>[
              Text('Temp Directory: $_tempDirectory\n'),
              Text('Documents Directory: $_documentsDirectory\n'),
              Text('Downloads Directory: $_downloadsDirectory\n'),
              Text('Application Support Directory: $_appSupportDirectory\n'),

Author: Flutter
Source Code: https://github.com/flutter/plugins/tree/main/packages/path_provider/path_provider_linux 
License: BSD-3-Clause license

#dart #flutter #linux 

What is GEEK

Buddha Community

Path_provider_linux: The Linux Implementation Of Path_provider

Hire Dedicated Linux Developer

Looking to develop real-time applications?

Hire Dedicated Linux Developer from HourlyDeveloper.io, we have dedicated developers who have vast experience in developing applications for Linux and UNIX operating systems and have in-depth knowledge of their processes, kernel tools, internal architectures, and development packages.

Consult with experts:- https://bit.ly/2ZQ5ySP

#hire linux dedicated developer #linux developer #linux development company #linux development services #linux development #linux developer

How I Switched from Windows 10 to Linux Mint

This article is all about my journey on switching from Windows 10 to Linux Mint 20, how I got easily adapted to the Linux environment, and some resources that helped me to set up a perfect Desktop environment.


Ok, now I have decided to switch to Linux but here comes the first question. Which distro will satisfy my needs both in terms of GUI and other aspects? Linux is not something new to me since I have been working with RHEL based distros in my work for the past 4 years with the command-line.

I know RHEL based distros are good for enterprises but not for personalized desktop environments, at least that’s what I am thinking till now. So I started my research to find the distro that should be easy for me to use and at the same time should have good community support if in case I ran into some problem. Among many Linux distros, I drilled down my list to 4 flavors.

Related ArticleThe Best Linux Distributions for Beginners

Before deciding the Distro it is necessary you formulate the list of tools/programs or packages needed and check if the distro you choose provides all those features.

For me, I use Linux for two main purposes: one is for my professional development work, writing articles, and second for my personal use like Video editing and Movies. Most of the popular software are created to be compatible with Windows, macOS, and Linux like Sublime TextVSCodeVLC Media PlayerFirefox/Chromium browser. Other than these software, cloud-based services make our life easy Like Microsoft Office 365 or G Suite.

#linux distros #linux mint #linux distros #linux mint tips #linux

I am Developer


How to Delete Directories and Files in Linux using Command Line

In this remove or delete directories and files linux tutorial guide, you will learn how to remove empty directory and non empty directory linux using command line. And as well as how to remove/file files linux using command line.

If you work with Linux then you will need the following:

  • how to remove empty directory in linux,
  • how to remove non empty directory,
  • how to remove directory without confirmation linux
  • how to remove files with and without confirmation in linux.

So, this tutorial guide will show you you how to use the rmunlink, and rmdir commands to remove or delete files and directories in Linux with and without confirmation.


#how to delete directory in linux #how to remove non empty directory in linux #remove all files in a directory linux #linux delete all files in current directory #linux delete all files in a directory recursively #delete all files in a directory linux

Package Management in Linux - Linux Tutorial - Linux Training

Package Management in Linux - Linux Tutorial - Linux Training

#linux #linux tutorial #linux training

Tyshawn  Braun

Tyshawn Braun


10 Best Ubuntu-based Linux Distributions

Ubuntu is arguably one of the most popular and widely-used Linux distribution owing to its classic UI, stability, user-friendliness, and a rich repository that contains over 50,000 software packages. Furthermore, it comes highly recommended for beginners who are trying to give a shot at Linux.

In addition, Ubuntu is supported by a vast community of dedicated opensource developers who actively maintain contribute to its development to deliver up-to-date software packages, updates, and bug-fixes.

There are numerous flavors based on Ubuntu, and a common misconception is that they are all the same. While they may be based on Ubuntu, each flavor ships with its own unique style and variations to make it stand out from the rest.

In this guide, we are going to explore some of the most popular Ubuntu-based Linux variants.

1. Linux Mint

Used by millions around the globe, Linux Mint is a massively popular Linux flavor based off of Ubuntu. It provides a sleek UI with out-of-the-box applications for everyday use such as LibreOffice suite, Firefox, Pidgin, Thunderbird, and multimedia apps such as VLC and Audacious media players.

Linux Mint Desktop

Linux Mint Desktop

Owing to its simplicity and ease-of-use, Mint is considered ideal for beginners who are making a transition from Windows to Linux and those who prefer to steer clear from the default GNOME desktop but still enjoy the stability and the same code base that Ubuntu provides.

The latest Mint release is Linux Mint 20 and is based on the Ubuntu 20.04 LTS.

#linux distros #ubuntu #linux distros #ubuntu linux distributions #linux