|
|
|
|
@ -306,31 +306,23 @@ class MessagePracticeActivityCardState extends State<PracticeActivityCard> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String? get userMessage {
|
|
|
|
|
if (!fetchingActivity && currentActivity == null) {
|
|
|
|
|
return L10n.of(context)!.noActivitiesFound;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
if (userMessage != null) {
|
|
|
|
|
return GamifiedTextWidget(userMessage: userMessage!);
|
|
|
|
|
if (!fetchingActivity && currentActivity == null) {
|
|
|
|
|
return GamifiedTextWidget(
|
|
|
|
|
userMessage: L10n.of(context)!.noActivitiesFound,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Stack(
|
|
|
|
|
return Stack(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
// Main content
|
|
|
|
|
const Positioned(
|
|
|
|
|
child: PointsGainedAnimation(),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
padding: const EdgeInsets.all(8),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(8, 20, 8, 8),
|
|
|
|
|
child: activityWidget,
|
|
|
|
|
),
|
|
|
|
|
// Conditionally show the darkening and progress indicator based on the loading state
|
|
|
|
|
@ -354,8 +346,6 @@ class MessagePracticeActivityCardState extends State<PracticeActivityCard> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|