Merge branch 'v4' into docs/v4

This commit is contained in:
Salvatore Giordano
2022-04-29 16:26:09 +02:00
129 changed files with 3773 additions and 819 deletions
@@ -64,30 +64,35 @@ The second type looks like this:
We can use a `Stack` for achieving this:
```dart
Scaffold(
body: Stack(
children: <Widget>[
// Add your video implementation here
ShaderMask(
shaderCallback: (rect) {
return LinearGradient(
Stack(
children: <Widget>[
// Add your video implementation here
ShaderMask(
shaderCallback: (rect) {
return const LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [Colors.black, Colors.transparent],
stops: [0.4, 0.65]
).createShader(Rect.fromLTRB(0, 0, rect.width, rect.height));
},
blendMode: BlendMode.dstIn,
child: Column(
children: [
Expanded(
child: StreamMessageListView(),
),
StreamMessageInput(),
],
),
),
],
),
)
colors: [Colors.black, Colors.transparent],
stops: [0.4, 0.8]).createShader(
Rect.fromLTRB(0, 0, rect.width, rect.height),
);
},
blendMode: BlendMode.dstIn,
child: Column(
children: const [
Expanded(
child: StreamMessageListViewTheme(
data: StreamMessageListViewThemeData(
backgroundColor: Colors.transparent,
),
child: StreamMessageListView(),
),
),
StreamMessageInput(),
],
),
),
],
),
```
@@ -86,6 +86,14 @@ firebaseMessaging.onTokenRefresh.listen((token) {
});
```
Push Notifications v2 also supports specifying a name to the push device tokens you register. By setting the optional `pushProviderName` param in the `addDevice` call you can support different configurations between the device and the `PushProvider`.
```dart
firebaseMessaging.onTokenRefresh.listen((token) {
client.addDevice(token, PushProvider.firebase, pushProviderName: 'my-custom-config');
});
```
### Receiving Notifications
Push notifications behave a bit differently depending on whether you are using iOS or Android.