Skip to content

Commit 5ae2cf9

Browse files
committed
fix isolate selector color issue
1 parent fb3986f commit 5ae2cf9

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

packages/devtools_app/lib/src/framework/scaffold/status_line.dart

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ class IsolateSelector extends StatelessWidget {
274274
return MultiValueListenableBuilder(
275275
listenables: [isolateManager.isolates, isolateManager.selectedIsolate],
276276
builder: (context, values, _) {
277-
final theme = Theme.of(context);
278277
final isolates = values.first as List<IsolateRef>;
279278
final selectedIsolateRef = values.second as IsolateRef?;
280279
return PopupMenuButton<IsolateRef?>(
@@ -286,31 +285,24 @@ class IsolateSelector extends StatelessWidget {
286285
isolates.map((ref) {
287286
return PopupMenuItem<IsolateRef>(
288287
value: ref,
289-
child: IsolateOption(
290-
ref,
291-
color: theme.colorScheme.onSurface,
292-
),
288+
child: _IsolateOption(ref),
293289
);
294290
}).toList(),
295-
child: IsolateOption(
296-
isolateManager.selectedIsolate.value,
297-
color: theme.colorScheme.onPrimary,
298-
),
291+
child: _IsolateOption(isolateManager.selectedIsolate.value),
299292
);
300293
},
301294
);
302295
}
303296
}
304297

305-
class IsolateOption extends StatelessWidget {
306-
const IsolateOption(this.ref, {required this.color, super.key});
298+
class _IsolateOption extends StatelessWidget {
299+
const _IsolateOption(this.ref);
307300

308301
final IsolateRef? ref;
309302

310-
final Color color;
311-
312303
@override
313304
Widget build(BuildContext context) {
305+
final color = Theme.of(context).colorScheme.onSurface;
314306
return Row(
315307
children: [
316308
Icon(

0 commit comments

Comments
 (0)