草庐IT

Page-break-inside

全部标签

dart - flutter : Open Page from page inside bottomnavigationview

我想从主页打开个人资料页面,而无需按bottomnavigation项目中的“个人资料”按钮。感谢帮助。这是我项目的主要类(class)。我将所有页面都放在这里并且我已经将所有页面导入这里。主类int_currentIndex=0;finalList_children=[HomePage(),MessagePage(),ProfilePage()];@overrideWidgetbuild(BuildContextcontext){returnScaffold(appBar:AppBar(title:Text('MyFlutterApp'),),body:_children[_curr

dart - 在 _MaterialAppState 中找不到路由 "home-page"的生成器

当我尝试在Flutter应用程序中从一个View导航到另一个View时出现异常。I/flutter(2199):══╡EXCEPTIONCAUGHTBYGESTURE╞═══════════════════════════════════════════════════════════════════I/flutter(2199):Thefollowingassertionwasthrownwhilehandlingagesture:I/flutter(2199):Couldnotfindageneratorforroute"home-page"inthe_MaterialAppSta

firebase - flutter Firebase Admob : AdView not Destroy on Page Navigation

我试图在导航到视频播放器页面时处理adview。我用过_bannerAd?.dispose();_bannerAd=null;销毁戴维斯但广告仍显示在新页面上。我发现在Navigator.push之前使用Navigator.pop可以解决问题,但我不想弹出上一页。请帮忙。 最佳答案 你可以检查构建函数if(ModalRoute.of(context).isCurrent){_bannerAd..show();}similarquestion 关于firebase-flutterFireb

flutter - 如何避免 landing page 返回 flutter

下面的代码是main.dart:import'package:flutter/material.dart';import'landingpage.dart';voidmain(){runApp(newMaterialApp(home:LandingPages(),));}这是我的着陆页类:import'package:flutter/material.dart';import'package:listview/devices.dart';import'main.dart';classLandingPagesextendsStatelessWidget{@overrideWidgetbu

android - flutter : Grid View inside list view

我试过了:ListView.builder(shrinkWrap:true,itemBuilder:(BuildContextcontext,intindex){returnGridView.count(crossAxisCount:5,children:List.generate(10,(index){returnCenter(child:Text('$indexAM',),);}),);},itemCount:partnerArr.length,)我想在我的Scaffold主体中制作这种类型的ListView,我该怎么做? 最佳答案

dart - Flutter:Offstage with Navigator inside not getting focus

在我的应用程序中,我有一个始终可见的底栏。我在thissite中找到在拥有多个导航器的同时将选项卡保存在内存中的一个好方法是使用Offscreen。但是,当我将Navigator放在Offscreen中时,它的所有内容都无法获得焦点。我做了一个非常简单的例子来重现我所说的:voidmain()async{runApp(MyApp());}classMyAppextendsStatelessWidget{MyApp({Keykey,}):super(key:key);@overrideWidgetbuild(BuildContextcontext){returnMaterialApp(t

Flutter 文本字段 : How to add Icon inside the border

我想在搜索栏中添加图标。到目前为止,这是我的代码:newTextField(decoration:newInputDecoration(icon:newIcon(Icons.search)labelText:"DescribeYourIssue...",enabledBorder:constOutlineInputBorder(borderRadius:BorderRadius.all(Radius.circular(20.0)),borderSide:constBorderSide(color:Colors.grey,),),focusedBorder:OutlineInputBor

dart - Stack inside Stack 在 flutter 中

我想在flutter中将Stack放置在Stack内部,如果我更改内部Stack的定位小部件的位置,它就不起作用。作品:Stack(children:[Positioned(top:150.0,child:Text("Text#1"),),Positioned(top:100.0,child:Stack(children:[Positioned(child:Text("Text#2"),)],),)],)如果我在innerStack的定位中添加“top:200.0”,innerStack就会消失并且flutter会抛出错误Stack(children:[Positioned(top:1

java - 杰迪斯数据异常 : ERR WATCH inside MULTI is not allowed

我用jedis是为了Redis数据库的使用。该软件基于AWS服务,如Redis、SQS、SMS和带有POD的Kubernetes等。实际上一切正常,但是一旦我遇到以下异常:“JedisDataException:不允许在MULTI中使用ERRWATCH”,这发生在代码中可见的地方。我无法再向Redis发出任何请求(无论我想使用哪种key)。重启POD后一切正常。我无法再重现错误。你知道问题出在哪里吗?我怀疑它与aws-sqs或POD的扩展和并发性有关。事件顺序是:事件-->aws:sns-->aws:sqs-->k8s:POD(java代码)-->给aws:redis加值谢谢。publ

django - 在 django-redis-cache 中使用 @cache_page() 装饰器

我正在使用(尝试)redis作为我的django应用程序的缓存。这就是我正在尝试的方式。defpostview(request):post_list=[]ifcache.get("posts")==None:post_list=Post.objects.all()cache.set("posts",post_list,timeout=None)else:post_list=cache.get("posts")context={"post_list":post_list}returnrender(request,'post_list.html',context)@cache_page(6