草庐IT

platform-builder

全部标签

flutter - Builder 与 GlobalKey

许多与构建FlutterUI相关的问题归结为错误的BuildContext(例如显示SnackBar)。答案通常提供使用Builder或使用GlobalKey。两者都有效,但我注意到GlobalKey的文档状态:Globalkeysarerelativelyexpensive.Ifyoudon'tneedanyofthefeatureslistedabove,considerusingaKey,ValueKey,ObjectKey,orUniqueKeyinstead.所指的功能是唯一标识和子树重新父代。在这些情况下使用GlobalKey的“相对费用”是否足以使用Builder代替?

dart - GridView.builder 创建无限滚动的页面

尝试使用API来构建网格。一切都很好,但是在最后一行图block之后,页面变为空白,只是继续滚动和滚动......网格是这样构建的:body:newGridView.builder(gridDelegate:newSliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:(orientation==Orientation.portrait)?2:3),itemBuilder:(BuildContextcontext,intindex){returnnewCard(child:newGridTile(footer:newText(d

android - 有人可以向我解释 Builder 类在 Flutter 中的作用吗?

文档非常困惑和模糊。这是它所说的:生成器类Aplatonicwidgetthatcallsaclosuretoobtainitschildwidget.以下是我的问题:他们所说的“柏拉图式”是什么意思?他们所说的“关闭”是什么意思?这门课的目的究竟是什么? 最佳答案 在互联网上进行了长时间的深入研究后,我收集了一些小fragment并将它们组合起来,对BuilderClass的作用进行了连贯而清晰的解释。术语:根据flutter官方文档,Builder类定义为:Aplatonicwidgetthatcallsaclosuretoob

Flutter ListView.Builder() 在可滚动列中与其他小部件

我有一个带有大量不同View的TabBarView()。我希望它们成为顶部的TextField和下方的ListView.Builder()的Column,但两个小部件应位于同一可滚动区域(ScrollView)中。我实现它的方式引发了一些错误:@overrideWidgetbuild(BuildContextcontext){returnnewColumn(mainAxisAlignment:MainAxisAlignment.center,mainAxisSize:MainAxisSize.max,children:[newPadding(padding:EdgeInsets.sym

android - 运行应用程序失败并出现错误 'com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex'

我正在尝试在我的手机上运行我的应用程序,但在build期间它失败并出现以下错误:Executionfailedfortask':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:Unabletomergedex到目前为止,我尝试了什么,但无济于事:->清理并重建(重建失败)->移除./gradle文件和所有项目

android - 将 @Component.Builder 与构造函数参数一起使用

我正在尝试将dagger和kotlin和mvvm合二为一,所以如果这个问题很奇怪,请原谅我。如果我有一个NetworkModule,它基本上为应用程序提供改造,我认为传入我们想要构建改造的基本url是一个好主意。我可以通过应用程序的组件构建函数以old的方式进行操作,但不知道如何通过@Component.Builder进行操作方法。尝试:App.ktDaggerAppComponent.builder().application(this).networkModule(BuildConfig.BASE_URL).build().inject(this)AppComponent.kt@S

android - 具有自定义布局和 EditText 的 AlertDialog.Builder;无法访问 View

我正在尝试使用EditText对象创建警报对话框。我需要以编程方式设置EditText的初始文本。这就是我所拥有的。AlertDialog.BuilderdialogBuilder=newAlertDialog.Builder(this);//...IrrelevantcodeforcustomizingthebuttonsandtitleAlertDialogalertDialog=dialogBuilder.create();LayoutInflaterinflater=this.getLayoutInflater();alertDialog.setContentView(infl

android - Eclipse/Android : "Errors running builder ' Android Pre Compiler' on project. ..”

尝试在一个我几个月没有工作过的Android项目上做一些工作,但每次我尝试构建项目时,Eclipse都会抛出一个对话框:'Buildingworkspace'hasencounteredaproblemErrorsoccurredduringthebuild.Errorsrunningbuilder'AndroidPreCompiler'onproject'XXX'java.lang.NullPointerException我在带有Android项目构建目标4.0.3(API级别15)的Mac上运行Eclipse,并且我安装了以下版本的东西Eclipse-3.7.2Android开发工

android - 当使用带有 EditText 的 AlertDialog.Builder 时,软键盘不会弹出

我正在使用AlertDialog.Builder来创建一个输入框,使用EditText作为输入法。很遗憾,尽管EditText处于焦点位置,但软键盘没有弹出,除非您再次明确触摸它。有没有办法强制它弹出?我在(AlertDialog.Builder).show();之后尝试了以下操作,但没有成功。InputMethodManagermgr=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);mgr.showSoftInput(input,InputMethodManager.SHOW_FORCED);有人可

android - 无法接受许可协议(protocol) Android SDK Platform 24

尝试在Cordova项目上安装android平台时出现以下错误。我一直在关注本指南:https://cordova.apache.org/docs/en/latest/guide/cli/执行以下操作时发生错误:$cordovaplatformaddandroid--saveAproblemoccurredconfiguringrootproject'android'.YouhavenotacceptedthelicenseagreementsofthefollowingSDKcomponents:[AndroidSDKPlatform24].我到处寻找接受AndroidSDKPlat