💄 Optimize explore page styles
This commit is contained in:
@@ -140,30 +140,27 @@ class VerificationStatusCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
mark.type == 4
|
||||
? Symbols.play_circle
|
||||
: mark.type == 0
|
||||
? Symbols.build_circle
|
||||
: Symbols.verified,
|
||||
size: 32,
|
||||
color: kVerificationMarkColors[mark.type],
|
||||
fill: 1,
|
||||
),
|
||||
const Gap(8),
|
||||
Text(mark.title ?? 'No title').bold(),
|
||||
Text(mark.description ?? 'descriptionNone'.tr()),
|
||||
const Gap(6),
|
||||
Text(
|
||||
'Verified by\n${mark.verifiedBy ?? 'No one verified it'}',
|
||||
).fontSize(11).opacity(0.8),
|
||||
],
|
||||
).padding(horizontal: 24, vertical: 16),
|
||||
);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
mark.type == 4
|
||||
? Symbols.play_circle
|
||||
: mark.type == 0
|
||||
? Symbols.build_circle
|
||||
: Symbols.verified,
|
||||
size: 32,
|
||||
color: kVerificationMarkColors[mark.type],
|
||||
fill: 1,
|
||||
),
|
||||
const Gap(8),
|
||||
Text(mark.title ?? 'No title').bold(),
|
||||
Text(mark.description ?? 'descriptionNone'.tr()),
|
||||
const Gap(6),
|
||||
Text(
|
||||
'Verified by\n${mark.verifiedBy ?? 'No one verified it'}',
|
||||
).fontSize(11).opacity(0.8),
|
||||
],
|
||||
).padding(horizontal: 24, vertical: 16);
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,8 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
|
||||
final String? eventCalanderUser;
|
||||
|
||||
final EdgeInsets? margin;
|
||||
|
||||
const FortuneGraphWidget({
|
||||
super.key,
|
||||
required this.events,
|
||||
@@ -34,6 +36,7 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
this.height = 180,
|
||||
this.onPointSelected,
|
||||
this.eventCalanderUser,
|
||||
this.margin,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -249,7 +252,7 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
if (constrainWidth) {
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: Card(margin: EdgeInsets.all(16), child: content),
|
||||
child: Card(margin: margin ?? EdgeInsets.all(16), child: content),
|
||||
).center();
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,8 @@ Future<SnCheckInResult?> checkInResultToday(Ref ref) async {
|
||||
}
|
||||
|
||||
class CheckInWidget extends HookConsumerWidget {
|
||||
const CheckInWidget({super.key});
|
||||
final EdgeInsets? margin;
|
||||
const CheckInWidget({super.key, this.margin});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
@@ -66,7 +67,8 @@ class CheckInWidget extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return Card(
|
||||
margin: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8),
|
||||
margin:
|
||||
margin ?? EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 16,
|
||||
|
@@ -94,9 +94,7 @@ class SliverPostList extends HookConsumerWidget {
|
||||
|
||||
final post = data.items[index];
|
||||
|
||||
return Column(
|
||||
children: [_buildPostItem(post), const Divider(height: 1)],
|
||||
);
|
||||
return _buildPostItem(post);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -114,7 +112,10 @@ class SliverPostList extends HookConsumerWidget {
|
||||
onUpdate: onUpdate,
|
||||
);
|
||||
case PostItemType.regular:
|
||||
return PostItem(item: post);
|
||||
return Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
child: PostActionableItem(item: post, borderRadius: 8),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -93,16 +93,14 @@ class PostRepliesList extends HookConsumerWidget {
|
||||
return endItemView;
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
PostItem(
|
||||
item: data.items[index],
|
||||
backgroundColor:
|
||||
backgroundColor ?? (isWide ? Colors.transparent : null),
|
||||
isShowReference: false,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
return Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
child: PostActionableItem(
|
||||
item: data.items[index],
|
||||
backgroundColor:
|
||||
backgroundColor ?? (isWide ? Colors.transparent : null),
|
||||
isShowReference: false,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user