Commit c5fe2915 by daniel.roek

Merge remote-tracking branch 'origin/develop' into remove_shared_pref

# Conflicts:
#	permission_handler/example/ios/Flutter/Flutter.podspec
#	permission_handler/pubspec.yaml
parents 16c13f4f f557526b
# This is a basic workflow to help you get started with Actions
name: app_facing_package
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the develop branch
on:
push:
branches: [ master, develop ]
paths:
- 'permission_handler/**'
pull_request:
branches: [ master, develop ]
paths:
- 'permission_handler/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Job configuration for the permission_handler (App Facing Package)
permission_handler:
# The type of runner that the job will run on
runs-on: macos-latest
env:
source-directory: ./permission_handler
example-directory: ./permission_handler/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
# Download all Flutter packages the permission_handler depends on
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Run Flutter Format to ensure formatting is valid
- name: Run Flutter Format
run: flutter format --set-exit-if-changed lib
working-directory: ${{env.source-directory}}
# Run Flutter Analyzer
- name: Run Flutter Analyzer
run: flutter analyze
working-directory: ${{env.source-directory}}
# Build Android version of the example app
- name: Run Android build
run: flutter build apk --release
working-directory: ${{env.example-directory}}
# Build iOS version of the example app
- name: Run iOS build
run: flutter build ios --release --no-codesign
working-directory: ${{env.example-directory}}
# This is a basic workflow to help you get started with Actions
name: platform_interface_package
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the develop branch
on:
push:
branches: [ master, develop ]
paths:
- 'permission_handler_platform_interface/**'
pull_request:
branches: [ master, develop ]
paths:
- 'permission_handler_platform_interface/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Job configuration for the permission_handler_platform_interface (Platform Interface Package)
permission_handler_platform_interface:
# The type of runner that the job will run on
runs-on: macos-latest
env:
source-directory: ./permission_handler_platform_interface
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Make sure the stable version of Flutter is available
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
# Download all Flutter packages the permission_handler_platform_interface depends on
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Run Flutter Format to ensure formatting is valid
- name: Run Flutter Format
run: flutter format --set-exit-if-changed lib
working-directory: ${{env.source-directory}}
# Run Flutter Analyzer
- name: Run Flutter Analyzer
run: flutter analyze
working-directory: ${{env.source-directory}}
[![pub package](https://img.shields.io/pub/v/permission_handler.svg)](https://pub.dartlang.org/packages/permission_handler) [![Build Status](https://app.bitrise.io/app/fa4f5d4bf452bcfb/status.svg?token=HorGpL_AOw2llYz39CjmdQ&branch=master)](https://app.bitrise.io/app/fa4f5d4bf452bcfb) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart) [![pub package](https://img.shields.io/pub/v/permission_handler.svg)](https://pub.dartlang.org/packages/permission_handler) ![Build status](https://github.com/Baseflow/flutter-permission-handler/workflows/permission_handler/badge.svg?branch=master) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
On most operating systems, permissions aren't just granted to apps at install time. On most operating systems, permissions aren't just granted to apps at install time.
Rather, developers have to ask the user for permissions while the app is running. Rather, developers have to ask the user for permissions while the app is running.
......
# 5.1.0+2 ## 6.0.0
* Migrated to null safety
## 5.1.0+2
* Solve mismatch with permission constants between Dart and Android (due to addition of permission on iOS); * Solve mismatch with permission constants between Dart and Android (due to addition of permission on iOS);
* Fix compile error which occurred when on iOS the "PERMISSION_PHOTOS" macro is deactivated (meaning code dealing with the `PHPhotoLibrary` library is removed from the code base). * Fix compile error which occurred when on iOS the "PERMISSION_PHOTOS" macro is deactivated (meaning code dealing with the `PHPhotoLibrary` library is removed from the code base).
# 5.1.0+1 ## 5.1.0+1
* Recreate the iOS part of the example project based on the Flutter stable channel (previous version was accidentally created with the Flutter beta channel). * Recreate the iOS part of the example project based on the Flutter stable channel (previous version was accidentally created with the Flutter beta channel).
# 5.1.0 ## 5.1.0
* Added support for the limited photos permission available on iOS 14 and up; * Added support for the limited photos permission available on iOS 14 and up;
* Fixed deprecated warning on iOS; * Fixed deprecated warning on iOS;
* Added support for the "READ_PHONE_NUMBERS" permission on Android; * Added support for the "READ_PHONE_NUMBERS" permission on Android;
* Fix a link to the contribution guide in the README.md. * Fix a link to the contribution guide in the README.md.
# 5.0.1+1 ## 5.0.1+2
* Pin dependency on permission_handler_platform_interface on version 2.0.1.
## 5.0.1+1
* Fixes Typo * Fixes Typo
* Issue #233 - on 5.0: Solved a bug that prevented Android applications running in the background to check the permission status. * Issue #233 - on 5.0: Solved a bug that prevented Android applications running in the background to check the permission status.
# 5.0.1 ## 5.0.1
* Update `permission_handler_platform_interface 2.0.1` * Update `permission_handler_platform_interface 2.0.1`
# 5.0.0+hotfix.10 ## 5.0.0+hotfix.10
* Revert pull-request [#317](https://github.com/Baseflow/flutter-permission-handler/pull/317) * Revert pull-request [#317](https://github.com/Baseflow/flutter-permission-handler/pull/317)
# 5.0.0+hotfix.9 ## 5.0.0+hotfix.9
* Solved an issue where kCLAuthorizationStatusAuthorizedWhenInUse was returning PermissionStatusDenied (see [#317](https://github.com/Baseflow/flutter-permission-handler/pull/317)) * Solved an issue where kCLAuthorizationStatusAuthorizedWhenInUse was returning PermissionStatusDenied (see [#317](https://github.com/Baseflow/flutter-permission-handler/pull/317))
......
#
# NOTE: This podspec is NOT to be published. It is only used as a local source!
# This is a generated file; do not edit or check into version control.
#
Pod::Spec.new do |s|
s.name = 'Flutter'
s.version = '1.0.0'
s.summary = 'High-performance, high-fidelity mobile apps.'
s.homepage = 'https://flutter.io'
s.license = { :type => 'MIT' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
# Framework linking is handled by Flutter tooling, not CocoaPods.
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
s.vendored_frameworks = 'path/to/nothing'
end
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<Workspace <Workspace
version = "1.0"> version = "1.0">
<FileRef <FileRef
location = "group:Runner.xcodeproj"> location = "self:">
</FileRef> </FileRef>
</Workspace> </Workspace>
...@@ -70,7 +70,7 @@ class _PermissionState extends State<PermissionWidget> { ...@@ -70,7 +70,7 @@ class _PermissionState extends State<PermissionWidget> {
} }
void checkServiceStatus(BuildContext context, Permission permission) async { void checkServiceStatus(BuildContext context, Permission permission) async {
Scaffold.of(context).showSnackBar(SnackBar( ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text((await permission.status).toString()), content: Text((await permission.status).toString()),
)); ));
} }
......
...@@ -74,11 +74,13 @@ class InfoPage extends StatelessWidget { ...@@ -74,11 +74,13 @@ class InfoPage extends StatelessWidget {
margin: const EdgeInsets.only(top: 24.0), margin: const EdgeInsets.only(top: 24.0),
alignment: Alignment.center, alignment: Alignment.center,
child: SizedBox.expand( child: SizedBox.expand(
child: RaisedButton( child: ElevatedButton(
textTheme: Theme.of(context).buttonTheme.textTheme, style: ElevatedButton.styleFrom(
shape: padding: const EdgeInsets.all(8),
RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0)), shape: RoundedRectangleBorder(
padding: const EdgeInsets.all(8), borderRadius: BorderRadius.circular(30.0),
),
),
child: Text(text), child: Text(text),
onPressed: () => _launchURL(url), onPressed: () => _launchURL(url),
), ),
......
...@@ -2,7 +2,7 @@ name: permission_handler_example ...@@ -2,7 +2,7 @@ name: permission_handler_example
description: Demonstrates how to use the permission_handler plugin. description: Demonstrates how to use the permission_handler plugin.
environment: environment:
sdk: ">=2.12.0-0 <3.0.0" sdk: ">=2.12.0-259.9.beta <3.0.0"
dependencies: dependencies:
flutter: flutter:
...@@ -15,7 +15,7 @@ dev_dependencies: ...@@ -15,7 +15,7 @@ dev_dependencies:
permission_handler: permission_handler:
path: ../ path: ../
url_launcher: ^6.0.0-nullsafety.6 url_launcher: ^6.0.0
flutter: flutter:
uses-material-design: true uses-material-design: true
......
...@@ -47,7 +47,7 @@ extension PermissionActions on Permission { ...@@ -47,7 +47,7 @@ extension PermissionActions on Permission {
/// Returns the new [PermissionStatus]. /// Returns the new [PermissionStatus].
Future<PermissionStatus> request() async { Future<PermissionStatus> request() async {
final permissionStatus = (await [this].request())[this]; final permissionStatus = (await [this].request())[this];
return permissionStatus!; return permissionStatus ?? PermissionStatus.denied;
} }
} }
......
name: permission_handler name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 6.0.0-nullsafety version: 6.0.0
homepage: https://github.com/baseflowit/flutter-permission-handler homepage: https://github.com/baseflowit/flutter-permission-handler
flutter: flutter:
...@@ -16,13 +16,12 @@ dependencies: ...@@ -16,13 +16,12 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
meta: ^1.3.0 meta: ^1.3.0
permission_handler_platform_interface: #^3.0.0-nullsafety.1 permission_handler_platform_interface: ^3.0.0
path: ../permission_handler_platform_interface
dev_dependencies: dev_dependencies:
effective_dart: ^1.3.0 effective_dart: ^1.3.0
plugin_platform_interface: ^1.0.3 plugin_platform_interface: ^2.0.0
environment: environment:
sdk: ">=2.12.0-0 <3.0.0" sdk: ">=2.12.0-259.9.beta <3.0.0"
flutter: ">=1.12.8 <2.0.0" flutter: ">=1.12.8 <2.0.0"
## 3.0.0-nullsafety ## 3.0.0
* Migrated to null safety. * Migrated to null safety.
......
# permission_handler_platform_interface # permission_handler_platform_interface
[![pub package](https://img.shields.io/pub/v/permission_handler_platform_interface.svg)](https://pub.dartlang.org/packages/permission_handler_platform_interface) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart) [![pub package](https://img.shields.io/pub/v/permission_handler_platform_interface.svg)](https://pub.dartlang.org/packages/permission_handler_platform_interface) ![Build status](https://github.com/Baseflow/flutter-permission-handler/workflows/platform_interface_package/badge.svg?branch=master) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
A common platform interface for the [`permission_handler`][1] plugin. A common platform interface for the [`permission_handler`][1] plugin.
......
...@@ -51,8 +51,7 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform { ...@@ -51,8 +51,7 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform {
/// Returns [true] if the app settings page could be opened, otherwise /// Returns [true] if the app settings page could be opened, otherwise
/// [false]. /// [false].
Future<bool> openAppSettings() async { Future<bool> openAppSettings() async {
final wasOpened = final wasOpened = await _methodChannel.invokeMethod('openAppSettings');
await _methodChannel.invokeMethod('openAppSettings');
return wasOpened ?? false; return wasOpened ?? false;
} }
......
...@@ -3,20 +3,20 @@ description: A common platform interface for the permission_handler plugin. ...@@ -3,20 +3,20 @@ description: A common platform interface for the permission_handler plugin.
homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a # NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 3.0.0-nullsafety version: 3.0.0
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
meta: ^1.0.5 meta: ^1.0.5
plugin_platform_interface: ^1.1.0-nullsafety plugin_platform_interface: ^2.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
mockito: ^5.0.0-nullsafety mockito: ^5.0.0
effective_dart: ^1.3.0 effective_dart: ^1.3.0
environment: environment:
sdk: ">=2.12.0-0 <3.0.0" sdk: ">=2.12.0-259.9.beta <3.0.0"
flutter: ">=1.9.1+hotfix.4 <2.0.0" flutter: ">=1.22.0"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment