example app: allow scroll in connect page
This commit is contained in:
@@ -110,74 +110,77 @@ class _ConnectPageState extends State<ConnectPage> {
|
|||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
body: Container(
|
body: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Container(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.symmetric(
|
child: Container(
|
||||||
horizontal: 20,
|
padding: const EdgeInsets.symmetric(
|
||||||
),
|
horizontal: 20,
|
||||||
constraints: const BoxConstraints(maxWidth: 400),
|
vertical: 20,
|
||||||
child: Column(
|
),
|
||||||
mainAxisSize: MainAxisSize.min,
|
constraints: const BoxConstraints(maxWidth: 400),
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
child: Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
Padding(
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
padding: const EdgeInsets.only(bottom: 70),
|
children: [
|
||||||
child: SvgPicture.asset(
|
Padding(
|
||||||
'images/logo-dark.svg',
|
padding: const EdgeInsets.only(bottom: 70),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'images/logo-dark.svg',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(bottom: 25),
|
||||||
padding: const EdgeInsets.only(bottom: 25),
|
child: LKTextField(
|
||||||
child: LKTextField(
|
label: 'Server URL',
|
||||||
label: 'Server URL',
|
ctrl: _uriCtrl,
|
||||||
ctrl: _uriCtrl,
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(bottom: 25),
|
||||||
padding: const EdgeInsets.only(bottom: 25),
|
child: LKTextField(
|
||||||
child: LKTextField(
|
label: 'Token',
|
||||||
label: 'Token',
|
ctrl: _tokenCtrl,
|
||||||
ctrl: _tokenCtrl,
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
padding: const EdgeInsets.only(bottom: 50),
|
child: Row(
|
||||||
child: Row(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
children: [
|
||||||
children: [
|
const Text('Simulcast'),
|
||||||
const Text('Simulcast'),
|
Switch(
|
||||||
Switch(
|
value: _simulcast,
|
||||||
value: _simulcast,
|
onChanged: (value) => _setSimulcast(value),
|
||||||
onChanged: (value) => _setSimulcast(value),
|
inactiveTrackColor: Colors.white.withOpacity(.2),
|
||||||
inactiveTrackColor: Colors.white.withOpacity(.2),
|
activeTrackColor: LKColors.lkBlue,
|
||||||
activeTrackColor: LKColors.lkBlue,
|
inactiveThumbColor: Colors.white.withOpacity(.5),
|
||||||
inactiveThumbColor: Colors.white.withOpacity(.5),
|
activeColor: Colors.white,
|
||||||
activeColor: Colors.white,
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
ElevatedButton(
|
||||||
ElevatedButton(
|
onPressed: _busy ? null : () => _connect(context),
|
||||||
onPressed: _busy ? null : () => _connect(context),
|
child: Row(
|
||||||
child: Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
if (_busy)
|
||||||
if (_busy)
|
const Padding(
|
||||||
const Padding(
|
padding: EdgeInsets.only(right: 10),
|
||||||
padding: EdgeInsets.only(right: 10),
|
child: SizedBox(
|
||||||
child: SizedBox(
|
height: 15,
|
||||||
height: 15,
|
width: 15,
|
||||||
width: 15,
|
child: CircularProgressIndicator(
|
||||||
child: CircularProgressIndicator(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
strokeWidth: 2,
|
||||||
strokeWidth: 2,
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const Text('CONNECT'),
|
||||||
const Text('CONNECT'),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class LocalParticipant extends Participant {
|
|||||||
|
|
||||||
final pub = LocalTrackPublication(trackInfo, track, this);
|
final pub = LocalTrackPublication(trackInfo, track, this);
|
||||||
addTrackPublication(pub);
|
addTrackPublication(pub);
|
||||||
|
|
||||||
[events, roomEvents].emit(TrackPublishedEvent(
|
[events, roomEvents].emit(TrackPublishedEvent(
|
||||||
participant: this,
|
participant: this,
|
||||||
publication: pub,
|
publication: pub,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class LocalVideoTrack extends VideoTrack {
|
|||||||
// stop the current track & stream
|
// stop the current track & stream
|
||||||
await mediaStreamTrack.stop();
|
await mediaStreamTrack.stop();
|
||||||
await mediaStream.dispose();
|
await mediaStream.dispose();
|
||||||
|
|
||||||
// create new track with options
|
// create new track with options
|
||||||
final newStream = await _createStream(currentOptions);
|
final newStream = await _createStream(currentOptions);
|
||||||
final newTrack = newStream.getVideoTracks().first;
|
final newTrack = newStream.getVideoTracks().first;
|
||||||
|
|||||||
Reference in New Issue
Block a user