Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63883291
homePage.dart
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 23, 03:49
Size
2 KB
Mime Type
text/x-c++
Expires
Sat, May 25, 03:49 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17830553
Attached To
R10646 Orchestration
homePage.dart
View Options
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'package:student/SoCKet.dart';
class HomePage extends StatefulWidget {
final String title;
final WebSocketChannel channel;
final SoCKet webSoCKet = new SoCKet();
HomePage({Key key, @required this.title, @required this.channel})
: super(key: key);
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
TextEditingController _controller = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Group Members',
style: const TextStyle(
color: Colors.blue,
fontSize: 25.0,
fontWeight: FontWeight.bold,
),
),
Form(
child: TextFormField(
controller: _controller,
decoration: InputDecoration(labelText: 'your name'),
),
),
Form(
child: TextFormField(
controller: _controller,
decoration: InputDecoration(labelText: 'your name'),
),
),
Form(
child: TextFormField(
controller: _controller,
decoration: InputDecoration(labelText: 'your name'),
),
),
StreamBuilder(
stream: widget.channel.stream,
builder: (context, snapshot) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 24.0),
child: Text(snapshot.hasData ? '${snapshot.data}' : ''),
);
},
)
],
),
),
floatingActionButton: FloatingActionButton(
tooltip: 'Send message',
child: Icon(Icons.send),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
@override
void dispose() {
// widget.channel.sink.close();
super.dispose();
}
}
Event Timeline
Log In to Comment