style: apply dart format across project
This commit is contained in:
@@ -48,10 +48,12 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ThemedText.headline(
|
||||
text: AppLocalizations.of(context).eventDiscountStatus,
|
||||
text: AppLocalizations.of(context)
|
||||
.eventDiscountStatus,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
@@ -79,7 +81,10 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
AppLocalizations.of(context).servicesInProgress(provider.activeEventSubscriptions.length),
|
||||
AppLocalizations.of(context)
|
||||
.servicesInProgress(provider
|
||||
.activeEventSubscriptions
|
||||
.length),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -97,15 +102,18 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
const Color(0xFFFF6B6B).withValues(alpha: 0.1),
|
||||
const Color(0xFFFF8787).withValues(alpha: 0.1),
|
||||
const Color(0xFFFF6B6B)
|
||||
.withValues(alpha: 0.1),
|
||||
const Color(0xFFFF8787)
|
||||
.withValues(alpha: 0.1),
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFFF6B6B).withValues(alpha: 0.3),
|
||||
color: const Color(0xFFFF6B6B)
|
||||
.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -118,10 +126,12 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
ThemedText(
|
||||
AppLocalizations.of(context).monthlySavingAmount,
|
||||
AppLocalizations.of(context)
|
||||
.monthlySavingAmount,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -154,24 +164,29 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
...provider.activeEventSubscriptions.map((sub) {
|
||||
final savings = sub.originalPrice - (sub.eventPrice ?? sub.originalPrice);
|
||||
final discountRate =
|
||||
((savings / sub.originalPrice) * 100).round();
|
||||
final savings = sub.originalPrice -
|
||||
(sub.eventPrice ?? sub.originalPrice);
|
||||
final discountRate =
|
||||
((savings / sub.originalPrice) * 100)
|
||||
.round();
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.darkNavy.withValues(alpha: 0.05),
|
||||
color: AppColors.darkNavy
|
||||
.withValues(alpha: 0.05),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: AppColors.darkNavy.withValues(alpha: 0.1),
|
||||
color: AppColors.darkNavy
|
||||
.withValues(alpha: 0.1),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
ThemedText(
|
||||
sub.serviceName,
|
||||
@@ -184,8 +199,8 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
FutureBuilder<String>(
|
||||
future: CurrencyUtil
|
||||
.formatAmount(
|
||||
future:
|
||||
CurrencyUtil.formatAmount(
|
||||
sub.originalPrice,
|
||||
sub.currency),
|
||||
builder: (context, snapshot) {
|
||||
@@ -194,9 +209,11 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
snapshot.data!,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
decoration: TextDecoration
|
||||
.lineThrough,
|
||||
color: AppColors.navyGray,
|
||||
decoration:
|
||||
TextDecoration
|
||||
.lineThrough,
|
||||
color: AppColors
|
||||
.navyGray,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -211,9 +228,10 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
FutureBuilder<String>(
|
||||
future: CurrencyUtil
|
||||
.formatAmount(
|
||||
sub.eventPrice ?? sub.originalPrice,
|
||||
future:
|
||||
CurrencyUtil.formatAmount(
|
||||
sub.eventPrice ??
|
||||
sub.originalPrice,
|
||||
sub.currency),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
@@ -244,7 +262,8 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFF6B6B)
|
||||
.withValues(alpha: 0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius:
|
||||
BorderRadius.circular(4),
|
||||
),
|
||||
child: Text(
|
||||
'$discountRate${AppLocalizations.of(context).discountPercent}',
|
||||
@@ -271,4 +290,4 @@ class EventAnalysisCard extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user