gfaraday / g_faraday Goto Github PK
View Code? Open in Web Editor NEWA plugin for building hybrid stack apps with flutter
License: MIT License
A plugin for building hybrid stack apps with flutter
License: MIT License
我们的项目是OC写的
使用FaradayNavigationDelegate的时候发现Options无法在桥接的头文件里生成对应的OC的表达
pigeon 官方生成代码插件
g_faraday: ^0.4.2
android端编译报错:
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class io.flutter.embedding.android.XFlutterActivityAndFragmentDelegate, unresolved supertypes: ExclusiveAppComponent
接入之后打开路由栈错误
使用Get.toName()
方法会报如下错误:
══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4570 pos 12:
'entry.route._navigator == null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md
When the exception was thrown, this was the stack:
#2 NavigatorState._pushEntry (package:flutter/src/widgets/navigator.dart:4570:12)
#3 NavigatorState.push (package:flutter/src/widgets/navigator.dart:4480:5)
#4 NavigatorState.pushNamed (package:flutter/src/widgets/navigator.dart:4212:12)
#5 GetNavigation.toNamed (package:get/get_navigation/src/extension_navigation.dart:626:37)
#6 AboutPage.generateItem.<anonymous closure> (package:flutter_c_plugins/pages/about/view.dart:70:15)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:607:11)
#9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:296:5)
#10 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:267:7)
#11 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#12 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:443:20)
#13 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:419:22)
#14 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:287:11)
#15 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
#16 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
#17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
#18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
#22 _invoke1 (dart:ui/hooks.dart:182:10)
#23 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
#24 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
(elided 5 frames from class _AssertionError and dart:async)
Handler: "onTap"
Recognizer:
TapGestureRecognizer#153a7
════════════════════════════════════════════════════════════════════════════════════════════════════
======== Exception caught by gesture ===============================================================
The following assertion was thrown while handling a gesture:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4570 pos 12: 'entry.route._navigator == null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md
When the exception was thrown, this was the stack:
#2 NavigatorState._pushEntry (package:flutter/src/widgets/navigator.dart:4570:12)
#3 NavigatorState.push (package:flutter/src/widgets/navigator.dart:4480:5)
#4 NavigatorState.pushNamed (package:flutter/src/widgets/navigator.dart:4212:12)
#5 GetNavigation.toNamed (package:get/get_navigation/src/extension_navigation.dart:626:37)
#6 AboutPage.generateItem.<anonymous closure> (package:flutter_c_plugins/pages/about/view.dart:70:15)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#153a7
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(66.9, 267.3)
finalLocalPosition: Offset(54.3, 26.6)
button: 1
sent tap down
====================================================================================================
比如flutter A page 跳转到 flutter B, 跳转到B后需要移除A, 请问下目前咋这个框架支持吗
在跳转到原生界面,flutter端使用Navigator.of(context).push是很好的,但在某些情况,比如:原生界面无法拿到controller,但是又有返回值时,如:
self.goToChooseCityPage(from: nil, selectCity: { city in
// 需要返回city.
})
通常原生返回值给flutter端使用的是
vc.fa.enableCallback(with: token)
因为无法拿到vc,因此无法使用这种方式。通过查找api,发现可以直接调用
Faraday.callback(token, result: [:])
但又因为Faraday.swift中的方法
static func callback(_ token: CallbackToken?, result: Any?) {
if let t = token {
if let cb = Faraday.default.callbackCache.removeValue(forKey: t) {
cb(result)
}
}
}
未标记为public,现只能通过 methodChannel 来解决,或FaradayNotification来解决,但是仍希望能开放此方法。毕竟页面跳转使用router更合理一点。
你好,我在调研业内的混合栈框架,发现了这款新出的框架。
想请教一下作者这款框架较 Flutter Boost 有什么新颖之处?
environment:
sdk: '>=2.12.0-29.10.beta <3.0.0'
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.1
g_faraday: ^0.5.1-nullsafety.19
fluro: any
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:fluro
求解这个怎么解决啊
请问支持flutter作为弹出页面(背景透明到native层)
feature在Android上有实现吗? 如实现了的话,有没有对应的example可以参考下,谢谢?
我在aar 集成的时候路由报错,报错信息如下:
flutter: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method reCreateLastPage on channel g_faraday)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294)
#1 FaradayNativeBridgeState.recreateLastPage (package:flutter_module_test/src/faraday/route/native_bridge.dart:95)
本地开发环境: Flutter (Channel stable, 3.3.2, on macOS 12.5 21G72 darwin-x64, locale zh-Hans-CN)
有什么办法可以在object-c的工程里面使用?
这种场景,有解决方案吗?
使用了一个三方开源IM库,路由来回跳转的时候乱了。具体操作为将路由的flutter打成aar,嵌入到https://github.com/forgetW/farady_im 项目中,现在配置导航,点击登录,然后点会话列表按钮会跳转到 flutter页面。再点中心按钮跳转到 native会话页面。 在点击会话页面右上角的菜单按钮跳转到flutter页面。会出现路由紊乱,不是一定能复现,可能需要多点击几次。 核心复现就是 native会话页面。 在点击会话页面右上角 返回 继续点击循环操作
插件的实现可以完全弄成object-c?现在用给的方案里面任然有swift还是会导致编译报错。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.