✨ Shows account own activities on account page
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:island/pods/userinfo.dart';
|
|||||||
import 'package:island/screens/notification.dart';
|
import 'package:island/screens/notification.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
import 'package:island/widgets/account/account_name.dart';
|
import 'package:island/widgets/account/account_name.dart';
|
||||||
|
import 'package:island/widgets/account/activity_presence.dart';
|
||||||
import 'package:island/widgets/account/status.dart';
|
import 'package:island/widgets/account/status.dart';
|
||||||
import 'package:island/widgets/account/leveling_progress.dart';
|
import 'package:island/widgets/account/leveling_progress.dart';
|
||||||
import 'package:island/widgets/alert.dart';
|
import 'package:island/widgets/alert.dart';
|
||||||
@@ -177,7 +178,21 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
).padding(horizontal: 8),
|
).padding(horizontal: 8),
|
||||||
Card(
|
Card(
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
child: AccountStatusCreationWidget(uname: user.value!.name),
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AccountStatusCreationWidget(uname: user.value!.name),
|
||||||
|
ActivityPresenceWidget(
|
||||||
|
uname: user.value!.name,
|
||||||
|
isCompact: true,
|
||||||
|
compactPadding: const EdgeInsets.only(
|
||||||
|
left: 16,
|
||||||
|
right: 16,
|
||||||
|
bottom: 8,
|
||||||
|
top: 4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
).padding(horizontal: 12, bottom: 4),
|
).padding(horizontal: 12, bottom: 4),
|
||||||
LevelingProgressCard(
|
LevelingProgressCard(
|
||||||
isCompact: true,
|
isCompact: true,
|
||||||
@@ -251,7 +266,9 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
).padding(horizontal: 12),
|
).padding(horizontal: 12),
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
ConstrainedBox(
|
ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width),
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: MediaQuery.of(context).size.width,
|
||||||
|
),
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
const minWidth = 160.0;
|
const minWidth = 160.0;
|
||||||
@@ -312,14 +329,23 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
if (availableWidth > totalMin) {
|
if (availableWidth > totalMin) {
|
||||||
return Row(
|
return Row(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: children.map((child) => Expanded(child: child)).toList(),
|
children:
|
||||||
|
children
|
||||||
|
.map((child) => Expanded(child: child))
|
||||||
|
.toList(),
|
||||||
).padding(horizontal: 12).height(48);
|
).padding(horizontal: 12).height(48);
|
||||||
} else {
|
} else {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: Row(
|
child: Row(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: children.map((child) => SizedBox(width: minWidth, child: child)).toList(),
|
children:
|
||||||
|
children
|
||||||
|
.map(
|
||||||
|
(child) =>
|
||||||
|
SizedBox(width: minWidth, child: child),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
).padding(horizontal: 12),
|
).padding(horizontal: 12),
|
||||||
).height(48);
|
).height(48);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user