草庐IT

tom_cards

全部标签

Flutter 画廊演示 : Cards to change card's height

我正在尝试修改Flutter示例中的cards_demo.dart。我的目的是不是将内置的两张卡片的高度固定为:staticfinaldoubleheight=300.0(或一些强制和固定的数字),我希望两张卡具有不同的高度。所以我修改了TravelDestination类以包含属性height:classTravelDestination{constTravelDestination({this.assetName,this.title,this.description,this.height});finalStringassetName;finalStringtitle;final

带有 Card 的 Flutter 条件语句(颜色 :)

如果变量的值大于10,我试图将下面的颜色从红色更改为绿色。我该怎么做?as'color:'不接受if,else语句:Card(child:Column(children:[Text('CallsTaken',style:TextStyle(fontSize:16.0,decoration:TextDecoration.underline,),),Text('10'),],),color:Colors.redAccent),上面的cardwidget在一个继承StatelfulWidgets的类下提前致谢!!! 最佳答案 只要使用三元

dart - 如何在 flutter 中生成 'stacked card list view'?

我想在flutter中构建类似于此链接的ui。https://github.com/loopeer/CardStackView/blob/master/screenshot/screenshot1.gif主要的理想特征如下。类似于ListView,但卡片应堆叠在屏幕顶部。列表可以有无限项。所以应该回收旧卡以节省内存。我还想为每张卡片设置不同的尺寸。首先,我找到了一些类似ui的“tinder”,并尝试了它们。https://blog.geekyants.com/tinder-swipe-in-flutter-7e4fc56021bc但是,用户需要每张卡片都刷一次,这需要用户刷很多次才能浏

flutter - 如何在 Flutter 中创建 outlined Card widget

我想包含一个带有flutter的轮廓Material卡片,但由于卡片小部件没有样式元素或类似元素,我不确定如何实现它。我尝试使用shape:属性但不是很成功,主要是因为我不明白它是如何工作的。 最佳答案 输出:它有shape属性,它带有一个Border,你可以改变它。Card(shape:RoundedRectangleBorder(borderRadius:BorderRadius.circular(40),//ifyouneedthisside:BorderSide(color:Colors.grey.withOpacity(0

flutter - 参数类型 '({growable: bool}) → List<Card>' 无法分配给参数类型 'List<Widget>'

我有一个字符串列表,我想通过map()将其转换为卡片小部件列表,并希望在列小部件中呈现此卡片列表。我在“子列”上收到上述错误。我没有弄错。谁能帮帮我?那是我的代码:import'package:flutter/material.dart';voidmain()=>runApp(MyApp());classMyAppextendsStatelessWidget{finalListtextData=['Dase','two'];@overrideWidgetbuild(BuildContextcontext){returnMaterialApp(home:Scaffold(appBar:A

arrays - 在 Flutter Cards 中插入 JSON 信息?

我如何像在Swift中使用tableViewController那样为flutterCardWidget提供JSON信息;它为各种数组提供标题、图像、描述,例如并为每个项目编制索引?****使用JSON解码代码更新varhttpClient=createHttpClient();varresponse=awaithttpClient.read(url);Stringdata=JSON.decode(response);Mapitems=JSON.decode(data);Mapdecoded=newJsonCodec().decode(data);for(Stringkeyindeco

flutter - 以 ListTile 作为子级的 Flutter 中 Card 小部件的高度不一致

当我使用Card和ListTile作为其子项时,卡片的高度根据ListTile的字幕参数的文本行数而有所不同。如果标题和副标题是单行文本,则有某种顶部和底部填充(用绿色矩形突出显示)。但是,如果字幕由几行文本组成,则没有顶部和底部填充,并且卡片的高度较小。是什么导致了这种不一致?如何从卡片1和2中删除此填充或将其添加到卡片3?classCardListextendsStatelessWidget{List>cardList=[["Apple","Fruit"],["Book","Thing"],["Loremipsum","Loremipsumdolorsitamet,consecte

swift - 向 Card 添加一个方法,创建一副完整的纸牌,每个等级和花色的组合各一张

所以我一直在做AppleSwiftBook中的实验。到目前为止,我已经能够完成所有这些,除了这个。以下是我尝试过的方法,但我不知道如何让它工作。AddamethodtoCardthatcreatesafulldeckofcards,withonecardofeachcombinationofrankandsuit.//Playground-noun:aplacewherepeoplecanplayenumRank:Int{caseAce=1caseTwo,Three,Four,Five,Six,Seven,Eight,Nine,TencaseJack,Queen,Kingfuncsim

javascript - Stripe 支付 : Getting Error as Customer cus_***** does not have a linked card with ID tok_*****

在测试模式下,当我创建新客户并尝试付款时,出现此错误。Customercus_7Zz2BCnybIZLGwdoesnothavealinkedcardwithIDtok_17Kp8GAwLkQPB7OqrrM73VVI我正在使用卡号:4242424242424242exp_month:12exp_year2016返回响应是,Array([charge_status]=>[error_info]=>Array([type]=>invalid_request_error[message]=>Customercus_7Zz2BCnybIZLGwdoesnothavealinkedcardwi

java - Android Studio - 在现有的旧项目中启用 native C++ 调试 (card.io Android Source)

我目前正在尝试了解card.ioAndroidSource的native实现如何确实有效。为此,最好能够调试原生C++代码。目前,我的断点不受尊重。我确实尝试了以下方法:调整应用生成文件(Application.mk):APP_ABI:=armeabi-v7aAPP_CFLAGS+=-UNDEBUG-O0-g-ggdbAPP_OPTIM:=调试APP_CPPFLAGS+=-DDMZ_DEBUG=1将buildtype添加到SampleApp的build.gradle文件中buildTypes{发布{缩小启用真proguardFilegetDefaultProguardFile('pro