ref(ui): remove initial data to fix flickering in mentions overlay.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-29 17:16:56 +05:30
committed by xsahil03x
parent c19b72c042
commit a0c98aa851
@@ -67,7 +67,6 @@ class UserMentionsOverlay extends StatefulWidget {
class _UserMentionsOverlayState extends State<UserMentionsOverlay> {
late Future<List<User>> userMentionsFuture;
late List<User> initialMentions = membersAndWatchers;
@override
void initState() {
@@ -102,8 +101,9 @@ class _UserMentionsOverlayState extends State<UserMentionsOverlay> {
decoration: BoxDecoration(color: theme.colorTheme.barsBg),
child: FutureBuilder<List<User>>(
future: userMentionsFuture,
initialData: initialMentions,
builder: (context, snapshot) {
if (snapshot.hasError) return const Offstage();
if (!snapshot.hasData) return const Offstage();
final users = snapshot.data!;
return ListView.builder(
padding: const EdgeInsets.all(0),