feat: add some plugins.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
.dart_tool/
|
||||
|
||||
.packages
|
||||
.pub/
|
||||
|
||||
build/
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: e491544588e8d34fdf31d5f840b4649850ef167a
|
||||
channel: master
|
||||
|
||||
project_type: plugin
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# Below is a list of people and organizations that have contributed
|
||||
# to the Flutter project. Names should be added to the list like so:
|
||||
#
|
||||
# Name/Organization <email address>
|
||||
|
||||
Google Inc.
|
||||
The Chromium Authors
|
||||
German Saprykin <saprykin.h@gmail.com>
|
||||
Benjamin Sauer <sauer.benjamin@gmail.com>
|
||||
larsenthomasj@gmail.com
|
||||
Ali Bitek <alibitek@protonmail.ch>
|
||||
Pol Batlló <pol.batllo@gmail.com>
|
||||
Anatoly Pulyaevskiy
|
||||
Hayden Flinner <haydenflinner@gmail.com>
|
||||
Stefano Rodriguez <hlsroddy@gmail.com>
|
||||
Salvatore Giordano <salvatoregiordanoo@gmail.com>
|
||||
Brian Armstrong <brian@flutter.institute>
|
||||
Paul DeMarco <paulmdemarco@gmail.com>
|
||||
Fabricio Nogueira <feufeu@gmail.com>
|
||||
Simon Lightfoot <simon@devangels.london>
|
||||
Ashton Thomas <ashton@acrinta.com>
|
||||
Thomas Danner <thmsdnnr@gmail.com>
|
||||
Diego Velásquez <diego.velasquez.lopez@gmail.com>
|
||||
Hajime Nakamura <nkmrhj@gmail.com>
|
||||
Tuyển Vũ Xuân <netsoft1985@gmail.com>
|
||||
Miguel Ruivo <miguel@miguelruivo.com>
|
||||
Sarthak Verma <sarthak@artiosys.com>
|
||||
Mike Diarmid <mike@invertase.io>
|
||||
Invertase <oss@invertase.io>
|
||||
Elliot Hesp <elliot@invertase.io>
|
||||
Vince Varga <vince.varga@smaho.com>
|
||||
Aawaz Gyawali <awazgyawali@gmail.com>
|
||||
EUI Limited <ian.evans3@admiralgroup.co.uk>
|
||||
Katarina Sheremet <katarina@sheremet.ch>
|
||||
Thomas Stockx <thomas@stockxit.com>
|
||||
Sarbagya Dhaubanjar <sarbagyastha@gmail.com>
|
||||
Ozkan Eksi <ozeksi@gmail.com>
|
||||
Rishab Nayak <rishab@bu.edu>
|
||||
ko2ic <ko2ic.dev@gmail.com>
|
||||
Jonathan Younger <jonathan@daikini.com>
|
||||
Jose Sanchez <josesm82@gmail.com>
|
||||
Debkanchan Samadder <debu.samadder@gmail.com>
|
||||
Audrius Karosevicius <audrius.karosevicius@gmail.com>
|
||||
Lukasz Piliszczuk <lukasz@intheloup.io>
|
||||
SoundReply Solutions GmbH <ch@soundreply.com>
|
||||
Rafal Wachol <rwachol@gmail.com>
|
||||
Pau Picas <pau.picas@gmail.com>
|
||||
Christian Weder <chrstian.weder@yapeal.ch>
|
||||
Alexandru Tuca <salexandru.tuca@outlook.com>
|
||||
Christian Weder <chrstian.weder@yapeal.ch>
|
||||
Rhodes Davis Jr. <rody.davis.jr@gmail.com>
|
||||
Luigi Agosti <luigi@tengio.com>
|
||||
Quentin Le Guennec <quentin@tengio.com>
|
||||
Koushik Ravikumar <koushik@tengio.com>
|
||||
Nissim Dsilva <nissim@tengio.com>
|
||||
Giancarlo Rocha <giancarloiff@gmail.com>
|
||||
Ryo Miyake <ryo@miyake.id>
|
||||
Théo Champion <contact.theochampion@gmail.com>
|
||||
Kazuki Yamaguchi <y.kazuki0614n@gmail.com>
|
||||
Eitan Schwartz <eshvartz@gmail.com>
|
||||
Chris Rutkowski <chrisrutkowski89@gmail.com>
|
||||
Juan Alvarez <juan.alvarez@resideo.com>
|
||||
Aleksandr Yurkovskiy <sanekyy@gmail.com>
|
||||
Anton Borries <mail@antonborri.es>
|
||||
Alex Li <google@alexv525.com>
|
||||
Rahul Raj <64.rahulraj@gmail.com>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
## 2.0.2
|
||||
|
||||
* Updated installation instructions in README.
|
||||
|
||||
## 2.0.1
|
||||
|
||||
* Add `implements` to pubspec.yaml.
|
||||
* Add `registerWith` method to the main Dart class.
|
||||
|
||||
## 2.0.0
|
||||
|
||||
* Migrate to null safety.
|
||||
|
||||
## 0.1.1+3
|
||||
|
||||
* Update Flutter SDK constraint.
|
||||
|
||||
## 0.1.1+2
|
||||
|
||||
* Log errors in the example when calls to the `path_provider` fail.
|
||||
|
||||
## 0.1.1+1
|
||||
|
||||
* Check in linux/ directory for example/
|
||||
|
||||
## 0.1.1 - NOT PUBLISHED
|
||||
* Reverts changes on 0.1.0, which broke the tree.
|
||||
|
||||
|
||||
## 0.1.0 - NOT PUBLISHED
|
||||
* This release updates getApplicationSupportPath to use the application ID instead of the executable name.
|
||||
* No migration is provided, so any older apps that were using this path will now have a different directory.
|
||||
|
||||
## 0.0.1+2
|
||||
* This release updates the example to depend on the endorsed plugin rather than relative path
|
||||
|
||||
## 0.0.1+1
|
||||
* This updates the readme and pubspec and example to reflect the endorsement of this implementation of `path_provider`
|
||||
|
||||
## 0.0.1
|
||||
* The initial implementation of path_provider for Linux
|
||||
* Implements getApplicationSupportPath, getApplicationDocumentsPath, getDownloadsPath, and getTemporaryPath
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# path\_provider\_linux
|
||||
|
||||
The linux implementation of [`path_provider`].
|
||||
|
||||
## Usage
|
||||
|
||||
This package is [endorsed][2], which means you can simply use `path_provider`
|
||||
normally. This package will be automatically included in your app when you do.
|
||||
|
||||
[1]: https://pub.dev/packages/path_provider
|
||||
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
|
||||
@@ -0,0 +1,49 @@
|
||||
// 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 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:path_provider_platform_interface/path_provider_platform_interface.dart';
|
||||
import 'package:xdg_directories/xdg_directories.dart';
|
||||
|
||||
XDGDirectories xdg = XDGDirectories();
|
||||
|
||||
/// The linux implementation of [PathProviderPlatform]
|
||||
///
|
||||
/// This class implements the `package:path_provider` functionality for linux
|
||||
class PathProviderLinux extends PathProviderPlatform {
|
||||
/// Registers this class as the default instance of [PathProviderPlatform]
|
||||
static void registerWith() {
|
||||
PathProviderPlatform.instance = PathProviderLinux();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getTemporaryPath() {
|
||||
return Future<String?>.value('/tmp');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getApplicationSupportPath() async {
|
||||
final String processName = path.basenameWithoutExtension(
|
||||
await File('/proc/self/exe').resolveSymbolicLinks());
|
||||
final Directory directory =
|
||||
Directory(path.join(xdg.dataHome.path, processName));
|
||||
// Creating the directory if it doesn't exist, because mobile implementations assume the directory exists
|
||||
if (!directory.existsSync()) {
|
||||
await directory.create(recursive: true);
|
||||
}
|
||||
return directory.path;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getApplicationDocumentsPath() {
|
||||
return Future<String?>.value(xdg.getUserDirectory('DOCUMENTS')?.path);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getDownloadsPath() {
|
||||
return Future<String?>.value(xdg.getUserDirectory('DOWNLOAD')?.path);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
name: path_provider_linux
|
||||
description: Linux implementation of the path_provider plugin
|
||||
repository: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_linux
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
|
||||
version: 2.0.2
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
flutter: ">=2.0.0"
|
||||
|
||||
flutter:
|
||||
plugin:
|
||||
implements: path_provider
|
||||
platforms:
|
||||
linux:
|
||||
dartPluginClass: PathProviderLinux
|
||||
pluginClass: none
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
path: ^1.8.0
|
||||
path_provider_platform_interface: ^2.0.0
|
||||
xdg_directories:
|
||||
path: ../xdg_directories
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
pedantic: ^1.10.0
|
||||
Reference in New Issue
Block a user