Skip to content

Commit a8a71a6

Browse files
authored
style: added dark mode for empty list placeholder (#61)
1 parent 331f1aa commit a8a71a6

File tree

7 files changed

+28
-7
lines changed

7 files changed

+28
-7
lines changed

assets/logo/empty_dark.svg

Lines changed: 6 additions & 0 deletions
Loading

lib/components/rss_filter_details.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ class _RSSFilterDetailsState extends State<RSSFilterDetails> {
143143
: Expanded(
144144
child: Center(
145145
child: SvgPicture.asset(
146-
'assets/logo/empty.svg',
146+
Theme.of(context).brightness == Brightness.light
147+
? 'assets/logo/empty.svg'
148+
: 'assets/logo/empty_dark.svg',
147149
width: 120,
148150
height: 120,
149151
),

lib/pages/downloads_page.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ class _DownloadsPageState extends State<DownloadsPage> {
9191
: Expanded(
9292
child: Center(
9393
child: SvgPicture.asset(
94-
'assets/logo/empty.svg',
94+
Theme.of(context).brightness == Brightness.light
95+
? 'assets/logo/empty.svg'
96+
: 'assets/logo/empty_dark.svg',
9597
width: 120,
9698
height: 120,
9799
),

lib/pages/rss_feeds.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class _RSSFeedsState extends State<RSSFeeds> {
6565
: Expanded(
6666
child: Center(
6767
child: SvgPicture.asset(
68-
'assets/logo/empty.svg',
68+
Theme.of(context).brightness == Brightness.light
69+
? 'assets/logo/empty.svg'
70+
: 'assets/logo/empty_dark.svg',
6971
width: 120,
7072
height: 120,
7173
),

lib/pages/torrents_list_page.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ class TorrentsListPage extends StatelessWidget {
9292
mainAxisAlignment: MainAxisAlignment.center,
9393
children: [
9494
SvgPicture.asset(
95-
'assets/logo/empty.svg',
95+
Theme.of(context).brightness ==
96+
Brightness.light
97+
? 'assets/logo/empty.svg'
98+
: 'assets/logo/empty_dark.svg',
9699
width: 120,
97100
height: 120,
98101
),
@@ -116,7 +119,9 @@ class TorrentsListPage extends StatelessWidget {
116119
mainAxisAlignment: MainAxisAlignment.center,
117120
children: [
118121
SvgPicture.asset(
119-
'assets/logo/empty.svg',
122+
Theme.of(context).brightness == Brightness.light
123+
? 'assets/logo/empty.svg'
124+
: 'assets/logo/empty_dark.svg',
120125
width: 120,
121126
height: 120,
122127
),

lib/screens/disk_explorer_screen.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ class _DiskExplorerState extends State<DiskExplorer> {
9393
: Expanded(
9494
child: Center(
9595
child: SvgPicture.asset(
96-
'assets/logo/empty.svg',
96+
Theme.of(context).brightness == Brightness.light
97+
? 'assets/logo/empty.svg'
98+
: 'assets/logo/empty_dark.svg',
9799
width: 120,
98100
height: 120,
99101
),

lib/screens/history_screen.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ class _HistoryScreenState extends State<HistoryScreen> {
135135
: Expanded(
136136
child: Center(
137137
child: SvgPicture.asset(
138-
'assets/logo/empty.svg',
138+
Theme.of(context).brightness == Brightness.light
139+
? 'assets/logo/empty.svg'
140+
: 'assets/logo/empty_dark.svg',
139141
width: 120,
140142
height: 120,
141143
),

0 commit comments

Comments
 (0)