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

Commit e3449db

Browse files
committed
Merge branch 'master' of github.com:flutter/plugins into feat/add-github
2 parents 28e31b7 + 24344bc commit e3449db

File tree

319 files changed

+4834
-2919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+4834
-2919
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ task:
3333
task:
3434
name: build-ipas
3535
osx_instance:
36-
image: high-sierra-xcode-9.4
36+
image: high-sierra-xcode-9.4.1
3737
env:
3838
PATH: $PATH:/usr/local/bin
3939
matrix:

.opensource/project.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"iOS"
66
],
77
"content": "FlutterFire.md",
8-
"pages": [
9-
"packages/cloud_firestore/README.md",
10-
"packages/cloud_functions/README.md",
11-
"packages/firebase_admob/README.md",
12-
"packages/firebase_analytics/README.md",
13-
"packages/firebase_auth/README.md",
14-
"packages/firebase_core/README.md",
15-
"packages/firebase_database/README.md",
16-
"packages/firebase_dynamic_links/README.md",
17-
"packages/firebase_messaging/README.md",
18-
"packages/firebase_ml_vision/README.md",
19-
"packages/firebase_performance/README.md",
20-
"packages/firebase_remote_config/README.md",
21-
"packages/firebase_storage/README.md"
22-
]
23-
}
8+
"pages": {
9+
"packages/cloud_firestore/README.md": "Cloud Firestore",
10+
"packages/cloud_functions/README.md": "Cloud Functions",
11+
"packages/firebase_admob/README.md": "Admob",
12+
"packages/firebase_analytics/README.md": "Analytics",
13+
"packages/firebase_auth/README.md": "Authentication",
14+
"packages/firebase_core/README.md": "Core",
15+
"packages/firebase_database/README.md": "Realtime Database",
16+
"packages/firebase_dynamic_links/README.md": "Dynamic Links",
17+
"packages/firebase_messaging/README.md": "Cloud Messaging",
18+
"packages/firebase_ml_vision/README.md": "ML Kit: Vision",
19+
"packages/firebase_performance/README.md": "Performance Monitoring",
20+
"packages/firebase_remote_config/README.md": "Remote Config",
21+
"packages/firebase_storage/README.md": "Cloud Storage"
22+
}
23+
}

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ linter:
112112
# - prefer_interpolation_to_compose_strings # not yet tested
113113
- prefer_is_empty
114114
- prefer_is_not_empty
115+
- prefer_void_to_null
115116
# - recursive_getters # https://github.com/dart-lang/linter/issues/452
116117
- slash_for_doc_comments
117118
- sort_constructors_first
@@ -124,6 +125,7 @@ linter:
124125
- unnecessary_const
125126
- unnecessary_getters_setters
126127
# - unnecessary_lambdas # https://github.com/dart-lang/linter/issues/498
128+
- unnecessary_new
127129
- unnecessary_null_aware_assignments
128130
- unnecessary_null_in_if_null_operators
129131
# - unnecessary_overrides # https://github.com/dart-lang/linter/issues/626 and https://github.com/dart-lang/linter/issues/627

packages/android_alarm_manager/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Then in Dart code add:
2222
import 'package:android_alarm_manager/android_alarm_manager.dart';
2323
2424
void printHello() {
25-
final DateTime now = new DateTime.now();
25+
final DateTime now = DateTime.now();
2626
final int isolateId = Isolate.current.hashCode;
2727
print("[$now] Hello, world! isolate=${isolateId} function='$printHello'");
2828
}

packages/android_alarm_manager/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

packages/android_alarm_manager/example/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'package:flutter/widgets.dart';
1212
final FirebaseAuth firebaseAuth = FirebaseAuth.instance;
1313
FirebaseUser firebaseUser;
1414

15-
Future<Null> ensureFirebaseUser() async {
15+
Future<void> ensureFirebaseUser() async {
1616
if (firebaseUser == null) {
1717
firebaseUser = await firebaseAuth.currentUser();
1818
if (firebaseUser == null) {
@@ -22,14 +22,14 @@ Future<Null> ensureFirebaseUser() async {
2222
}
2323

2424
class HelloMessage {
25+
HelloMessage(this._now, this._msg, this._isolate, this._user, this._token);
26+
2527
final DateTime _now;
2628
final String _msg;
2729
final int _isolate;
2830
final FirebaseUser _user;
2931
final String _token;
3032

31-
HelloMessage(this._now, this._msg, this._isolate, this._user, this._token);
32-
3333
@override
3434
String toString() {
3535
return "[$_now] $_msg "
@@ -42,8 +42,8 @@ class HelloMessage {
4242
void printHelloMessage(String msg) {
4343
ensureFirebaseUser().then((_) {
4444
firebaseUser.getIdToken().then((String idToken) {
45-
print(new HelloMessage(
46-
new DateTime.now(),
45+
print(HelloMessage(
46+
DateTime.now(),
4747
msg,
4848
Isolate.current.hashCode,
4949
firebaseUser,
@@ -67,7 +67,7 @@ void printOneShot() {
6767
printHelloMessage("Hello, once!");
6868
}
6969

70-
Future<Null> main() async {
70+
Future<void> main() async {
7171
final int helloAlarmID = 0;
7272
final int goodbyeAlarmID = 1;
7373
final int oneShotID = 2;

packages/android_alarm_manager/lib/android_alarm_manager.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void _alarmManagerCallbackDispatcher() {
2828
// native portion of the plugin.
2929
_channel.setMethodCallHandler((MethodCall call) async {
3030
final dynamic args = call.arguments;
31-
final CallbackHandle handle = new CallbackHandle.fromRawHandle(args[0]);
31+
final CallbackHandle handle = CallbackHandle.fromRawHandle(args[0]);
3232

3333
// PluginUtilities.getCallbackFromHandle performs a lookup based on the
3434
// callback handle and returns a tear-off of the original callback.
@@ -100,7 +100,7 @@ class AndroidAlarmManager {
100100
bool exact = false,
101101
bool wakeup = false,
102102
}) async {
103-
final int now = new DateTime.now().millisecondsSinceEpoch;
103+
final int now = DateTime.now().millisecondsSinceEpoch;
104104
final int first = now + delay.inMilliseconds;
105105
final CallbackHandle handle = PluginUtilities.getCallbackHandle(callback);
106106
if (handle == null) {
@@ -145,7 +145,7 @@ class AndroidAlarmManager {
145145
bool exact = false,
146146
bool wakeup = false,
147147
}) async {
148-
final int now = new DateTime.now().millisecondsSinceEpoch;
148+
final int now = DateTime.now().millisecondsSinceEpoch;
149149
final int period = duration.inMilliseconds;
150150
final int first = now + period;
151151
final CallbackHandle handle = PluginUtilities.getCallbackHandle(callback);

packages/android_intent/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ mode, we assert that the platform should be Android.
77
Use it by specifying action, category, data and extra arguments for the intent.
88
It does not support returning the result of the launched activity. Sample usage:
99

10-
```
10+
```dart
1111
if (platform.isAndroid) {
12-
AndroidIntent intent = new AndroidIntent(
12+
AndroidIntent intent = AndroidIntent(
1313
action: 'action_view',
1414
data: 'https://play.google.com/store/apps/details?'
1515
'id=com.google.android.apps.myapp',

packages/android_intent/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

packages/android_intent/example/lib/main.dart

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ import 'package:flutter/material.dart';
77
import 'package:platform/platform.dart';
88

99
void main() {
10-
runApp(new MyApp());
10+
runApp(MyApp());
1111
}
1212

1313
class MyApp extends StatelessWidget {
1414
// This widget is the root of your application.
1515
@override
1616
Widget build(BuildContext context) {
17-
return new MaterialApp(
17+
return MaterialApp(
1818
title: 'Flutter Demo',
19-
theme: new ThemeData(
19+
theme: ThemeData(
2020
primarySwatch: Colors.blue,
2121
),
22-
home: new MyHomePage(),
22+
home: MyHomePage(),
2323
routes: <String, WidgetBuilder>{
2424
ExplicitIntentsWidget.routeName: (BuildContext context) =>
2525
const ExplicitIntentsWidget()
@@ -51,17 +51,17 @@ class MyHomePage extends StatelessWidget {
5151
Widget build(BuildContext context) {
5252
Widget body;
5353
if (const LocalPlatform().isAndroid) {
54-
body = new Padding(
54+
body = Padding(
5555
padding: const EdgeInsets.symmetric(vertical: 15.0),
56-
child: new Column(
56+
child: Column(
5757
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
5858
children: <Widget>[
59-
new RaisedButton(
59+
RaisedButton(
6060
child: const Text(
6161
'Tap here to set an alarm\non weekdays at 9:30pm.'),
6262
onPressed: _createAlarm,
6363
),
64-
new RaisedButton(
64+
RaisedButton(
6565
child: const Text('Tap here to test explicit intents.'),
6666
onPressed: () => _openExplicitIntentsView(context)),
6767
],
@@ -70,38 +70,38 @@ class MyHomePage extends StatelessWidget {
7070
} else {
7171
body = const Text('This plugin only works with Android');
7272
}
73-
return new Scaffold(
74-
appBar: new AppBar(
73+
return Scaffold(
74+
appBar: AppBar(
7575
title: const Text('Plugin example app'),
7676
),
77-
body: new Center(child: body),
77+
body: Center(child: body),
7878
);
7979
}
8080
}
8181

8282
class ExplicitIntentsWidget extends StatelessWidget {
83-
static const String routeName = "/explicitIntents";
84-
8583
const ExplicitIntentsWidget();
8684

85+
static const String routeName = "/explicitIntents";
86+
8787
void _openGoogleMapsStreetView() {
88-
final AndroidIntent intent = new AndroidIntent(
88+
final AndroidIntent intent = AndroidIntent(
8989
action: 'action_view',
9090
data: Uri.encodeFull('google.streetview:cbll=46.414382,10.013988'),
9191
package: 'com.google.android.apps.maps');
9292
intent.launch();
9393
}
9494

9595
void _displayMapInGoogleMaps({int zoomLevel = 12}) {
96-
final AndroidIntent intent = new AndroidIntent(
96+
final AndroidIntent intent = AndroidIntent(
9797
action: 'action_view',
9898
data: Uri.encodeFull('geo:37.7749,-122.4194?z=$zoomLevel'),
9999
package: 'com.google.android.apps.maps');
100100
intent.launch();
101101
}
102102

103103
void _launchTurnByTurnNavigationInGoogleMaps() {
104-
final AndroidIntent intent = new AndroidIntent(
104+
final AndroidIntent intent = AndroidIntent(
105105
action: 'action_view',
106106
data: Uri.encodeFull(
107107
'google.navigation:q=Taronga+Zoo,+Sydney+Australia&avoid=tf'),
@@ -110,15 +110,15 @@ class ExplicitIntentsWidget extends StatelessWidget {
110110
}
111111

112112
void _openLinkInGoogleChrome() {
113-
final AndroidIntent intent = new AndroidIntent(
113+
final AndroidIntent intent = AndroidIntent(
114114
action: 'action_view',
115115
data: Uri.encodeFull('https://flutter.io'),
116116
package: 'com.android.chrome');
117117
intent.launch();
118118
}
119119

120120
void _testExplicitIntentFallback() {
121-
final AndroidIntent intent = new AndroidIntent(
121+
final AndroidIntent intent = AndroidIntent(
122122
action: 'action_view',
123123
data: Uri.encodeFull('https://flutter.io'),
124124
package: 'com.android.chrome.implicit.fallback');
@@ -127,35 +127,35 @@ class ExplicitIntentsWidget extends StatelessWidget {
127127

128128
@override
129129
Widget build(BuildContext context) {
130-
return new Scaffold(
131-
appBar: new AppBar(
130+
return Scaffold(
131+
appBar: AppBar(
132132
title: const Text('Test explicit intents'),
133133
),
134-
body: new Center(
135-
child: new Padding(
134+
body: Center(
135+
child: Padding(
136136
padding: const EdgeInsets.symmetric(vertical: 15.0),
137-
child: new Column(
137+
child: Column(
138138
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
139139
children: <Widget>[
140-
new RaisedButton(
140+
RaisedButton(
141141
child: const Text(
142142
'Tap here to display panorama\nimagery in Google Street View.'),
143143
onPressed: _openGoogleMapsStreetView,
144144
),
145-
new RaisedButton(
145+
RaisedButton(
146146
child: const Text('Tap here to display\na map in Google Maps.'),
147147
onPressed: _displayMapInGoogleMaps,
148148
),
149-
new RaisedButton(
149+
RaisedButton(
150150
child: const Text(
151151
'Tap here to launch turn-by-turn\nnavigation in Google Maps.'),
152152
onPressed: _launchTurnByTurnNavigationInGoogleMaps,
153153
),
154-
new RaisedButton(
154+
RaisedButton(
155155
child: const Text('Tap here to open link in Google Chrome.'),
156156
onPressed: _openLinkInGoogleChrome,
157157
),
158-
new RaisedButton(
158+
RaisedButton(
159159
child: const Text(
160160
'Tap here to test explicit intent fallback to implicit.'),
161161
onPressed: _testExplicitIntentFallback,

packages/android_intent/lib/android_intent.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ const String kChannelName = 'plugins.flutter.io/android_intent';
1212

1313
/// Flutter plugin for launching arbitrary Android Intents.
1414
class AndroidIntent {
15-
final String action;
16-
final String category;
17-
final String data;
18-
final Map<String, dynamic> arguments;
19-
final String package;
20-
final MethodChannel _channel;
21-
final Platform _platform;
22-
2315
/// Builds an Android intent with the following parameters
2416
/// [action] refers to the action parameter of the intent.
2517
/// [category] refers to the category of the intent, can be null.
@@ -38,11 +30,19 @@ class AndroidIntent {
3830
_channel = const MethodChannel(kChannelName),
3931
_platform = platform ?? const LocalPlatform();
4032

33+
final String action;
34+
final String category;
35+
final String data;
36+
final Map<String, dynamic> arguments;
37+
final String package;
38+
final MethodChannel _channel;
39+
final Platform _platform;
40+
4141
/// Launch the intent.
4242
///
4343
/// This works only on Android platforms. Please guard the call so that your
4444
/// iOS app does not crash. Checked mode will throw an assert exception.
45-
Future<Null> launch() async {
45+
Future<void> launch() async {
4646
assert(_platform.isAndroid);
4747
final Map<String, dynamic> args = <String, dynamic>{'action': action};
4848
if (category != null) {

packages/battery/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To use this plugin, add `battery` as a [dependency in your pubspec.yaml file](ht
1414
import 'package:battery/battery.dart';
1515
1616
// Instantiate it
17-
var battery = new Battery();
17+
var battery = Battery();
1818
1919
// Access current battery level
2020
print(battery.batteryLevel);

packages/battery/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

0 commit comments

Comments
 (0)