Skip to content

Commit a1d7969

Browse files
committed
Minor Improvements
1 parent 894fa5b commit a1d7969

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

lib/base/util/icon_text.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class SymbolText extends StatelessWidget {
99
this.style,
1010
this.textColor,
1111
this.multipleLines = false,
12-
this.leadingIcon = true,
12+
this.leading = true,
1313
this.mainAxisAlignment = MainAxisAlignment.start,
1414
this.iconSize,
1515
this.iconColor,
@@ -24,7 +24,7 @@ class SymbolText extends StatelessWidget {
2424
this.style,
2525
this.textColor,
2626
this.multipleLines = false,
27-
this.leadingIcon = true,
27+
this.leading = true,
2828
this.mainAxisAlignment = MainAxisAlignment.start,
2929
this.iconSize,
3030
this.gap = 4.0,
@@ -39,7 +39,7 @@ class SymbolText extends StatelessWidget {
3939
final Color? textColor;
4040
final MainAxisAlignment mainAxisAlignment;
4141
final bool multipleLines;
42-
final bool leadingIcon;
42+
final bool leading;
4343
final double? iconSize;
4444
final Color? iconColor;
4545
final double gap;
@@ -90,14 +90,14 @@ class SymbolText extends StatelessWidget {
9090
// 4. Construct the Children list based on leading/trailing logic
9191
final children = <Widget>[];
9292

93-
if (leadingIcon && symbolWidget != null) {
93+
if (leading && symbolWidget != null) {
9494
children.add(symbolWidget);
9595
children.add(SizedBox(width: gap)); // Only added if symbol exists
9696
}
9797

9898
children.add(textWidget);
9999

100-
if (!leadingIcon && symbolWidget != null) {
100+
if (!leading && symbolWidget != null) {
101101
children.add(SizedBox(width: gap)); // Only added if symbol exists
102102
children.add(symbolWidget);
103103
}

lib/homeComponent/view/contactCard/tuition_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class TuitionView extends ConsumerWidget {
8585
style: Theme.of(
8686
context,
8787
).textTheme.bodyMedium?.copyWith(color: Colors.green),
88-
leadingIcon: false,
88+
leading: false,
8989
);
9090
} else {
9191
final numberFormat = NumberFormat.currency(

lib/homeComponent/viewmodel/departures_viewmodel.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class DeparturesViewModel {
240240
? SymbolText.icon(
241241
iconData: Icons.check,
242242
label: e.name,
243-
leadingIcon: false,
243+
leading: false,
244244
)
245245
: Text(e.name),
246246
),

lib/onboardingComponent/views/confirm_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class _ConfirmViewState extends ConsumerState<ConfirmView> {
250250
iconData: Icons.arrow_forward,
251251
label: context.tr("checkToken"),
252252
style: const TextStyle(color: Colors.white),
253-
leadingIcon: false,
253+
leading: false,
254254
),
255255
);
256256
}

lib/placesComponent/views/campuses/campus_view.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ class _CampusViewState extends ConsumerState<CampusView> {
119119
children: [
120120
if (cafeterias.isNotEmpty)
121121
WidgetFrameView(
122-
titleWidget: SymbolText.icon(
123-
iconData: Icons.location_pin,
122+
titleWidget: SymbolText.image(
123+
image: Image.asset("assets/images/map/pin_blue.webp"),
124124
label: context.tr("cafeterias"),
125125
style: Theme.of(context).textTheme.titleMedium,
126-
leadingIcon: false,
126+
leading: false,
127127
),
128128
child: Card(
129129
child: SeparatedList.list(
@@ -134,12 +134,11 @@ class _CampusViewState extends ConsumerState<CampusView> {
134134
),
135135
if (studyRooms.isNotEmpty)
136136
WidgetFrameView(
137-
titleWidget: SymbolText.icon(
138-
iconData: Icons.location_pin,
137+
titleWidget: SymbolText.image(
138+
image: Image.asset("assets/images/map/pin_red.webp"),
139139
label: context.tr("studyRooms"),
140-
iconColor: Colors.red,
141140
style: Theme.of(context).textTheme.titleMedium,
142-
leadingIcon: false,
141+
leading: false,
143142
),
144143
child: Card(
145144
child: SeparatedList.list(

lib/studiesComponent/view/grade/chart_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ChartView extends ConsumerWidget {
3939
label: "$title ($degreeShort)",
4040
style: Theme.of(context).textTheme.bodyLarge,
4141
mainAxisAlignment: MainAxisAlignment.center,
42-
leadingIcon: false,
42+
leading: false,
4343
),
4444
),
4545
SfCartesianChart(

lib/studiesComponent/viewModel/grade_viewmodel.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class GradeViewModel {
105105
? SymbolText.icon(
106106
iconData: Icons.check,
107107
label: "$studyDesignation ($degreeShort)",
108-
leadingIcon: false,
108+
leading: false,
109109
)
110110
: Text("$studyDesignation ($degreeShort)"),
111111
);

0 commit comments

Comments
 (0)