refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:finlytic_app/features/favorites/cubit/favorites_cubit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../../core/network/api_client.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../core/utils/time_utils.dart';
|
||||
@@ -47,6 +49,8 @@ class NewsCardItem extends StatelessWidget {
|
||||
final matchedAssetsRaw = article['MatchedAssets'] ?? article['matchedAssets'];
|
||||
final matchedAssets = matchedAssetsRaw is List ? matchedAssetsRaw : [];
|
||||
|
||||
final favourites = context.read<FavoritesCubit>().state.favoriteDetails;
|
||||
|
||||
return GlassContainer(
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
onTap: () {
|
||||
@@ -101,9 +105,12 @@ class NewsCardItem extends StatelessWidget {
|
||||
spacing: 4,
|
||||
runSpacing: 4,
|
||||
children: matchedAssets.map((assetItem) {
|
||||
final assetSymbol = assetItem['Name']?.toString() ?? assetItem['name']?.toString() ?? assetItem['Isin']?.toString() ?? assetItem['isin']?.toString() ?? 'ASSET';
|
||||
final isin = assetItem['isin']!;
|
||||
final name = assetItem['name']!;
|
||||
final match = favourites.where((e) => e.isin == isin);
|
||||
final symbol = match.isEmpty ? null : match.first;
|
||||
return ActionChip(
|
||||
label: Text(assetSymbol, style: TextStyle(fontSize: 10, color: AppTheme.accentCyan)),
|
||||
label: Text(name, style: TextStyle(fontSize: 10, color: AppTheme.accentCyan)),
|
||||
backgroundColor: AppTheme.glassSurface,
|
||||
padding: EdgeInsets.zero,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
@@ -112,7 +119,9 @@ class NewsCardItem extends StatelessWidget {
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => AssetDetailScreen(
|
||||
symbol: assetSymbol,
|
||||
isin: assetItem,
|
||||
name: name,
|
||||
symbol: symbol != null ? symbol.symbol : null,
|
||||
apiClient: apiClient,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user