-
-
Save yaizudamashii/a8d6e746b09eccbbc73a92f4677794ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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