|
|
|
@ -60,9 +60,11 @@ class PinnedEvents extends StatelessWidget {
|
|
|
|
|
? snapshot.data?.last
|
|
|
|
|
: null;
|
|
|
|
|
|
|
|
|
|
if (event != null && pinnedEvents != null) {
|
|
|
|
|
final fontSize =
|
|
|
|
|
AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
|
|
|
|
if (event == null || pinnedEvents == null) {
|
|
|
|
|
return Container();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
|
|
|
|
return Material(
|
|
|
|
|
color: Theme.of(context).appBarTheme.backgroundColor,
|
|
|
|
|
elevation: Theme.of(context).appBarTheme.elevation ?? 10,
|
|
|
|
@ -120,22 +122,6 @@ class PinnedEvents extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else if (snapshot.hasError) {
|
|
|
|
|
Logs().e('Error loading pinned events.', snapshot.error);
|
|
|
|
|
return ListTile(
|
|
|
|
|
tileColor: Theme.of(context).secondaryHeaderColor,
|
|
|
|
|
title: Text(L10n.of(context)!.pinnedEventsError));
|
|
|
|
|
} else {
|
|
|
|
|
return ListTile(
|
|
|
|
|
tileColor: Theme.of(context).secondaryHeaderColor,
|
|
|
|
|
title: const Center(
|
|
|
|
|
child: SizedBox.square(
|
|
|
|
|
dimension: 24,
|
|
|
|
|
child: CircularProgressIndicator(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|