Skip to content

Commit 8c24ef0

Browse files
committed
Take advantage of wildcards
1 parent f87afc2 commit 8c24ef0

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

pkgs/dartpad_ui/lib/editor/editor.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,21 @@ class _EditorWidgetState extends State<EditorWidget> implements EditorService {
231231

232232
codeMirror!.on(
233233
'change',
234-
([JSAny? _, JSAny? __, JSAny? ___]) {
234+
([JSAny? _, JSAny? _, JSAny? _]) {
235235
_updateModelFromCodemirror(codeMirror!.getDoc().getValue());
236236
}.toJS,
237237
);
238238

239239
codeMirror!.on(
240240
'focus',
241-
([JSAny? _, JSAny? __]) {
241+
([JSAny? _, JSAny? _]) {
242242
_focusNode.requestFocus();
243243
}.toJS,
244244
);
245245

246246
codeMirror!.on(
247247
'blur',
248-
([JSAny? _, JSAny? __]) {
248+
([JSAny? _, JSAny? _]) {
249249
_focusNode.unfocus();
250250
}.toJS,
251251
);

pkgs/dartpad_ui/lib/genai_editing.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class EditorWithButtons extends StatelessWidget {
5454
// Dartdoc help button
5555
ValueListenableBuilder<bool>(
5656
valueListenable: appModel.docHelpBusy,
57-
builder: (_, bool value, __) {
57+
builder: (_, bool value, _) {
5858
return PointerInterceptor(
5959
child: MiniIconButton(
6060
icon: const Icon(Icons.help_outline),
@@ -70,7 +70,7 @@ class EditorWithButtons extends StatelessWidget {
7070
// Format action
7171
ValueListenableBuilder<bool>(
7272
valueListenable: appModel.formattingBusy,
73-
builder: (_, bool value, __) {
73+
builder: (_, bool value, _) {
7474
return PointerInterceptor(
7575
child: MiniIconButton(
7676
icon: const Icon(Icons.format_align_left),
@@ -85,11 +85,11 @@ class EditorWithButtons extends StatelessWidget {
8585
// Run action
8686
ValueListenableBuilder(
8787
valueListenable: appModel.showReload,
88-
builder: (_, bool value, __) {
88+
builder: (_, bool value, _) {
8989
if (!value) return const SizedBox();
9090
return ValueListenableBuilder<bool>(
9191
valueListenable: appModel.canReload,
92-
builder: (_, bool value, __) {
92+
builder: (_, bool value, _) {
9393
return PointerInterceptor(
9494
child: ReloadButton(
9595
onPressed: value ? onCompileAndReload : null,
@@ -103,7 +103,7 @@ class EditorWithButtons extends StatelessWidget {
103103
// Run action
104104
ValueListenableBuilder<CompilingState>(
105105
valueListenable: appModel.compilingState,
106-
builder: (_, compiling, __) {
106+
builder: (_, compiling, _) {
107107
return PointerInterceptor(
108108
child: RunButton(
109109
onPressed:

pkgs/dartpad_ui/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class LoadingOverlay extends StatelessWidget {
553553
final theme = Theme.of(context);
554554
return ValueListenableBuilder<CompilingState>(
555555
valueListenable: appModel.compilingState,
556-
builder: (_, compilingState, __) {
556+
builder: (_, compilingState, _) {
557557
final color = theme.colorScheme.surface;
558558
final compiling = compilingState == CompilingState.restarting;
559559

@@ -642,7 +642,7 @@ class DartPadAppBar extends StatelessWidget implements PreferredSizeWidget {
642642
child: Center(
643643
child: ValueListenableBuilder<String>(
644644
valueListenable: appModel.title,
645-
builder: (_, String value, __) => Text(value),
645+
builder: (_, String value, _) => Text(value),
646646
),
647647
),
648648
),

0 commit comments

Comments
 (0)