update some icons and assets

This commit is contained in:
Amir Hossein Mousavi 2024-04-12 21:01:34 +03:30
parent e2e7414228
commit 4b5dfe5e38
9 changed files with 92 additions and 76 deletions

View File

@ -98,7 +98,7 @@ class _BookmarksState extends State<Bookmarks> {
MenuOption( MenuOption(
onTap: () => _onCategorySelected(7), onTap: () => _onCategorySelected(7),
title: 'اینفوگرافی', title: 'اینفوگرافی',
icon: DidvanIcons.info_circle_regular, icon: DidvanIcons.infography_regular,
iconSize: 24, iconSize: 24,
), ),
], ],
@ -110,7 +110,7 @@ class _BookmarksState extends State<Bookmarks> {
child: AnimatedVisibility( child: AnimatedVisibility(
duration: DesignConfig.lowAnimationDuration, duration: DesignConfig.lowAnimationDuration,
isVisible: !state.searching, isVisible: !state.searching,
child: const ItemTitle(title: 'آخرین نشان شده‌ها'), child: const ItemTitle(title: 'نشان شده‌ها'),
), ),
), ),
], ],

View File

@ -106,6 +106,7 @@ class InfoTitle extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
children: [ children: [
const Icon(DidvanIcons.infography_solid),
const SizedBox(width: 4), const SizedBox(width: 4),
DidvanText( DidvanText(
"اینفوگرافی", "اینفوگرافی",
@ -151,7 +152,7 @@ class _MainPageSection extends StatelessWidget {
return DidvanIcons.exclamation_triangle_solid; return DidvanIcons.exclamation_triangle_solid;
case 'startup': case 'startup':
return DidvanIcons.startup_solid; return DidvanIcons.startup_solid;
case 'saha': case 'delphi':
return DidvanIcons.saha_solid; return DidvanIcons.saha_solid;
default: default:
return null; return null;

View File

@ -77,7 +77,10 @@ class _NewStatisticState extends State<NewStatistic> {
"title": state.contents[0].header, "title": state.contents[0].header,
}).then((value) => state.getStatistic()); }).then((value) => state.getStatistic());
}), }),
child: StatHeader(header: state.contents[0].header)), child: StatHeader(
header: state.contents[0].header,
icon: DidvanIcons.star_circle_solid,
)),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -102,7 +105,10 @@ class _NewStatisticState extends State<NewStatistic> {
"title": state.contents[1].header "title": state.contents[1].header
}); });
}).then((value) => _reset()), }).then((value) => _reset()),
child: StatHeader(header: state.contents[1].header)), child: StatHeader(
header: state.contents[1].header,
icon: DidvanIcons.currency_solid,
)),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -124,7 +130,10 @@ class _NewStatisticState extends State<NewStatistic> {
"title": state.contents[2].header "title": state.contents[2].header
}); });
}), }),
child: StatHeader(header: state.contents[2].header)), child: StatHeader(
header: state.contents[2].header,
icon: DidvanIcons.bitcoin_solid,
)),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -139,14 +148,15 @@ class _NewStatisticState extends State<NewStatistic> {
verticalPadding: 4, verticalPadding: 4,
), ),
GestureDetector( GestureDetector(
onTap: () => Future.delayed(Duration.zero, () { onTap: () => Future.delayed(Duration.zero, () {
Navigator.of(context).pushNamed(Routes.statGeneral, Navigator.of(context).pushNamed(Routes.statGeneral,
arguments: { arguments: {"id": 3, "title": state.contents[3].header});
"id": 3, }),
"title": state.contents[3].header child: StatHeader(
}); header: state.contents[3].header,
}), icon: DidvanIcons.commodity_solid,
child: StatHeader(header: state.contents[3].header)), ),
),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -168,7 +178,10 @@ class _NewStatisticState extends State<NewStatistic> {
"title": state.contents[4].header "title": state.contents[4].header
}); });
}), }),
child: StatHeader(header: state.contents[4].header)), child: StatHeader(
header: state.contents[4].header,
icon: DidvanIcons.industry_solid,
)),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -190,7 +203,10 @@ class _NewStatisticState extends State<NewStatistic> {
"title": state.contents[5].header, "title": state.contents[5].header,
}); });
}), }),
child: StatHeader(header: state.contents[5].header)), child: StatHeader(
header: state.contents[5].header,
icon: DidvanIcons.metal_solid,
)),
SizedBox( SizedBox(
height: 100, height: 100,
width: 80, width: 80,
@ -305,7 +321,8 @@ class StatMainCard extends StatelessWidget {
class StatHeader extends StatelessWidget { class StatHeader extends StatelessWidget {
final String header; final String header;
const StatHeader({super.key, required this.header}); final IconData icon;
const StatHeader({super.key, required this.header, required this.icon});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -322,10 +339,10 @@ class StatHeader extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
Icon(icon),
const SizedBox(width: 4), const SizedBox(width: 4),
DidvanText( DidvanText(
// ignore: unnecessary_string_interpolations header,
"$header",
style: Theme.of(context).textTheme.titleMedium, style: Theme.of(context).textTheme.titleMedium,
color: Theme.of(context).colorScheme.title, color: Theme.of(context).colorScheme.title,
), ),

View File

@ -66,7 +66,9 @@ class _NewStatisticOverviewCardState extends State<NewStatisticOverviewCard> {
Row( Row(
children: [ children: [
DidvanIconButton( DidvanIconButton(
icon: marked ? Icons.star : Icons.star_border, icon: marked
? DidvanIcons.star_solid
: DidvanIcons.star_regular,
color: marked color: marked
? Theme.of(context).colorScheme.yellow ? Theme.of(context).colorScheme.yellow
: Theme.of(context).colorScheme.focusedBorder, : Theme.of(context).colorScheme.focusedBorder,

View File

@ -40,33 +40,30 @@ class NewStatisticCategories extends StatelessWidget {
.map( .map(
(e) => GestureDetector( (e) => GestureDetector(
onTap: () => _onTap(e.id, e.label, context, context), onTap: () => _onTap(e.id, e.label, context, context),
child: Padding( child: SizedBox(
padding: const EdgeInsets.all(12.0), width: (MediaQuery.of(context).size.width - 56) / 3,
child: SizedBox( child: Column(
width: (MediaQuery.of(context).size.width - 40) / 4, children: [
child: Column( Container(
children: [ width: 56,
Container( height: 56,
width: 56, padding: const EdgeInsets.all(8),
height: 56, decoration: BoxDecoration(
padding: const EdgeInsets.all(8), color: Theme.of(context).colorScheme.surface,
decoration: BoxDecoration( borderRadius: DesignConfig.lowBorderRadius,
color: Theme.of(context).colorScheme.surface, boxShadow: DesignConfig.defaultShadow,
borderRadius: DesignConfig.lowBorderRadius,
boxShadow: DesignConfig.defaultShadow,
),
child: SvgPicture.asset(e.asset),
), ),
const SizedBox(height: 4), child: SvgPicture.asset(e.asset),
DidvanText( ),
e.label, const SizedBox(height: 4),
color: Theme.of(context).colorScheme.title, DidvanText(
style: Theme.of(context).textTheme.labelSmall, e.label,
fontWeight: FontWeight.w600, color: Theme.of(context).colorScheme.title,
), style: Theme.of(context).textTheme.labelSmall,
const SizedBox(height: 12), fontWeight: FontWeight.w600,
], ),
), const SizedBox(height: 12),
],
), ),
), ),
), ),

View File

@ -53,7 +53,9 @@ class _StatisticDetailsState extends State<StatisticDetails> {
hasBack: true, hasBack: true,
subtitle: 'رادار قیمت‌ها', subtitle: 'رادار قیمت‌ها',
trailing: DidvanIconButton( trailing: DidvanIconButton(
icon: state.marked ? Icons.star : Icons.star_border, icon: state.marked
? DidvanIcons.star_solid
: DidvanIcons.star_regular,
color: state.marked color: state.marked
? Theme.of(context).colorScheme.yellow ? Theme.of(context).colorScheme.yellow
: Theme.of(context).colorScheme.focusedBorder, : Theme.of(context).colorScheme.focusedBorder,

View File

@ -35,33 +35,30 @@ class MainCategories extends StatelessWidget {
.map( .map(
(e) => GestureDetector( (e) => GestureDetector(
onTap: () => _onTap(e.link, context), onTap: () => _onTap(e.link, context),
child: Padding( child: SizedBox(
padding: const EdgeInsets.all(12.0), width: (MediaQuery.of(context).size.width - 40) / 3,
child: SizedBox( child: Column(
width: (MediaQuery.of(context).size.width - 40) / 4, children: [
child: Column( Container(
children: [ width: 56,
Container( height: 56,
width: 56, padding: const EdgeInsets.all(8),
height: 56, decoration: BoxDecoration(
padding: const EdgeInsets.all(8), color: Theme.of(context).colorScheme.surface,
decoration: BoxDecoration( borderRadius: DesignConfig.lowBorderRadius,
color: Theme.of(context).colorScheme.surface, boxShadow: DesignConfig.defaultShadow,
borderRadius: DesignConfig.lowBorderRadius,
boxShadow: DesignConfig.defaultShadow,
),
child: SvgPicture.asset(e.asset),
), ),
const SizedBox(height: 4), child: SvgPicture.asset(e.asset),
DidvanText( ),
e.label, const SizedBox(height: 4),
color: Theme.of(context).colorScheme.title, DidvanText(
style: Theme.of(context).textTheme.labelSmall, e.label,
fontWeight: FontWeight.w600, color: Theme.of(context).colorScheme.title,
), style: Theme.of(context).textTheme.labelSmall,
const SizedBox(height: 12), fontWeight: FontWeight.w600,
], ),
), const SizedBox(height: 12),
],
), ),
), ),
), ),

View File

@ -79,8 +79,8 @@ class DidvanBNB extends StatelessWidget {
_NavBarItem( _NavBarItem(
isSelected: currentTabIndex == 3, isSelected: currentTabIndex == 3,
title: 'رصدخانه من', title: 'رصدخانه من',
selectedIcon: DidvanIcons.radar_solid, selectedIcon: DidvanIcons.antenna_solid,
unselectedIcon: DidvanIcons.radar_light, unselectedIcon: DidvanIcons.antenna_light,
onTap: () => onTabChanged(3), onTap: () => onTabChanged(3),
), ),
], ],

View File

@ -191,7 +191,7 @@ class _DidvanTextFieldState extends State<DidvanTextField> {
}); });
}, },
child: Icon( child: Icon(
_hideContent ? DidvanIcons.eye_solid : DidvanIcons.eye_slash_solid, _hideContent ? DidvanIcons.eye_solid : DidvanIcons.eye_close_solid,
), ),
), ),
); );