Skip to content

Instantly share code, notes, and snippets.

@yaizudamashii
Created August 5, 2021 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaizudamashii/a8d6e746b09eccbbc73a92f4677794ef to your computer and use it in GitHub Desktop.
Save yaizudamashii/a8d6e746b09eccbbc73a92f4677794ef to your computer and use it in GitHub Desktop.
body: SafeArea(
child: usersStream.when(
data: (model) {
return Stack(
children: [
Column(
children: [
/* 略 */,
Expanded(
child: FutureBuilder<List<User>>(
future: model.participants(),
builder: (BuildContext context, AsyncSnapshot<List<User>> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
List<User> users = snapshot.data;
return Padding(
padding: EdgeInsets.only(top: 16.0),
child: GridView.count(
crossAxisCount: numTilesHorizontal,
children: List.generate(users.length, (index) {
final user = users[index];
return SpeakerTile(
model: SpeakerTileViewModel(speaker: user)
);
}),
),
);
} else {
return Center(child: CircularProgressIndicator());
}
}
)
),
]
/*
後略
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment