mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-18 16:16:14 +08:00
dyn addition jump
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -243,10 +243,10 @@ class DynamicsHttp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Future<LoadingState<VoteInfo>> doVote({
|
static Future<LoadingState<VoteInfo>> doVote({
|
||||||
required int voteId,
|
required voteId,
|
||||||
required List<int> votes,
|
required List<int> votes,
|
||||||
bool anonymity = false,
|
bool anonymity = false,
|
||||||
int? dynamicId,
|
dynamicId,
|
||||||
}) async {
|
}) async {
|
||||||
final csrf = Accounts.main.csrf;
|
final csrf = Accounts.main.csrf;
|
||||||
final data = {
|
final data = {
|
||||||
|
|||||||
@@ -396,8 +396,10 @@ class Vote {
|
|||||||
int? type;
|
int? type;
|
||||||
int? uid;
|
int? uid;
|
||||||
int? voteId;
|
int? voteId;
|
||||||
|
String? desc;
|
||||||
|
|
||||||
Vote.fromJson(Map<String, dynamic> json) {
|
Vote.fromJson(Map<String, dynamic> json) {
|
||||||
|
desc = json['desc'];
|
||||||
choiceCnt = json['choice_cnt'];
|
choiceCnt = json['choice_cnt'];
|
||||||
share = json['share'];
|
share = json['share'];
|
||||||
defaultShare = json['default_share'];
|
defaultShare = json['default_share'];
|
||||||
@@ -805,6 +807,7 @@ class RichTextNodeItem {
|
|||||||
String? type;
|
String? type;
|
||||||
String? rid;
|
String? rid;
|
||||||
List<OpusPicsModel>? pics;
|
List<OpusPicsModel>? pics;
|
||||||
|
String? jumpUrl;
|
||||||
|
|
||||||
RichTextNodeItem.fromJson(Map<String, dynamic> json) {
|
RichTextNodeItem.fromJson(Map<String, dynamic> json) {
|
||||||
emoji = json['emoji'] != null ? Emoji.fromJson(json['emoji']) : null;
|
emoji = json['emoji'] != null ? Emoji.fromJson(json['emoji']) : null;
|
||||||
@@ -817,6 +820,7 @@ class RichTextNodeItem {
|
|||||||
: (json['pics'] as List?)
|
: (json['pics'] as List?)
|
||||||
?.map((e) => OpusPicsModel.fromJson(e))
|
?.map((e) => OpusPicsModel.fromJson(e))
|
||||||
.toList();
|
.toList();
|
||||||
|
jumpUrl = json['jump_url'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class OpusContent extends StatelessWidget {
|
|||||||
showVoteDialog(
|
showVoteDialog(
|
||||||
context,
|
context,
|
||||||
element.linkCard!.card!.vote?.voteId ??
|
element.linkCard!.card!.vote?.voteId ??
|
||||||
int.parse(element.linkCard!.card!.oid!),
|
element.linkCard!.card!.oid,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +1,47 @@
|
|||||||
|
import 'package:PiliPlus/build_config.dart';
|
||||||
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/http/dynamics.dart';
|
import 'package:PiliPlus/http/dynamics.dart';
|
||||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||||
|
import 'package:PiliPlus/pages/dynamics/widgets/vote.dart';
|
||||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
|
||||||
/// TODO 点击跳转
|
|
||||||
Widget addWidget(
|
Widget addWidget(
|
||||||
ThemeData theme, DynamicItemModel item, BuildContext context, type,
|
ThemeData theme, DynamicItemModel item, BuildContext context, type,
|
||||||
{floor = 1}) {
|
{floor = 1}) {
|
||||||
Color bgColor = floor == 1
|
late final Color bgColor = floor == 1
|
||||||
? theme.dividerColor.withOpacity(0.08)
|
? theme.dividerColor.withOpacity(0.08)
|
||||||
: theme.colorScheme.surface;
|
: theme.colorScheme.surface;
|
||||||
|
try {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'ADDITIONAL_TYPE_UGC':
|
|
||||||
final content = item.modules.moduleDynamic!.additional!.ugc!;
|
|
||||||
// 转发的投稿
|
// 转发的投稿
|
||||||
return InkWell(
|
case 'ADDITIONAL_TYPE_UGC':
|
||||||
onTap: content.jumpUrl == null
|
final ugc = item.modules.moduleDynamic!.additional!.ugc!;
|
||||||
|
final borderRadius = floor == 1 ? null : StyleString.mdRadius;
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 6),
|
||||||
|
child: Material(
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
color: bgColor,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
onTap: ugc.jumpUrl == null
|
||||||
? null
|
? null
|
||||||
: () {
|
: () {
|
||||||
PiliScheme.routePushFromUrl(content.jumpUrl!);
|
PiliScheme.routePushFromUrl(ugc.jumpUrl!);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(left: 12, top: 8, right: 12, bottom: 8),
|
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
color: bgColor,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
width: 120,
|
width: 120,
|
||||||
height: 75,
|
height: 75,
|
||||||
src: content.cover,
|
src: ugc.cover,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -40,13 +50,13 @@ Widget addWidget(
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
content.title!,
|
ugc.title!,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
content.descSecond!,
|
ugc.descSecond!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.colorScheme.outline,
|
color: theme.colorScheme.outline,
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
fontSize: theme.textTheme.labelMedium!.fontSize,
|
||||||
@@ -58,20 +68,26 @@ Widget addWidget(
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
case 'ADDITIONAL_TYPE_RESERVE':
|
case 'ADDITIONAL_TYPE_RESERVE':
|
||||||
final content = item.modules.moduleDynamic!.additional!.reserve!;
|
final reserve = item.modules.moduleDynamic!.additional!.reserve!;
|
||||||
return content.state != -1
|
late final borderRadius = floor == 1 ? null : StyleString.mdRadius;
|
||||||
? content.title != null
|
return reserve.state != -1
|
||||||
|
? reserve.title != null
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(top: 8),
|
padding: const EdgeInsets.only(top: 6),
|
||||||
|
child: Material(
|
||||||
|
color: bgColor,
|
||||||
|
borderRadius: borderRadius,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Container(
|
borderRadius: borderRadius,
|
||||||
width: double.infinity,
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 12, vertical: 10),
|
horizontal: 12, vertical: 10),
|
||||||
color: bgColor,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -79,7 +95,7 @@ Widget addWidget(
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
content.title!,
|
reserve.title!,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -88,25 +104,25 @@ Widget addWidget(
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.colorScheme.outline,
|
color: theme.colorScheme.outline,
|
||||||
fontSize:
|
fontSize: theme
|
||||||
theme.textTheme.labelMedium!.fontSize,
|
.textTheme.labelMedium!.fontSize,
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
if (content.desc1 != null)
|
if (reserve.desc1 != null)
|
||||||
TextSpan(text: content.desc1!.text),
|
TextSpan(text: reserve.desc1!.text),
|
||||||
const TextSpan(text: ' '),
|
const TextSpan(text: ' '),
|
||||||
if (content.desc2 != null)
|
if (reserve.desc2 != null)
|
||||||
TextSpan(text: content.desc2!.text),
|
TextSpan(text: reserve.desc2!.text),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (content.button != null)
|
if (reserve.button != null)
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final btn = content.button!;
|
final btn = reserve.button!;
|
||||||
final isReserved = btn.status == btn.type;
|
final isReserved = btn.status == btn.type;
|
||||||
final bool canJump = btn.jumpUrl != null;
|
final bool canJump = btn.jumpUrl != null;
|
||||||
return FilledButton.tonal(
|
return FilledButton.tonal(
|
||||||
@@ -137,21 +153,24 @@ Widget addWidget(
|
|||||||
: btn.disable == 1
|
: btn.disable == 1
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
var res =
|
var res = await DynamicsHttp
|
||||||
await DynamicsHttp.dynReserve(
|
.dynReserve(
|
||||||
reserveId: content.rid,
|
reserveId: reserve.rid,
|
||||||
curBtnStatus: btn.status,
|
curBtnStatus: btn.status,
|
||||||
dynamicIdStr: item.idStr,
|
dynamicIdStr: item.idStr,
|
||||||
reserveTotal:
|
reserveTotal:
|
||||||
content.reserveTotal,
|
reserve.reserveTotal,
|
||||||
);
|
);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
content
|
reserve
|
||||||
..desc2?.text =
|
..desc2?.text =
|
||||||
res['data']['desc_update']
|
res['data']
|
||||||
..reserveTotal = res['data']
|
['desc_update']
|
||||||
|
..reserveTotal =
|
||||||
|
res['data']
|
||||||
['reserve_update']
|
['reserve_update']
|
||||||
..button!.status = res['data']
|
..button!.status = res[
|
||||||
|
'data']
|
||||||
['final_btn_status'];
|
['final_btn_status'];
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
(context as Element?)
|
(context as Element?)
|
||||||
@@ -176,22 +195,206 @@ Widget addWidget(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: const SizedBox.shrink()
|
: const SizedBox.shrink()
|
||||||
: const SizedBox.shrink();
|
: const SizedBox.shrink();
|
||||||
case 'ADDITIONAL_TYPE_GOODS':
|
|
||||||
// final content = item.modules.moduleDynamic!.additional!.goods;
|
|
||||||
// 商品
|
// 商品
|
||||||
|
case 'ADDITIONAL_TYPE_GOODS':
|
||||||
|
final content = item.modules.moduleDynamic!.additional!.goods!;
|
||||||
|
if (content.items?.isNotEmpty == true) {
|
||||||
|
final borderRadius = floor == 1 ? null : StyleString.mdRadius;
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 6),
|
||||||
|
child: Material(
|
||||||
|
color: bgColor,
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: content.items!.map((e) {
|
||||||
|
return InkWell(
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
onTap: () {
|
||||||
|
PiliScheme.routePushFromUrl(e.jumpUrl!);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12, vertical: 8),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
if (e.cover?.isNotEmpty == true) ...[
|
||||||
|
NetworkImgLayer(
|
||||||
|
width: 45,
|
||||||
|
height: 45,
|
||||||
|
src: e.cover,
|
||||||
|
radius: 6,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
],
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
e.name!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
if (e.price?.isNotEmpty == true)
|
||||||
|
Text.rich(
|
||||||
|
TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: '${e.price}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: theme.colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const TextSpan(
|
||||||
|
text: ' 起',
|
||||||
|
style: TextStyle(fontSize: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (e.jumpDesc?.isNotEmpty == true) ...[
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
FilledButton.tonal(
|
||||||
|
onPressed: () {
|
||||||
|
PiliScheme.routePushFromUrl(e.jumpUrl!);
|
||||||
|
},
|
||||||
|
style: FilledButton.styleFrom(
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6)),
|
||||||
|
),
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
visualDensity: const VisualDensity(
|
||||||
|
horizontal: -2, vertical: -3),
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
),
|
||||||
|
child: Text(e.jumpDesc!),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
case 'ADDITIONAL_TYPE_MATCH':
|
// case 'ADDITIONAL_TYPE_MATCH':
|
||||||
// final content = item.modules.moduleDynamic!.additional!.match;
|
// final content = item.modules.moduleDynamic!.additional!.match;
|
||||||
return const SizedBox.shrink();
|
// return const SizedBox.shrink();
|
||||||
case 'ADDITIONAL_TYPE_COMMON':
|
// case 'ADDITIONAL_TYPE_COMMON':
|
||||||
// final content = item.modules.moduleDynamic!.additional!.common;
|
// final content = item.modules.moduleDynamic!.additional!.common;
|
||||||
return const SizedBox.shrink();
|
// return const SizedBox.shrink();
|
||||||
case 'ADDITIONAL_TYPE_VOTE':
|
case 'ADDITIONAL_TYPE_VOTE':
|
||||||
return const SizedBox.shrink();
|
final vote = item.modules.moduleDynamic!.additional!.vote!;
|
||||||
|
final borderRadius = floor == 1 ? null : StyleString.mdRadius;
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 6),
|
||||||
|
child: Material(
|
||||||
|
color: bgColor,
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: borderRadius,
|
||||||
|
onTap: () {
|
||||||
|
showVoteDialog(
|
||||||
|
context,
|
||||||
|
vote.voteId,
|
||||||
|
item.idStr,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: floor == 1
|
||||||
|
? theme.colorScheme.surface
|
||||||
|
: theme.dividerColor.withOpacity(0.08),
|
||||||
|
borderRadius:
|
||||||
|
const BorderRadius.all(Radius.circular(8)),
|
||||||
|
),
|
||||||
|
width: 70,
|
||||||
|
height: 56,
|
||||||
|
child: const Icon(Icons.bar_chart_rounded),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
vote.desc!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${Utils.numFormat(vote.joinNum)}人参与',
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13, color: theme.colorScheme.outline),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
FilledButton.tonal(
|
||||||
|
onPressed: () {
|
||||||
|
showVoteDialog(
|
||||||
|
context,
|
||||||
|
vote.voteId,
|
||||||
|
item.idStr,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: FilledButton.styleFrom(
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
visualDensity:
|
||||||
|
const VisualDensity(horizontal: -2, vertical: -3),
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
),
|
||||||
|
child: const Text('参与'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
|
if (BuildConfig.isDebug) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
child: Text('additional panel\ntype: $type'),
|
||||||
|
);
|
||||||
|
}
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
child: SelectableText(
|
||||||
|
'''
|
||||||
|
additional panel error
|
||||||
|
id: ${item.idStr}
|
||||||
|
type: $type
|
||||||
|
err: $e''',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,10 +123,7 @@ TextSpan? richNode(
|
|||||||
),
|
),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
final dynIdStr = item.basic?.commentIdStr;
|
showVoteDialog(context, i.rid, item.basic?.commentIdStr);
|
||||||
final dynId =
|
|
||||||
dynIdStr != null ? int.tryParse(dynIdStr) : null;
|
|
||||||
showVoteDialog(context, int.parse(i.rid!), dynId);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -175,7 +172,6 @@ TextSpan? richNode(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/// TODO 商品
|
|
||||||
case 'RICH_TEXT_NODE_TYPE_GOODS':
|
case 'RICH_TEXT_NODE_TYPE_GOODS':
|
||||||
spanChildren
|
spanChildren
|
||||||
..add(
|
..add(
|
||||||
@@ -192,6 +188,12 @@ TextSpan? richNode(
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
text: '${i.text} ',
|
text: '${i.text} ',
|
||||||
style: authorStyle,
|
style: authorStyle,
|
||||||
|
recognizer: i.jumpUrl == null
|
||||||
|
? null
|
||||||
|
: (TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
PiliScheme.routePushFromUrl(i.jumpUrl!);
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -340,8 +340,7 @@ class PercentageChip<T> extends StatelessWidget {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Future showVoteDialog(BuildContext context, int voteId,
|
Future showVoteDialog(BuildContext context, voteId, [dynamicId]) async {
|
||||||
[int? dynamicId]) async {
|
|
||||||
final voteInfo = await DynamicsHttp.voteInfo(voteId);
|
final voteInfo = await DynamicsHttp.voteInfo(voteId);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
if (voteInfo.isSuccess) {
|
if (voteInfo.isSuccess) {
|
||||||
|
|||||||
Reference in New Issue
Block a user