Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[in_app_purchases] fixed typo #2812

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6dcd775
fixed typo
MauScheff Jun 3, 2020
e987d25
[image_picker_for_web] Introduce image_picker_for_web package (#2802)
ditman Jun 3, 2020
3e538e1
[image_picker_for_web] Remove android directory. (#2817)
ditman Jun 5, 2020
20d8ad2
[image_picker] Add web support to the example app. (#2816)
ditman Jun 5, 2020
2fb8bf0
Fix bug in example (#2801)
panmari Jun 6, 2020
90462df
Update Linux desktop Dockerfile for GTK switch (#2826)
stuartmorgan-g Jun 13, 2020
ff53b70
[image_picker] fixes for iOS which doesn't present camera/albums with…
chris-rutkowski Jun 15, 2020
0fab93d
[path_provider] Updated documentation reflecting changes needed for t…
TimWhiting Jun 16, 2020
957fb75
[url_launcher] docs: note about encoding URIs (#2172)
CoreyCole Jun 17, 2020
104e9bf
[In_App_Purchase]queryPastPurchases() shouldn't block transaction upd…
LHLL Jun 22, 2020
a0e8806
[e2e] Fix e2e pixel ratio (#2842)
CareF Jun 23, 2020
88319a9
Update README for plugin list (#2843)
CareF Jun 24, 2020
388c66e
[connectivity_for_web] Introduce connectivity_for_web package. (#2820)
ditman Jun 30, 2020
940c10c
[url_launcher_web] Adds "tel" and "sms" URL support (#2847)
Vanethos Jun 30, 2020
e08b09c
[shared_preferences_linux] Add support for Linux (#2836)
robert-ancell Jun 30, 2020
71cc865
[e2e] Use SettableFuture instead of CompletableFuture (#2854)
jiahaog Jul 1, 2020
a3dbe73
[connectivity] Endorse connectivity_for_web. (#2853)
ditman Jul 1, 2020
40db092
[e2e] Bump version to 0.6.0 (#2855)
jiahaog Jul 1, 2020
d3ccc34
[multiple] Improve video playback in image_picker example (#2819)
ditman Jul 1, 2020
a5db6e0
[image_picker] updated VALID_ARCHS to support iPhone simulator (#2761)
jlalvarez18 Jul 6, 2020
65e7bdb
[url_launcher_linux] Add Linux url_launcher plugin (#2857)
robert-ancell Jul 7, 2020
8db69f3
[url_launcher] Endorse url_launcher_linux (#2863)
stuartmorgan-g Jul 7, 2020
f3f7e8c
[shared_preferences_linux] Add iOS stub (#2865)
stuartmorgan-g Jul 8, 2020
3b931d0
[shared_preferences] Shared preferences linux endorsement (#2864)
stuartmorgan-g Jul 8, 2020
d6435f0
[connectivity_for_web] Fix JS Interop in release mode. (#2869)
ditman Jul 13, 2020
5971e2f
[google_sign_in] Bridge google_sign_in and googleapis. (#2824)
ditman Jul 14, 2020
fbd6510
[e2e] add support to report extra information (#2873)
CareF Jul 16, 2020
e888267
fixed typo
MauScheff Jun 3, 2020
7b5d552
Updated CHANGELOG and pubspec.yaml to reflect changes in commit 6dcd7…
MauScheff Jul 20, 2020
8cee0fb
Merge branch 'master' of github.com:eldermao1/plugins
MauScheff Jul 20, 2020
ab7595d
fixed typo
MauScheff Jul 20, 2020
3a3476c
Merge branch 'master' of github.com:eldermao1/plugins
MauScheff Jul 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .ci/Dockerfile-LinuxDesktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ RUN sudo apt-get update && sudo apt-get install -y google-cloud-sdk && \
RUN sudo apt-get install -y xvfb libegl1-mesa
# Install Linux desktop build tool requirements.
RUN sudo apt-get install -y clang cmake ninja-build file pkg-config
# Install necessary libraries.
RUN sudo apt-get install -y libgtk-3-dev

# Add repo for Google Chrome and install it, for url_launcher tests.
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends google-chrome-stable
# Make it the default so http: has a handler.
RUN sudo apt-get install -y xdg-utils
RUN xdg-settings set default-web-browser google-chrome.desktop
4 changes: 3 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ 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>
Eitan Schwartz <eshvartz@gmail.com>
Chris Rutkowski <chrisrutkowski89@gmail.com>
Juan Alvarez <juan.alvarez@resideo.com>
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ These are the available plugins in this repository.
| [camera](./packages/camera/) | [![pub package](https://img.shields.io/pub/v/camera.svg)](https://pub.dev/packages/camera) |
| [connectivity](./packages/connectivity/) | [![pub package](https://img.shields.io/pub/v/connectivity.svg)](https://pub.dev/packages/connectivity) |
| [device_info](./packages/device_info/) | [![pub package](https://img.shields.io/pub/v/device_info.svg)](https://pub.dev/packages/device_info) |
| [e2e](./packages/e2e/) | [![pub package](https://img.shields.io/pub/v/e2e.svg)](https://pub.dev/packages/e2e) |
| [espresso](./packages/espresso/) | [![pub package](https://img.shields.io/pub/v/espresso.svg)](https://pub.dev/packages/espresso) |
| [flutter_plugin_android_lifecycle](./packages/flutter_plugin_android_lifecycle/) | [![pub package](https://img.shields.io/pub/v/flutter_plugin_android_lifecycle.svg)](https://pub.dev/packages/flutter_plugin_android_lifecycle) |
| [google_maps_flutter](./packages/google_maps_flutter) | [![pub package](https://img.shields.io/pub/v/google_maps_flutter.svg)](https://pub.dev/packages/google_maps_flutter) |
| [google_sign_in](./packages/google_sign_in/) | [![pub package](https://img.shields.io/pub/v/google_sign_in.svg)](https://pub.dev/packages/google_sign_in) |
| [image_picker](./packages/image_picker/) | [![pub package](https://img.shields.io/pub/v/image_picker.svg)](https://pub.dev/packages/image_picker) |
| [in_app_purchase](./packages/in_app_purchase/) | [![pub package](https://img.shields.io/pub/v/in_app_purchase.svg)](https://pub.dev/packages/in_app_purchase) |
| [ios_platform_images](./packages/ios_platform_images/) | [![pub package](https://img.shields.io/pub/v/ios_platform_images.svg)](https://pub.dev/packages/ios_platform_images) |
| [local_auth](./packages/local_auth/) | [![pub package](https://img.shields.io/pub/v/local_auth.svg)](https://pub.dev/packages/local_auth) |
| [package_info](./packages/package_info/) | [![pub package](https://img.shields.io/pub/v/package_info.svg)](https://pub.dev/packages/package_info) |
| [path_provider](./packages/path_provider/) | [![pub package](https://img.shields.io/pub/v/path_provider.svg)](https://pub.dev/packages/path_provider) |
| [plugin_platform_interface](./packages/plugin_platform_interface/) | [![pub package](https://img.shields.io/pub/v/plugin_platform_interface.svg)](https://pub.dev/packages/plugin_platform_interface) |
| [quick_actions](./packages/quick_actions/) | [![pub package](https://img.shields.io/pub/v/quick_actions.svg)](https://pub.dev/packages/quick_actions) |
| [sensors](./packages/sensors/) | [![pub package](https://img.shields.io/pub/v/sensors.svg)](https://pub.dev/packages/sensors) |
| [share](./packages/share/) | [![pub package](https://img.shields.io/pub/v/share.svg)](https://pub.dev/packages/share) |
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.8+3

* Fix bug in usage example in README.md

## 0.5.8+2

* Post-v2 embedding cleanups.
Expand Down
1 change: 1 addition & 0 deletions packages/camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import 'package:camera/camera.dart';
List<CameraDescription> cameras;

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
runApp(CameraApp());
}
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.5.8+2
version: 0.5.8+3

homepage: https://github.com/flutter/plugins/tree/master/packages/camera

Expand Down
4 changes: 4 additions & 0 deletions packages/connectivity/connectivity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.9

* Add support for `web` (by endorsing `connectivity_for_web` 0.3.0)

## 0.4.8+6

* Update lower bound of dart dependency to 2.1.0.
Expand Down
6 changes: 3 additions & 3 deletions packages/connectivity/connectivity/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
title: const Text('Connectivity example app'),
),
body: Center(child: Text('Connection Status: $_connectionStatus')),
);
Expand All @@ -103,7 +103,7 @@ class _MyHomePageState extends State<MyHomePage> {
String wifiName, wifiBSSID, wifiIP;

try {
if (Platform.isIOS) {
if (!kIsWeb && Platform.isIOS) {
LocationAuthorizationStatus status =
await _connectivity.getLocationServiceAuthorization();
if (status == LocationAuthorizationStatus.notDetermined) {
Expand All @@ -125,7 +125,7 @@ class _MyHomePageState extends State<MyHomePage> {
}

try {
if (Platform.isIOS) {
if (!kIsWeb && Platform.isIOS) {
LocationAuthorizationStatus status =
await _connectivity.getLocationServiceAuthorization();
if (status == LocationAuthorizationStatus.notDetermined) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions packages/connectivity/connectivity/example/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="example">
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="favicon.png"/>

<title>example</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions packages/connectivity/connectivity/example/web/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "example",
"short_name": "example",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
7 changes: 5 additions & 2 deletions packages/connectivity/connectivity/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/c
# 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.4.8+6
version: 0.4.9

flutter:
plugin:
Expand All @@ -17,13 +17,16 @@ flutter:
pluginClass: FLTConnectivityPlugin
macos:
default_package: connectivity_macos
web:
default_package: connectivity_for_web

dependencies:
flutter:
sdk: flutter
meta: "^1.0.5"
meta: ^1.0.5
connectivity_platform_interface: ^1.0.2
connectivity_macos: ^0.1.0
connectivity_for_web: ^0.3.0

dev_dependencies:
flutter_test:
Expand Down
8 changes: 8 additions & 0 deletions packages/connectivity/connectivity_for_web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
.dart_tool/

.packages
.pub/

build/
lib/generated_plugin_registrant.dart
10 changes: 10 additions & 0 deletions packages/connectivity/connectivity_for_web/.metadata
Original file line number Diff line number Diff line change
@@ -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: 52ee8a6c6565cd421dfa32042941eb40691f4746
channel: master

project_type: plugin
15 changes: 15 additions & 0 deletions packages/connectivity/connectivity_for_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 0.3.1

* Use NetworkInformation API from dart:html, instead of the JS-interop version.

## 0.3.0

* Rename from "experimental_connectivity_web" to "connectivity_for_web", and move to flutter/plugins master.

## 0.2.0

* Add fallback on dart:html for browsers where NetworkInformationAPI is not supported.

## 0.1.0

* Initial release.
26 changes: 26 additions & 0 deletions packages/connectivity/connectivity_for_web/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright 2016, the Flutter project 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.
62 changes: 62 additions & 0 deletions packages/connectivity/connectivity_for_web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# connectivity_for_web

A web implementation of [connectivity](https://pub.dev/connectivity/connectivity). Currently this package uses an experimental API, with a fallback to dart:html, so not all features may be available to all browsers.

## Usage

### Import the package

This package is a non-endorsed implementation of `connectivity` for the web platform, so you need to modify your `pubspec.yaml` to use it:

```yaml
...
dependencies:
...
connectivity: ^0.4.9
connectivity_for_web: ^0.3.0
...
...
```

## Example

Find the example wiring in the [Google sign-in example application](https://github.com/ditman/plugins/blob/connectivity-web/packages/connectivity/connectivity/example/lib/main.dart).

## Limitations on the web platform

In order to retrieve information about the quality/speed of a browser's connection, the web implementation of the `connectivity` plugin uses the browser's [**NetworkInformation** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation), which as of this writing (June 2020) is still "experimental", and not available in all browsers:

![Data on support for the netinfo feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/netinfo.png)

On desktop browsers, this API only returns a very broad set of connectivity statuses (One of `'slow-2g', '2g', '3g', or '4g'`), and may *not* provide a Stream of changes. Firefox still hasn't enabled this feature by default.

**Fallback to `navigator.onLine`**

For those browsers where the NetworkInformation Web API is not available, the plugin falls back to the [**NavigatorOnLine** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine), which is more broadly supported:

![Data on support for the online-status feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/online-status.png)


The NavigatorOnLine API is [provided by `dart:html`](https://api.dart.dev/stable/2.7.2/dart-html/Navigator/onLine.html), and only supports a boolean connectivity status (either online or offline), with no network speed information. In those cases the plugin will return either `wifi` (when the browser is online) or `none` (when it's not).

Other than the approximate "downlink" speed, where available, and due to security and privacy concerns, **no Web browser will provide** any specific information about the actual network your users' device is connected to, like **the SSID on a Wi-Fi, or the MAC address of their device.**

## Contributions and Testing

Tests are crucial to contributions to this package. All new contributions should be reasonably tested.

In order to run tests in this package, do:

```
cd test
flutter run -d chrome
```

All contributions to this package are welcome. Read the [Contributing to Flutter Plugins](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md) guide to get started.

## Issues and feedback

Please file an [issue](https://github.com/ditman/plugins/issues/new)
to send feedback or report a bug.

**Thank you!**
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint connectivity_web.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'connectivity_for_web'
s.version = '0.1.0'
s.summary = 'No-op implementation of connectivity web plugin to avoid build issues on iOS'
s.description = <<-DESC
temp fake connectivity_web plugin
DESC
s.homepage = 'https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity_for_web'
s.license = { :file => '../LICENSE' }
s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
end
Loading