我在我的颤振应用程序中使用包 dio。从我的 api 问题中得到回应。
response.data获取类型 _InternalLinkedHashMap<String, dynamic>。我需要将此值转换为Map<String, dynamic>. 我尝试了很多选择,但这不起作用。
我无法更改服务器响应。有什么建议吗?
我有flutter的应用程序。我从 Android Studio(在 Mac 上)在 iPhone 上以调试模式运行它的应用程序。速度非常慢(大约10分钟)。如果我从 xCode 运行我的项目,速度会快得多 - 大约一分钟。
这是一个“中型”项目,它使用一些 firebase 包:
firebase_messaging: ^10.0.3
firebase_analytics: ^8.1.2
firebase_remote_config: ^0.10.0+2
firebase_core: ^1.3.0
Run Code Online (Sandbox Code Playgroud)
但我在网上没有发现任何与这些插件相关的问题,仅针对cloud_firestore。我如何确定长构建的问题是什么?有什么建议吗?
我在 Flutter 应用程序中使用了这个简单的小部件:
FlatButton(
child: Column(
children: <Widget>[
Image.asset(assets, height: 40, width: 40),
Text('Title'),
//my color line
Container(
height: 5,
width: ?,
color: Colors.blue[800],
)
],
)
)
Run Code Online (Sandbox Code Playgroud)
我需要颜色线(在底部),宽度匹配父级。但我不知道该怎么做。
我在我的应用程序中使用ListBox.ListBox有两列.我想为专栏制作一个标题.这是布局
<Window.Resources>
<Style x:Key="borderBase" TargetType="Border">
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="1" />
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="7*" />
</Grid.RowDefinitions>
<!-- Title -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Style="{StaticResource borderBase}">
<TextBlock Text="FirstName" />
</Border>
<Border Grid.Column="1" Style="{StaticResource borderBase}">
<TextBlock Text="SecondName" />
</Border>
</Grid>
<!-- Data -->
<ListBox Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Style="{StaticResource borderBase}">
<TextBlock Style="{StaticResource textBlockBase}" Text="{Binding FirstName}" />
</Border>
<Border Grid.Column="1" Style="{StaticResource borderRigth}">
<TextBlock Style="{StaticResource …Run Code Online (Sandbox Code Playgroud) 我在我的 flutter 应用程序中使用 TextField。它在安卓上运行。但在 ios 上,当我尝试从剪贴板粘贴到字段中时,出现错误:
No CupertinoLocalizations found.
_CupertinoTextSelectionControlsToolbar widgets require CupertinoLocalizations to be provided by a Localizations widget ancestor.
The cupertino library uses Localizations to generate messages, labels, and abbreviations.
To introduce a CupertinoLocalizations, either use a CupertinoApp at the root of your application to include them automatically,
The specific widget that could not find a CupertinoLocalizations ancestor was: _CupertinoTextSelectionControlsToolbar
Run Code Online (Sandbox Code Playgroud)
这是我的代码的一部分,主页:
return Localizations(
locale: Locale('en'),
delegates: [
GlobalMaterialLocalizations.delegate,
DefaultCupertinoLocalizations.delegate,
DefaultWidgetsLocalizations.delegate,
],
child: CupertinoTabScaffold(
tabBar: CupertinoTabBar(...)
....
)
Run Code Online (Sandbox Code Playgroud)
在每个选项卡中我都使用此页面: …
我在我的 flutter 应用程序中使用 firebase_app_check 。我在 Firebase 中使用 AppCheck。事实证明设置起来并不容易,文档中有很多“白点”。所以按顺序:
为什么我的应用程序在发布模式下无法与 AppChecker 一起使用?为什么“诚信游戏”不起作用?我必须在平台级别添加代码吗?根据这个文件?像这样:
val firebaseAppCheck = FirebaseAppCheck.getInstance()
firebaseAppCheck.installAppCheckProviderFactory(
SafetyNetAppCheckProviderFactory.getInstance()
)
Run Code Online (Sandbox Code Playgroud)
或者一个插件就足够了?
我该如何修复它?
android firebase flutter google-cloud-firestore firebase-app-check
我创建了Xamarin Forms应用程序.我使用Android的multidex(许多库).我使用带有MultiDexMainDexList选项的multidex.keep文件.现在部署工作.但是我在调试模式下遇到异常:
System.ArgumentException: The offset and length have exceeded the bounds of the array or the counter value exceeds the number of elements from the pointer to the end of the original collection.
? System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
? Mono.Cecil.Metadata.GuidHeap.Read(UInt32 index)
? Mono.Cecil.MetadataReader.InitializeCustomDebugInformations()
? Mono.Cecil.MetadataReader.GetCustomDebugInformation(ICustomDebugInformationProvider provider)
? Mono.Cecil.Cil.PortablePdbReader.Read(MethodDefinition method)
? Mono.Cecil.Cil.CodeReader.ReadMethodBody()
? Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
? Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader)
? Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
? Mono.Cecil.MethodDefinition.get_Body()
Mono.Cecil.MethodDefinition.get_DebugInformation()
? Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbType(TypeDefinition type, Dictionary`2 fileToSourceFileInfos) …Run Code Online (Sandbox Code Playgroud) 我使用Visual Studio 2015和azure sdk 2.7.1.我创建了天蓝色的web工作.当我运行deploy时,我收到错误:
项目中不存在目标"MSDeployPublish".
我在Visual Studio 2013中创建了Web作业 - 部署是有效的.我比较了两个项目(2015年和2013年) - 2013年有这样的代码:
<Import Project="..\packages\Microsoft.Web.WebJobs.Publish.1.0.3\tools\webjobs.targets" Condition="Exists('..\packages\Microsoft.Web.WebJobs.Publish.1.0.3\tools\webjobs .targets')" />
Run Code Online (Sandbox Code Playgroud)
我在2015年将此代码放在我的项目中,但部署无效.我看到了
这个问题,但它对我不起作用.
我在我的 flutter 应用程序中使用无限滚动分页插件。我还需要在我的页面中使用 SilverAppBar。这是我的代码:
\nreturn Scaffold(\n body: DefaultTabController(\n length: 2,\n child: NestedScrollView(\n headerSliverBuilder: (context, value) {\n return [\n SliverAppBar(\n bottom: TabBar(\n tabs: [\n Tab(icon: Icon(Icons.call), text: "1"),\n Tab(icon: Icon(Icons.message), text: "2"),\n ],\n ),\n ),\n ];\n },\n body: TabBarView(\n children: [\n const MyListWidget()\n Text(\'2\')\n ],\n ),\n ),\n ),\n);\nRun Code Online (Sandbox Code Playgroud)\n这是我的 MyListWidget:
\nWidget build(BuildContext context) {\nreturn PagedSliverList<int, MyModel>(\n pagingController: _\xd1\x81ontroller,\n builderDelegate: PagedChildBuilderDelegate<MyModel>(\n itemBuilder: (context, item, index) {\n return Text(item.Title);\n },\n ),\n );\n }\nRun Code Online (Sandbox Code Playgroud)\n但我有错误:
\nA RenderRepaintBoundary …Run Code Online (Sandbox Code Playgroud) 我在 Figma 中有一个设计。看起来不错。但是当我尝试在 flutter 中使用字体值时 - 我遇到了问题。我在 Figma 上选择的字体大小应用程序的前端并没有为肉眼呈现相同的结果。
例如,如果我在 Figma 上设置文本的 12px 大小,并在 flutter 的前端文件上设置相同的 (12px) 大小,则生成的结果不匹配;Flutter 的应用程序字体大小似乎比 Figma 屏幕小,但它们的大小(以 px 为单位)设置为相同。
这是我的文本样式的示例:
final textMedium = GoogleFonts.manrope(
textStyle: TextStyle(
fontWeight: FontWeight.w700,
fontStyle: FontStyle.normal,
fontSize: 12,
color: Colors.black
));
Run Code Online (Sandbox Code Playgroud)
可能是什么原因以及如何解决?我需要一个“修正系数”。有什么建议吗?