fix(admin-app): fix 4 compile errors
- credit_page.dart: remove const from Padding containing context.t() call - issuer_coupon_service/redemption_service/issuer_finance_service: cast inner['total'] to int? to match named record return type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3d0223d10a
commit
af5aba8efe
|
|
@ -30,7 +30,7 @@ class IssuerCouponService {
|
||||||
?.map((e) => IssuerCouponModel.fromJson(e as Map<String, dynamic>))
|
?.map((e) => IssuerCouponModel.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
[];
|
[];
|
||||||
return (items: items, total: inner['total'] ?? items.length);
|
return (items: items, total: (inner['total'] as int?) ?? items.length);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('[IssuerCouponService] list 失败: $e');
|
debugPrint('[IssuerCouponService] list 失败: $e');
|
||||||
rethrow;
|
rethrow;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class IssuerFinanceService {
|
||||||
?.map((e) => TransactionModel.fromJson(e as Map<String, dynamic>))
|
?.map((e) => TransactionModel.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
[];
|
[];
|
||||||
return (items: items, total: inner['total'] ?? items.length);
|
return (items: items, total: (inner['total'] as int?) ?? items.length);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('[IssuerFinanceService] getTransactions 失败: $e');
|
debugPrint('[IssuerFinanceService] getTransactions 失败: $e');
|
||||||
rethrow;
|
rethrow;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class RedemptionService {
|
||||||
?.map((e) => RedemptionRecord.fromJson(e as Map<String, dynamic>))
|
?.map((e) => RedemptionRecord.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
[];
|
[];
|
||||||
return (items: items, total: inner['total'] ?? items.length);
|
return (items: items, total: (inner['total'] as int?) ?? items.length);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('[RedemptionService] getHistory 失败: $e');
|
debugPrint('[RedemptionService] getHistory 失败: $e');
|
||||||
rethrow;
|
rethrow;
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,8 @@ class _CreditPageState extends State<CreditPage> {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
if (factors.isEmpty)
|
if (factors.isEmpty)
|
||||||
const Padding(
|
Padding(
|
||||||
padding: EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Center(child: Text(context.t('credit_no_factors'), style: const TextStyle(color: AppColors.textTertiary))),
|
child: Center(child: Text(context.t('credit_no_factors'), style: const TextStyle(color: AppColors.textTertiary))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue