Move scaffold to video/chat screen

This commit is contained in:
Tommy Chow 2021-10-03 22:15:58 -04:00
parent 9bcefba327
commit 605ed5a40c
2 changed files with 15 additions and 14 deletions

View file

@ -1,3 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:frosty/models/channel.dart';
import 'package:frosty/widgets/chat.dart';
@ -10,17 +11,19 @@ class VideoChat extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Column(
children: [
AspectRatio(
aspectRatio: 16 / 9,
child: Video(channelName: channelInfo.userLogin),
),
Expanded(
child: Chat(channelInfo: channelInfo),
)
],
return Scaffold(
body: SafeArea(
child: Column(
children: [
AspectRatio(
aspectRatio: 16 / 9,
child: Video(channelName: channelInfo.userLogin),
),
Expanded(
child: Chat(channelInfo: channelInfo),
)
],
),
),
);
}

View file

@ -20,9 +20,7 @@ class ChannelCard extends StatelessWidget {
context,
CupertinoPageRoute(
builder: (context) {
return Scaffold(
body: VideoChat(channelInfo: channelInfo),
);
return VideoChat(channelInfo: channelInfo);
},
),
);