Last active
July 11, 2022 21:13
-
-
Save perpen/93f2f1e4ec14f3f1316355902919e8ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns acme.main | |
(:require ["package:flutter/material.dart" :as m] | |
["package:flutter/widgets.dart" :as w] | |
[cljd.flutter.alpha :as f])) | |
(defn- drop-menu [names] | |
(f/widget | |
:state [selected (first names)] | |
(m/DropdownButton | |
:value @selected | |
:onChanged (partial reset! selected) | |
:items (map (fn [name] | |
(m/DropdownMenuItem | |
:value name | |
:child (m/Text name))) | |
names)))) | |
(defn main [] | |
(m/runApp | |
(m/MaterialApp | |
:title "Welcome to Flutter" | |
:home (m/Scaffold | |
:appBar (m/AppBar | |
:title (w/Text "Welcome to ClojureDart")) | |
:body | |
(m/Center | |
:child (m/Column | |
:children [(drop-menu ["a" "b"])])))))) | |
" | |
On hot reload I get this: | |
Performing hot reload... | |
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ | |
The following _CompileTimeError was thrown during a scheduler callback: | |
Unimplemented handling of missing static target | |
When the exception was thrown, this was the stack: | |
#0 Element.debugFillProperties (package:flutter/src/widgets/framework.dart:4466:14) | |
#1 StatefulElement.debugFillProperties (package:flutter/src/widgets/framework.dart:5206:11) | |
#2 DiagnosticableNode.builder.<anonymous closure> | |
(package:flutter/src/foundation/diagnostics.dart:2940:17) | |
#3 DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2943:8) | |
#4 DiagnosticableNode.getProperties (package:flutter/src/foundation/diagnostics.dart:2957:105) | |
#5 DiagnosticsProperty.toJsonMap (package:flutter/src/foundation/diagnostics.dart:2661:57) | |
#6 DiagnosticsNode.toJsonList.<anonymous closure> | |
(package:flutter/src/foundation/diagnostics.dart:1686:19) | |
#7 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31) | |
#8 ListIterator.moveNext (dart:_internal/iterable.dart:342:26) | |
#9 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27) | |
#10 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) | |
#11 new List.of (dart:core-patch/array_patch.dart:51:28) | |
#12 ListIterable.toList (dart:_internal/iterable.dart:213:44) | |
#13 DiagnosticsNode.toJsonList (package:flutter/src/foundation/diagnostics.dart:1687:8) | |
#14 DiagnosticsNode.toJsonMap.<anonymous closure> | |
(package:flutter/src/foundation/diagnostics.dart:1648:25) | |
#15 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1661:6) | |
#16 WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1606:18) | |
#17 WidgetInspectorService._reportStructuredError | |
(package:flutter/src/widgets/widget_inspector.dart:937:44) | |
#18 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1184:14) | |
#19 _debugReportException (package:flutter/src/widgets/framework.dart:6493:16) | |
#20 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2669:11) | |
#21 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:882:21) | |
#22 RendererBinding._handlePersistentFrameCallback | |
(package:flutter/src/rendering/binding.dart:378:5) | |
#23 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1175:15) | |
#24 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1104:9) | |
#25 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> | |
(package:flutter/src/scheduler/binding.dart:881:7) | |
(elided 4 frames from class _RawReceivePortImpl, class _Timer, and dart:async-patch) | |
════════════════════════════════════════════════════════════════════════════════════════════════════ | |
Reloaded 2 of 598 libraries in 336ms (compile: 26 ms, reload: 115 ms, reassemble: 169 ms). | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment