Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
14bf80b
path provider plugin: allow getDownloadsPath for Windows
technolion Jun 26, 2020
e6361eb
updated verion and changelog
technolion Jun 26, 2020
e8c3dc8
fixed formatting problem
technolion Jun 26, 2020
f8f666f
Rebase previous commits (#2966)
jiahaog Aug 26, 2020
7227263
Add README instructions for enablePendingPurchases (#2921)
matthew-carroll Aug 26, 2020
3b6ddc8
[video_player_platform_interface] fix `setMixIWithOthers` test channe…
Aug 26, 2020
4a727fa
[video_player] Fix `setWithOthers` test (#2970)
Aug 26, 2020
f8341ef
[integration_test] Show stack trace of widget test errors on the plat…
jiahaog Aug 27, 2020
e4b55a4
[integration_test] Fix channel name for iOS, docs (#2972)
jiahaog Aug 27, 2020
9d1f131
[battery] Moved battery to its own subdir (#2969)
yash1200 Aug 27, 2020
e8306b5
[integration_test] add support to get timeline (#2947)
CareF Aug 28, 2020
c62afee
[share] Add sharing file support (android & ios) (#970)
pboos Aug 28, 2020
2f33166
[url_launcher_platform_interface] Add webOnlyWindowName parameter to …
balvinderz Aug 28, 2020
161aed2
[battery_platform_interface] Introduce package. (#2975)
yash1200 Aug 28, 2020
7c49361
[url_launcher, url_launcher_web]Added webOnlyWindowName parameter to …
balvinderz Aug 28, 2020
b93268e
[url_launcher, url_launcher_web] Fix API dependencies. (#2984)
ditman Aug 31, 2020
ce2c155
[web] Adding capability to e2e to take screenshot for web tests. (#2904)
Aug 31, 2020
90924b5
[google_maps_flutter] Fix Android unit test. (#2985)
xster Sep 1, 2020
ae806de
[google_maps_flutter] Geodesic Polyline support in iOS (#2964)
kattaliraees Sep 1, 2020
854cfd5
[battery] Port battery to use platform interface (#2980)
yash1200 Sep 1, 2020
7027e9d
Support Windows in incremental_build.sh (#2989)
stuartmorgan-g Sep 1, 2020
ee4b263
Add LUCI try builders json config file (#2993)
keyonghan Sep 3, 2020
2d94727
Standardize LICENSE body text formatting (#2992)
stuartmorgan-g Sep 3, 2020
5d869c4
[flutter_plugin_android_lifecycle] add no-op v2 plugin (#2977)
ened Sep 4, 2020
00d85b0
[url_launcher] Suppress deprecation warning in WebViewActivity (#3008)
mvanbeusekom Sep 8, 2020
8cdb21d
[device_info_platform_interface] Typo in doc fixed (#3006)
yash1200 Sep 9, 2020
0007ce3
[image_picker_for_web] Safari now can pick more video formats (3gp, m…
Makapre Sep 9, 2020
d6fdbbd
[google_maps_flutter] Fix typo in User Interface example (#3011)
Vitaly-V Sep 9, 2020
ba09b7f
[in_app_purchase] Fix the bug that prevent restored subscription tran…
ziggycrane Sep 9, 2020
1ac2978
[url_launcher_web] Fix a typo in a test name and fix quote consistenc…
jamesderlin Sep 9, 2020
adff319
path provider plugin: allow getDownloadsPath for Windows
technolion Jun 26, 2020
84a2314
updated verion and changelog
technolion Jun 26, 2020
1ad4c8d
fixed formatting problem
technolion Jun 26, 2020
4ed2249
Merge branch 'pathprovider-windows' of https://github.com/technolion/…
technolion Sep 10, 2020
c33275d
removed pre-screening of platform when requesting downlodas path
technolion Sep 10, 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
19 changes: 19 additions & 0 deletions .ci/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This directory contains resources that the Flutter team uses during
the development of plugins.

## Luci builder file
`try_builders.json` contains the supported luci try builders
for plugins. It follows format:
```json
{
"builders":[
{
"name":"yyy",
"repo":"plugins",
"enabled":true
}
]
}
```
This file will be mainly used in [`flutter/cocoon`](https://github.com/flutter/cocoon)
to trigger/update pre-submit luci tasks.
9 changes: 9 additions & 0 deletions .ci/dev/try_builders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"builders":[
{
"name":"Windows Plugins",
"repo":"plugins",
"enabled":true
}
]
}
44 changes: 21 additions & 23 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
Copyright 2017 The Chromium 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:
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.
* 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.
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.
52 changes: 25 additions & 27 deletions packages/android_alarm_manager/LICENSE
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
// Copyright 2017 The Chromium 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.
Copyright 2017 The Chromium 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.
52 changes: 25 additions & 27 deletions packages/android_intent/LICENSE
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
// Copyright 2017 The Chromium 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.
Copyright 2017 The Chromium 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.
27 changes: 0 additions & 27 deletions packages/battery/LICENSE

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.0.5

* Ported to use platform interface.

## 1.0.4+1

* Moved everything from battery to battery/battery

## 1.0.4

* Updated README.md.

## 1.0.3

* Update package:e2e to use package:integration_test
Expand Down
25 changes: 25 additions & 0 deletions packages/battery/battery/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright 2017 The Chromium 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.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ To use this plugin, add `battery` as a [dependency in your pubspec.yaml file](ht
import 'package:battery/battery.dart';

// Instantiate it
var battery = Battery();
var _battery = Battery();

// Access current battery level
print(await battery.batteryLevel);
print(await _battery.batteryLevel);

// Be informed when the state (full, charging, discharging) changes
_battery.onBatteryStateChanged.listen((BatteryState state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dev_dependencies:
flutter_driver:
sdk: flutter
integration_test:
path: ../../integration_test
path: ../../../integration_test
pedantic: ^1.8.0

flutter:
Expand Down
22 changes: 22 additions & 0 deletions packages/battery/battery/lib/battery.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2017 The Chromium 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:async';

import 'package:battery_platform_interface/battery_platform_interface.dart';

export 'package:battery_platform_interface/battery_platform_interface.dart'
show BatteryState;

/// API for accessing information about the battery of the device the Flutter
/// app is currently running on.
class Battery {
/// Returns the current battery level in percent.
Future<int> get batteryLevel async =>
await BatteryPlatform.instance.batteryLevel();

/// Fires whenever the battery state changes.
Stream<BatteryState> get onBatteryStateChanged =>
BatteryPlatform.instance.onBatteryStateChanged();
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: battery
description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
version: 1.0.3
homepage: https://github.com/flutter/plugins/tree/master/packages/battery/battery
version: 1.0.5

flutter:
plugin:
Expand All @@ -17,15 +17,17 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.0.5
battery_platform_interface: ^1.0.0

dev_dependencies:
async: ^2.0.8
test: ^1.3.0
mockito: 3.0.0
mockito: ^4.1.1
flutter_test:
sdk: flutter
plugin_platform_interface: ^1.0.0
integration_test:
path: ../integration_test
path: ../../integration_test
pedantic: ^1.8.0

environment:
Expand Down
45 changes: 45 additions & 0 deletions packages/battery/battery/test/battery_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2017 The Chromium 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:async';

import 'package:battery_platform_interface/battery_platform_interface.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:test/test.dart';
import 'package:battery/battery.dart';
import 'package:mockito/mockito.dart';

void main() {
group('battery', () {
Battery battery;
MockBatteryPlatform fakePlatform;
setUp(() async {
fakePlatform = MockBatteryPlatform();
BatteryPlatform.instance = fakePlatform;
battery = Battery();
});
test('batteryLevel', () async {
int result = await battery.batteryLevel;
expect(result, 42);
});
test('onBatteryStateChanged', () async {
BatteryState result = await battery.onBatteryStateChanged.first;
expect(result, BatteryState.full);
});
});
}

class MockBatteryPlatform extends Mock
with MockPlatformInterfaceMixin
implements BatteryPlatform {
Future<int> batteryLevel() async {
return 42;
}

Stream<BatteryState> onBatteryStateChanged() {
StreamController<BatteryState> result = StreamController<BatteryState>();
result.add(BatteryState.full);
return result.stream;
}
}
3 changes: 3 additions & 0 deletions packages/battery/battery_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial open-source release.
Loading