Skip to content

Commit 8754456

Browse files
committed
fix: null source
1 parent 32d461b commit 8754456

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/Screens/Info/Tabs/Watch/Widgets/SourceSelector.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@ class _SourceSelectorState extends ConsumerState<SourceSelector> {
4545
.toList()
4646
.reversed
4747
.toList();
48-
48+
if (installedSources.isEmpty) {
49+
return const Column(
50+
children: [
51+
buildDropdownMenu(
52+
padding: EdgeInsets.all(0),
53+
currentValue: 'No sources installed',
54+
options: ['No sources installed'],
55+
prefixIcon: Icons.source,
56+
),
57+
],
58+
);
59+
}
4960
String nameAndLang(Source source) {
5061
bool isDuplicateName =
5162
installedSources.where((s) => s.name == source.name).length > 1;
@@ -72,18 +83,7 @@ class _SourceSelectorState extends ConsumerState<SourceSelector> {
7283
}
7384
var theme = Theme.of(context).colorScheme;
7485

75-
if (installedSources.isEmpty) {
76-
return const Column(
77-
children: [
78-
buildDropdownMenu(
79-
padding: EdgeInsets.all(0),
80-
currentValue: 'No sources installed',
81-
options: ['No sources installed'],
82-
prefixIcon: Icons.source,
83-
),
84-
],
85-
);
86-
}
86+
8787
return Column(
8888
children: [
8989
Row(

0 commit comments

Comments
 (0)