Skip to content

Commit

Permalink
refactor(dashboard_app): Remove background of widget item icons
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Aug 30, 2024
1 parent 0be6b59 commit 812aea3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class DashboardWidgetItem extends StatelessWidget {
Widget build(BuildContext context) {
Widget leading = SizedBox.square(
dimension: largeIconSize,
child: NeonImageWrapper(
borderRadius: roundIcon ? BorderRadius.circular(largeIconSize) : null,
child: ClipRRect(
borderRadius: roundIcon ? BorderRadius.circular(largeIconSize) : BorderRadius.zero,
child: item.iconUrl.isNotEmpty
? NeonUriImage(
uri: Uri.parse(item.iconUrl),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ void main() {
isNotNull,
),
);
expect(find.byType(NeonImageWrapper), findsOneWidget);
expect(find.byType(ClipRRect), findsOneWidget);
expect(
tester.widget(find.byType(NeonImageWrapper)),
isA<NeonImageWrapper>().having(
tester.widget(find.byType(ClipRRect)),
isA<ClipRRect>().having(
(a) => a.borderRadius,
'borderRadius is correct',
BorderRadius.circular(largeIconSize),
Expand All @@ -98,11 +98,11 @@ void main() {
);

expect(
tester.widget(find.byType(NeonImageWrapper)),
isA<NeonImageWrapper>().having(
tester.widget(find.byType(ClipRRect)),
isA<ClipRRect>().having(
(a) => a.borderRadius,
'borderRadius is null',
null,
'borderRadius is zero',
BorderRadius.zero,
),
);

Expand Down Expand Up @@ -301,10 +301,10 @@ void main() {
isNotNull,
),
);
expect(find.byType(NeonImageWrapper), findsOneWidget);
expect(find.byType(ClipRRect), findsOneWidget);
expect(
tester.widget(find.byType(NeonImageWrapper)),
isA<NeonImageWrapper>().having(
tester.widget(find.byType(ClipRRect)),
isA<ClipRRect>().having(
(a) => a.borderRadius,
'borderRadius is correct',
BorderRadius.circular(largeIconSize),
Expand Down Expand Up @@ -364,11 +364,11 @@ void main() {
);

expect(
tester.widget(find.byType(NeonImageWrapper)),
isA<NeonImageWrapper>().having(
tester.widget(find.byType(ClipRRect)),
isA<ClipRRect>().having(
(a) => a.borderRadius,
'borderRadius is null',
null,
'borderRadius is zero',
BorderRadius.zero,
),
);

Expand Down

0 comments on commit 812aea3

Please sign in to comment.