我运行 react native run-android ,它编译得很好,但是在尝试 installDebug 时它一直停留在读取文件权限上,因为任何人都知道我能做什么
> Task :app:installDebug
[EmulatorConsole]: Failed to start Emulator console for 5554
09:17:15 V/ddms: execute: running am get-config
09:17:16 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
09:17:16 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'emulator-5554 - 4.4.4' for app:debug
09:17:16 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
09:17:16 D/Device: Uploading file onto device 'emulator-5554'
09:17:16 D/ddms: Reading file permision of C:\Users\JayK\Desktop\React\medlib\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
<============-> 99% EXECUTING [36m 3s]
> :app:installDebug
> …Run Code Online (Sandbox Code Playgroud) 我尝试运行react-native run-android,但出现此错误。
info Running jetifier to migrate libraries to AndroidX. You can disable
it using "--no-jetifier" flag.
error Failed to run jetifier. Run CLI with --verbose flag for more details.
Error: spawnSync C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\jetifier\bin\jetify ENOENT
at Object.spawnSync (internal/child_process.js:1002:20)
at spawnSync (child_process.js:614:24)
at execFileSync (child_process.js:642:13)
at Object.runAndroid [as func] (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:101:41)
at Command.handleAction (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli\build\cliEntry.js:160:21)
at Command.listener (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\commander\index.js:315:8)
at Command.emit (events.js:198:13)
at Command.parseArgs (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\commander\index.js:651:12)
at Command.parse (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\commander\index.js:474:21)
at setupAndRun (C:\Users\JayK\Desktop\React\AwesomeProject\node_modules\@react-native-community\cli\build\cliEntry.js:210:24)
Run Code Online (Sandbox Code Playgroud) 我计划在 Flutter 中为个人应用程序创建一个富文本编辑器。我知道已经有一些选择,比如 zefyr。然而,它仍处于开发预览阶段,我想构建一些不同的东西。
文本编辑器的功能是用户可以添加图像、加粗文本、添加列表、斜体文本等。只是基本的文本编辑器功能。
我遇到问题的地方是文本输入方面。flutter 默认文本输入仅允许每个文本字段使用一种文本样式。因此,当涉及到内联样式时,这将构成巨大的挑战。此外,文本字段中不能包含图像,因此这是另一个问题。
如果有人对如何解决这个问题有任何想法,那么这将是一个很好的开始。
所以,我真的在询问创建编辑器的方法,因为它不像在 html 中创建编辑器那么简单
richtextbox rich-text-editor flutter flutter-dependencies flutter-layout
我有一个自定义按钮,其中包含项目列表。当按下它时,它会打开一个模态底部工作表并将该列表传递到底部工作表。
但是,当按钮项目更改时,它不会更新底部工作表中的项目。
我怎样才能达到这个效果。
简单的例子
ButtonsPage
|
Button(items: initialItems)
|
BottomSheet(items: initialItems)
** After a delay, setState is called in ButtonsPage with newItems, thereby sending newItems to the button
ButtonsPage
|
Button(items: newItems)
| ## Here, the bottom sheet is open. I want it to update initialItems to be newItems in the bottom sheet
BottomSheet(items: initialItems -- should be newItems)
Run Code Online (Sandbox Code Playgroud)
代码示例
这是我的选择字段,如图所示,它接收一个列表items,当按下它时,它会打开一个底部工作表并将收到的项目发送到底部工作表。
class PaperSelect extends StatefulWidget {
final List<dynamic> items;
PaperSelect({
this.items,
}) : super(key: key);
@override
_PaperSelectState createState() …Run Code Online (Sandbox Code Playgroud)