草庐IT

pact-consumer-provider

全部标签

android - Flutter 的 'path_provider' 依赖项中的未定义类

添加path_provider依赖项后,我遇到了某些类未定义的问题。“目录”和"file"未定义,问题发生在我尝试在pubspec.yaml中为我的项目实现path_provider之后。这是在按下图标按钮时将字符串添加到文本文件所必需的。进口:import'package:flutter/foundation.dart';import'package:flutter/material.dart';import'package:cryptick/data/crypto_data.dart';import'package:cryptick/modules/crypto_presenter

android - Flutter 的 'path_provider' 依赖项中的未定义类

添加path_provider依赖项后,我遇到了某些类未定义的问题。“目录”和"file"未定义,问题发生在我尝试在pubspec.yaml中为我的项目实现path_provider之后。这是在按下图标按钮时将字符串添加到文本文件所必需的。进口:import'package:flutter/foundation.dart';import'package:flutter/material.dart';import'package:cryptick/data/crypto_data.dart';import'package:cryptick/modules/crypto_presenter

dart - 提供程序在 InitState 中抛出错误。 Provider.of<SomeProvider>(上下文)

如何在initState中访问Provider的上下文一直报错flutter:ThefollowingassertionwasthrownbuildingBuilder:flutter:inheritFromWidgetOfExactType(_Provider)orinheritFromElement()wascalledbeforeflutter:_ProductDetailsPageState.initState()completed.每当我运行下面的代码时if(Provider.of(context).selectedProduct==null){product=Product

dart - 提供程序在 InitState 中抛出错误。 Provider.of<SomeProvider>(上下文)

如何在initState中访问Provider的上下文一直报错flutter:ThefollowingassertionwasthrownbuildingBuilder:flutter:inheritFromWidgetOfExactType(_Provider)orinheritFromElement()wascalledbeforeflutter:_ProductDetailsPageState.initState()completed.每当我运行下面的代码时if(Provider.of(context).selectedProduct==null){product=Product

flutter - 获取外部存储权限(file_provider 插件)

我在使用flutter获取Android设备的外部存储权限时遇到了一些问题。当我尝试在我的外部存储中创建一个目录时,我得到了这个错误(我已经为这个例子更改了目录。在我自己的项目中目录名称不同):I/flutter(12727):══╡EXCEPTIONCAUGHTBYGESTURE╞═══════════════════════════════════════════════════════════════════I/flutter(12727):ThefollowingFileSystemExceptionwasthrownwhilehandlingagesture:I/flutte

flutter - 获取外部存储权限(file_provider 插件)

我在使用flutter获取Android设备的外部存储权限时遇到了一些问题。当我尝试在我的外部存储中创建一个目录时,我得到了这个错误(我已经为这个例子更改了目录。在我自己的项目中目录名称不同):I/flutter(12727):══╡EXCEPTIONCAUGHTBYGESTURE╞═══════════════════════════════════════════════════════════════════I/flutter(12727):ThefollowingFileSystemExceptionwasthrownwhilehandlingagesture:I/flutte

sql Server 无法连接的问题[08001] [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not

问题描述[08001][Microsoft][SQLServerNativeClient10.0]NamedPipesProvider:CouldnotopenaconnectiontoSQLServer[2].(2)[HYTO0][Microsoft][SQLServerNativeClient10.0]Logintimeoutexpired(0)[01S00][Microsoft][SQLServerNativeClient10.0]Invalidconnectionstringattribute(0)[08001][Microsoft][SQLServerNativeClient10.0

flutter 容器 : cannot provide both a color and a decoration

我想在我的容器周围绘制一个边框并为背景着色。WidgetbodyWidget(){returnContainer(color:Colors.yellow,decoration:BoxDecoration(border:Border.all(color:Colors.black),),child:Text("Flutter"),);}但是当我尝试这个时我得到了错误CannotprovidebothacolorandadecorationThecolorargumentisjustashorthandfor"decoration:newBoxDecoration(color:color)"

flutter 容器 : cannot provide both a color and a decoration

我想在我的容器周围绘制一个边框并为背景着色。WidgetbodyWidget(){returnContainer(color:Colors.yellow,decoration:BoxDecoration(border:Border.all(color:Colors.black),),child:Text("Flutter"),);}但是当我尝试这个时我得到了错误CannotprovidebothacolorandadecorationThecolorargumentisjustashorthandfor"decoration:newBoxDecoration(color:color)"

flutter - 错误 : Could not find the correct Provider above this widget

这个屏幕是一个抽屉屏幕,它采用authblock来为用户提供信息并使他能够注销。尽管我使用了正确的提供程序,但我还是收到了这个错误ThefollowingProviderNotFoundErrorwasthrownbuildingPets4allDrawer(dirty):I/flutter(32011):Error:CouldnotfindthecorrectProviderabovethisPets4allDrawerWidgetI/flutter(32011):Tofix,please:I/flutter(32011):*EnsuretheProviderisanancestor