Skip to content

Commit de9f7df

Browse files
committed
chore: dart format
1 parent 89b00d7 commit de9f7df

37 files changed

Lines changed: 812 additions & 1125 deletions

File tree

lib/notifications/notification_card.dart

Lines changed: 40 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ import '../widgets/rounded_container.dart';
2828
import '../widgets/rounded_white_container.dart';
2929

3030
class NotificationCard extends ConsumerWidget {
31-
const NotificationCard({
32-
super.key,
33-
required this.notification,
34-
});
31+
const NotificationCard({super.key, required this.notification});
3532

3633
final NotificationModel notification;
3734

@@ -45,8 +42,9 @@ class NotificationCard extends ConsumerWidget {
4542

4643
String coinIconPath(IThemeAssets assets, WidgetRef ref) {
4744
try {
48-
final coin =
49-
AppConfig.getCryptoCurrencyByPrettyName(notification.coinName);
45+
final coin = AppConfig.getCryptoCurrencyByPrettyName(
46+
notification.coinName,
47+
);
5048
return ref.read(coinIconProvider(coin));
5149
} catch (_) {
5250
return notification.iconAssetName;
@@ -61,23 +59,13 @@ class NotificationCard extends ConsumerWidget {
6159
children: [
6260
RoundedWhiteContainer(
6361
padding: isDesktop
64-
? const EdgeInsets.symmetric(
65-
horizontal: 20,
66-
vertical: 10,
67-
)
62+
? const EdgeInsets.symmetric(horizontal: 20, vertical: 10)
6863
: const EdgeInsets.all(12),
6964
child: Row(
7065
children: [
7166
notification.changeNowId == null
7267
? SvgPicture.file(
73-
File(
74-
coinIconPath(
75-
ref.watch(
76-
themeAssetsProvider,
77-
),
78-
ref,
79-
),
80-
),
68+
File(coinIconPath(ref.watch(themeAssetsProvider), ref)),
8169
width: isDesktop ? desktopIconSize : mobileIconSize,
8270
height: isDesktop ? desktopIconSize : mobileIconSize,
8371
)
@@ -89,24 +77,15 @@ class NotificationCard extends ConsumerWidget {
8977
borderRadius: BorderRadius.circular(24),
9078
),
9179
child: SvgPicture.file(
92-
File(
93-
coinIconPath(
94-
ref.watch(
95-
themeAssetsProvider,
96-
),
97-
ref,
98-
),
99-
),
100-
color: Theme.of(context)
101-
.extension<StackColors>()!
102-
.accentColorDark,
80+
File(coinIconPath(ref.watch(themeAssetsProvider), ref)),
81+
color: Theme.of(
82+
context,
83+
).extension<StackColors>()!.accentColorDark,
10384
width: isDesktop ? desktopIconSize : mobileIconSize,
10485
height: isDesktop ? desktopIconSize : mobileIconSize,
10586
),
10687
),
107-
const SizedBox(
108-
width: 12,
109-
),
88+
const SizedBox(width: 12),
11089
Expanded(
11190
child: Column(
11291
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -120,52 +99,54 @@ class NotificationCard extends ConsumerWidget {
12099
Text(
121100
"New",
122101
style:
123-
STextStyles.desktopTextExtraExtraSmall(context)
124-
.copyWith(
125-
color: Theme.of(context)
126-
.extension<StackColors>()!
127-
.accentColorGreen,
128-
),
102+
STextStyles.desktopTextExtraExtraSmall(
103+
context,
104+
).copyWith(
105+
color: Theme.of(
106+
context,
107+
).extension<StackColors>()!.accentColorGreen,
108+
),
129109
),
130110
],
131111
),
132112
child: Text(
133113
notification.title,
134114
style: isDesktop
135-
? STextStyles.desktopTextExtraExtraSmall(context)
136-
.copyWith(
137-
color: Theme.of(context)
138-
.extension<StackColors>()!
139-
.textDark,
115+
? STextStyles.desktopTextExtraExtraSmall(
116+
context,
117+
).copyWith(
118+
color: Theme.of(
119+
context,
120+
).extension<StackColors>()!.textDark,
140121
)
141122
: STextStyles.titleBold12(context),
142123
),
143124
),
144-
const SizedBox(
145-
height: 2,
146-
),
125+
const SizedBox(height: 2),
147126
Row(
148127
mainAxisAlignment: MainAxisAlignment.spaceBetween,
149128
children: [
150129
Text(
151130
notification.description,
152131
style: isDesktop
153-
? STextStyles.desktopTextExtraExtraSmall(context)
154-
.copyWith(
155-
color: Theme.of(context)
156-
.extension<StackColors>()!
157-
.textSubtitle1,
132+
? STextStyles.desktopTextExtraExtraSmall(
133+
context,
134+
).copyWith(
135+
color: Theme.of(
136+
context,
137+
).extension<StackColors>()!.textSubtitle1,
158138
)
159139
: STextStyles.label(context),
160140
),
161141
Text(
162142
extractPrettyDateString(notification.date),
163143
style: isDesktop
164-
? STextStyles.desktopTextExtraExtraSmall(context)
165-
.copyWith(
166-
color: Theme.of(context)
167-
.extension<StackColors>()!
168-
.textSubtitle1,
144+
? STextStyles.desktopTextExtraExtraSmall(
145+
context,
146+
).copyWith(
147+
color: Theme.of(
148+
context,
149+
).extension<StackColors>()!.textSubtitle1,
169150
)
170151
: STextStyles.label(context),
171152
),
@@ -180,10 +161,9 @@ class NotificationCard extends ConsumerWidget {
180161
if (notification.read)
181162
Positioned.fill(
182163
child: RoundedContainer(
183-
color: Theme.of(context)
184-
.extension<StackColors>()!
185-
.background
186-
.withValues(alpha: 0.5),
164+
color: Theme.of(
165+
context,
166+
).extension<StackColors>()!.background.withValues(alpha: 0.5),
187167
),
188168
),
189169
],

0 commit comments

Comments
 (0)