我想将Facebook应用程序事件添加到我的Flutter项目中:https : //developers.facebook.com/docs/app-events/android https://developers.facebook.com/docs/app-events/ios
它依赖于Facebook SDK。但是,似乎Flutter中没有适用于Facebook SDK集成的插件。
我可以知道Flutter用户是否应该实施其插件才能使用Facebook功能?
谢谢!
我正在开发一个包含一些资产文件的颤振包。我像往常一样在 pubsepc.yaml 中提到了所需的资产
assets:
- assets/abc.xyz
Run Code Online (Sandbox Code Playgroud)
并将包上传到https://pub.dartlang.org/。
之后,我创建了一个 flutter 应用程序并导入了我开发的包,pubspec.yaml例如......
dependencies:
flutter:
sdk: flutter
my_developed_package: ^0.0.1
Run Code Online (Sandbox Code Playgroud)
现在一切正常,除了我的资产不存在。我在我的应用程序中放入了一些资产而没有提及pubsepc.yaml它的工作原理。我无法理解,如何将这些资产添加到我的包中以便它们自动加载?
我正在尝试将 facebook 登录添加到 Flutter 应用程序。我正在使用flutter_facebook_login。但是当我尝试为 iOS 构建时出现错误:
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In Podfile:
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (= 4.39.1)
None of your spec sources contain a spec satisfying the dependency: `FBSDKLoginKit (= 4.39.1)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我存储了 Facebook 网址。我想在 facebook 应用程序中而不是在浏览器中打开它们。我尝试使用flutter_url_launcher 包,但它在默认浏览器中打开链接......我想要的是将链接直接打开到facebook 应用程序中。任何人都可以提出任何解决方案或软件包来帮助我摆脱这种情况吗?
我正在创建一个 Flutter 插件。但是当我尝试向插件的 iOS 部分添加依赖项时,我没有找到任何合适的指南。我在podspec插件文件中声明了依赖项。但是依赖项仅在example/iosthrough Pod 中可用,但我想在我ios的插件文件夹中访问该依赖项。这是我的podspec:
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'comet_chat'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin.'
s.description = <<-DESC
A new Flutter plugin.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h' …Run Code Online (Sandbox Code Playgroud) 假设我们已经创建了一个 flutter 插件。命名为flutter_local_plugin。我们如何将其放入flutter项目flutter_some_application中并访问它?这里有一个问题(how to use local flutter package in another flutter application?),但接受的答案对实际文件迁移有 0 个解释。
似乎没有关于如何实现这一目标的指南。
我想在我的颤动应用程序的相机上实现近乎实时的OCR.为此,我想快速访问摄像机数据.据我所知,我有两个选择,并且两个都遇到了障碍:
CameraPreview通过RepaintBoundary围绕它创建一个RenderRepaintBoundary并调用来截取屏幕截图boundary.toImage().这种方法的问题在于.toImage方法似乎只捕获边界中绘制的小部件而不是摄像机预览中的数据.Simmilar对这里描述的问题:https://github.com/flutter/flutter/issues/17687
使用controller.takePicture(filePath)Camera 0.2.1 捕获图像,类似于示例文档.这里的问题是在图像可用之前需要超长时间(2-3秒).我想这是因为文件在捕获时保存到光盘,然后需要再次从文件中读取.
有什么方法可以在捕获后直接访问图片信息,做一些事情,比如预处理和OCR?
我有一个WebView水平滚动里面的垂直滚动PageView。像这样:
PageView.builder(
itemCount: 5,
itemBuilder: (context, index) {
return WebView(
initialUrl: 'https://flutter.dev/docs',
gestureRecognizers: [
Factory(() => VerticalDragGestureRecognizer()),
].toSet(),
);
},
);
Run Code Online (Sandbox Code Playgroud)
在Flutter的先前稳定版本(1.5.4)中,此操作按预期工作-垂直滚动将在WebView中移动内容,水平滚动将在PageView中移动。
升级到Flutter后,此操作中断了v1.7.8+hotfix.3。现在,即使手势几乎完全是垂直的,水平滚动似乎总是可以取胜的。如果页面完全垂直滚动,则仅在手势停止之后(即,当我在手势之后停止触摸屏幕时)-在手势发生时不会进行垂直滚动。
添加和删除VerticalDragGestureRecognizer从gestureRecognizers没有任何效果现在-无论哪种方式,程序,工作起来就像识别器不在名单上(尽管这并不是说gestureRecognizers完全忽略,因为加入EagerGestureRecognizer确实有效果)。
这是手势竞技场的调试输出(请记住,我试图将笔势保持尽可能垂直,但是即使HorizontalDragGestureRecognizer我也垂直移动了手势,即使手指稍微向两侧移动也足以赢得胜利。全部时间):
I/flutter (30125): Gesture arena 14 ? ? Opening new gesture arena.
I/flutter (30125): Gesture arena 14 ? Adding: Instance of '_CombiningGestureArenaMember'
I/flutter (30125): Gesture arena 14 ? Adding: LongPressGestureRecognizer#9cad1(debugOwner: GestureDetector, state: ready)
I/flutter (30125): Gesture arena 14 ? Adding: …Run Code Online (Sandbox Code Playgroud) 我是颤振的新手。我正在使用相机插件将相机添加到我的应用程序中。我收到此警告使用函数声明将函数绑定到名称。我该如何解决这个问题?
代码 -
Widget _cameraTogglesRowWidget() {
final List<Widget> toggles = <Widget>[];
final onChanged = (CameraDescription? description) {
if (description == null) {
return;
}
onNewCameraSelected(description);
};
Run Code Online (Sandbox Code Playgroud) flutter flutter-plugin flutter-widget flutter-ios flutter-android
我目前正在 AppCompatActivity 中使用 FlutterFragment。
另外,我使用预热的 flutter 引擎和 FlutterPlugin 在需要时提供往返于本机/flutter 的 methodChannel 。
我目前的情况是,当我的 FlutterFragment 加载时,我想通过插件启动一个特定的方法来颤动。
我现在知道onAttachedToEngine当插件附加到引擎时,它会在 FlutterPlugin 中被调用。
但现在FlutterFragment需要在启动时调用该插件。
在 FlutterFragment 调用插件调用之前,如何确保插件已附加到引擎。另一方面,在插件调用片段上的任何内容之前,如何确保 FlutterFragment 已附加并准备就绪。
我唯一看到的就是ActivityAware界面。我想过从activity中的fragmentManager获取fragment,但是由于某种原因这些接口方法从未被调用。
旁注:我无法轻松地将 AppCompatActivity 更改为 FlutterFragmentActivity,因此如果不需要,那么这就是我的偏好。
flutter ×10
flutter-plugin ×10
dart ×2
android ×1
assets ×1
camera ×1
facebook ×1
flutter-ios ×1
ios ×1