Merge pull request #1089 from GetStream/fix/overlapping_chat_docs

doc(repo): Fixed code in the overlapping chat with transparency docs
This commit is contained in:
Salvatore Giordano
2022-04-19 09:45:56 +02:00
committed by GitHub
@@ -64,30 +64,34 @@ The second type looks like this:
We can use a `Stack` for achieving this: We can use a `Stack` for achieving this:
```dart ```dart
Scaffold( Stack(
body: Stack( children: <Widget>[
children: <Widget>[ // Add your video implementation here
// Add your video implementation here ShaderMask(
ShaderMask( shaderCallback: (rect) {
shaderCallback: (rect) { return const LinearGradient(
return LinearGradient(
begin: Alignment.bottomCenter, begin: Alignment.bottomCenter,
end: Alignment.topCenter, end: Alignment.topCenter,
colors: [Colors.black, Colors.transparent], colors: [Colors.black, Colors.transparent],
stops: [0.4, 0.65] stops: [0.4, 0.8]).createShader(
).createShader(Rect.fromLTRB(0, 0, rect.width, rect.height)); Rect.fromLTRB(0, 0, rect.width, rect.height),
}, );
blendMode: BlendMode.dstIn, },
child: Column( blendMode: BlendMode.dstIn,
children: [ child: Column(
Expanded( children: const [
child: MessageListView(), Expanded(
), child: MessageListViewTheme(
MessageInput(), data: MessageListViewThemeData(
], backgroundColor: Colors.transparent,
), ),
), child: MessageListView(),
], ),
), ),
) MessageInput(),
],
),
),
],
),
``` ```