flutter_thrio makes it easy and fast to add flutter to existing mobile applications, and provide a simple and consistent navigator APIs.

Overview

thrio logo

本仓库不再维护,可移步新仓库 https://github.com/flutter-thrio/flutter_thrio

中文文档 问题集 QQ 群号码:1014085473

The Navigator for iOS, Android, Flutter.

Version 0.2.2 requires Flutter >= 1.12.0 and Dart >= 2.6.0.

Features

  • push,pop,popTo,remove native pages or flutter pages from anywhere
  • Get the callback parameters when the push page is popped
  • Send and receive page notifications
  • Register observers for the life cycle of pages
  • Register observers for the route actions of pages
  • Hide native navigation bar for flutter pages
  • Supports custom transition animation on the Flutter side

Getting started

You should ensure that you add thrio as a dependency in your flutter project.

dependencies:
  thrio: '^0.5.0'

You can also reference the git repo directly if you want:

dependencies:
  thrio:
    git: [email protected]:hellobike/thrio.git

You should then run flutter pub upgrade or update your packages in IntelliJ.

Example Project

There is a pretty sweet example project in the example folder. Check it out. Otherwise, keep reading to get up and running.

push a page in dart

ThrioNavigator.push(url: 'flutter1');

ThrioNavigator.push(url: '/biz1/native1', params: { '1': {'2': '3'}});

ThrioNavigator.push(url: '/biz1/native1', animated:true);

ThrioNavigator.push(
    url: '/biz2/flutter2',
    params: {'1': {'2': '3'}},
    poppedResult: (params) => ThrioLogger.v('/biz2/flutter2 popped: $params'),
);

push a page in iOS

[ThrioNavigator pushUrl:@"flutter1"];

[ThrioNavigator pushUrl:@"/biz2/flutter2" poppedResult:^(id _Nonnull params) {
    ThrioLogV(@"/biz2/flutter2 popped: %@", params);
}];

push a page in Android

ThrioNavigator.push(this, "/biz1/flutter1",
        mapOf("k1" to 1),
        false,
        poppedResult = {
            Log.e("Thrio", "/biz1/native1 popResult call params $it")
        }
)

pop a page in dart

ThrioNavigator.pop();
// Pop the page without animation
ThrioNavigator.pop(animated: false);
// Pop the page and return parameters
ThrioNavigator.pop(params: 'popped flutter1'),

pop a page in iOS

[ThrioNavigator pop];
// Pop a page without animation
[ThrioNavigator popAnimated:NO];
// Pop the page and return parameters
[ThrioNavigator popParams:@{@"k1": @3}];

pop a page in Android

ThrioNavigator.pop(this, params, animated)

popTo a page in dart

ThrioNavigator.popTo(url: 'flutter1');

ThrioNavigator.popTo(url: 'flutter1', animated: false);

popTo a page in iOS

[ThrioNavigator popToUrl:@"flutter1"];

[ThrioNavigator popToUrl:@"flutter1" animated:NO];

popTo a page in Android

ThrioNavigator.popTo(context, url, index)

remove a page in dart

ThrioNavigator.remove(url: 'flutter1');

ThrioNavigator.remove(url: 'flutter1', animated: true);

remove a page in iOS

[ThrioNavigator removeUrl:@"flutter1"];

[ThrioNavigator removeUrl:@"flutter1" animated:NO];

remove a page in Android

ThrioNavigator.remove(context, url, index)

notify a page in dart

ThrioNavigator.notify(url: 'flutter1', name: 'reload');

notify a page in iOS

[ThrioNavigator notifyUrl:@"flutter1" name:@"reload"];

notify a page in Android

ThrioNavigator.notify(url, index, params)

receive page notifications in dart

NavigatorPageNotify(
      name: 'page1Notify',
      onPageNotify: (params) =>
          ThrioLogger.v('flutter1 receive notify: $params'),
      child: Xxxx());

receive page notifications in iOS

UIViewController implements the NavigatorPageNotifyProtocol and receives page notifications via onNotify

- (void)onNotify:(NSString *)name params:(id)params {
  ThrioLogV(@"/biz1/native1 onNotify: %@, %@", name, params);
}

receive page notifications in Android

Activity implements the OnNotifyListener and receives page notifications via onNotify

class Activity : AppCompatActivity(), OnNotifyListener {
    override fun onNotify(name: String, params: Any?) {
    }
}
Comments
  • thrio1.1.0版本引入到原生工程后影响原生导航显示

    thrio1.1.0版本引入到原生工程后影响原生导航显示

    目前我们项目内是自定义导航控制器,但在部分页面会有导航随页面滚动显示或者隐藏的逻辑。还有部分页面是默认隐藏导航的逻辑。 1、目前出现问题的是页面内导航默认隐藏的页面。在引入thrio后这些页面内的导航会默认显示出来。当然可以通过设置thrio的导航隐藏类解决。但是我们有些功能是私有库,而thrio作为了framework是在整个工程内依赖的,也没有去单独在私有库中依赖,这样导致无法很方便的去解决该问题。 2、侧滑导致崩溃问题。我们的项目中没有用第三方的手势。 崩溃问题我看了下,是找不到【handleNavigationTransition】方法,应该是内部交换方法替换掉原来的边缘滑动手势导致的。

    请问能提供一个接口控制是否启用thrio的导航逻辑吗。 这样可以方便在项目内仅适用thrio的Flutter相关的功能,选择性使用导航相关的功能。

    opened by olderMonster 8
  • v1插件的注册在打开第二个flutter页面的时候会出现'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference

    v1插件的注册在打开第二个flutter页面的时候会出现'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference

    v1插件的注册在打开第二个flutter页面的时候会出现'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference 在打开第一个flutter页面的时候不会

    opened by zxsr20 8
  • [Android] 混合页面跳转返回时pop的问题

    [Android] 混合页面跳转返回时pop的问题

    现在有如下调用栈:

    Native1 -> Flutter1 -> Flutter2 -> Flutter3  -> (返回到Native1)
    
    Native1 : 此页面为原生页面,未注册在Thrio路由中(此页面可能为RN页面或Web页面所以无法注册到Thrio)
    

    问题描述:

    调用流程为如上,Flutter1-3 均接入到Thrio中,现在需要在页面Flutter3 页面时直接返回到Native1页面,现有的pop方法仅支持pop当前栈顶原素,popTo 方法只支持注册在Thrio中的页面,remove方法和pop方法类似,无法同时移除多个栈内Activity

    期待:

    开放Thrio内部栈管理 OR 提供删除多个页面和清除栈内页面的方法

    opened by jeff-liu14 7
  • [Android] 在native pop到flutter的时候,activity可能丢失

    [Android] 在native pop到flutter的时候,activity可能丢失

    • Thrio v.0.2.1
    • Flutter v1.17.2 stable channel
    • Android

    问题描述:

    在flutter和native进行push和pop的过程中,flutter所在的activity可能丢失

    复现方式:

    flutter_thrio的example demo,做如下修改:

    1. lib/src/sample/module1/page1.dart

    加入一个输入框, 放在页面中

    import 'package:flutter/foundation.dart';
    import 'package:flutter/material.dart';
    import 'package:thrio/thrio.dart';
    
    class Page1 extends StatefulWidget {
      const Page1({
        Key key,
        this.index,
        this.params,
      }) : super(key: key);
    
      final int index;
    
      final dynamic params;
    
      @override
      _Page1State createState() => _Page1State();
    }
    
    class _Page1State extends State<Page1> {
      TextEditingController _inputController;
      @override
      void initState() {
        _inputController = TextEditingController();
        super.initState();
    
        if (mounted) {}
      }
    
      @override
      void dispose() {
        _inputController.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) => NavigatorPageNotify(
          name: 'page1Notify',
          initialParams:
              widget.params == null ? null : widget.params['page1Notify'],
          onPageNotify: (params) =>
              ThrioLogger.v('flutter1 receive notify:$params'),
          child: Scaffold(
              appBar: AppBar(
                brightness: Brightness.light,
                backgroundColor: Colors.blue,
                title: const Text('thrio_example',
                    style: TextStyle(color: Colors.black)),
                leading: const IconButton(
                  color: Colors.black,
                  tooltip: 'back',
                  icon: Icon(Icons.arrow_back_ios),
                  onPressed: ThrioNavigator.pop,
                ),
              ),
              body: SingleChildScrollView(
                child: Container(
                  margin: const EdgeInsets.all(24),
                  child: Column(
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: <Widget>[
                        Container(
                          margin: const EdgeInsets.only(top: 10, bottom: 20),
                          alignment: AlignmentDirectional.center,
                          child: Text(
                            'flutter1: index is ${widget.index}',
                            style: TextStyle(fontSize: 28, color: Colors.blue),
                          ),
                        ),
                        Container(
                            height: 25,
                            width: 100,
                            child: TextField(
                                maxLines: 1,
                                controller: _inputController,
                                autofocus: true,
                                textInputAction: TextInputAction.search,
                                // onSubmitted: onSubmitted,
                                decoration: InputDecoration(
                                  hintText: 'hintText',
                                  contentPadding: const EdgeInsets.only(bottom: 12),
                                  border: InputBorder.none,
                                ),
                                onChanged: print)),
                        InkWell(
                          onTap: () => ThrioNavigator.push(
                            url: '/biz1/flutter1',
                            params: {
                              '1': {'2': '3'}
                            },
                            poppedResult: (params) =>
                                ThrioLogger.v('/biz1/flutter1 popped:$params'),
                          ),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.yellow,
                              child: const Text(
                                'push flutter1',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () => ThrioNavigator.remove(url: '/biz1/flutter1'),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.yellow,
                              child: const Text(
                                'remove flutter1',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () => ThrioNavigator.push(
                            url: '/biz2/flutter2',
                            params: {
                              '1': {'2': '3'}
                            },
                            poppedResult: (params) => ThrioLogger.v(
                                '/biz1/flutter1 poppedResult call popped:$params'),
                          ),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.yellow,
                              child: const Text(
                                'push flutter2',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () =>
                              ThrioNavigator.pop(params: 'popped flutter1'),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.yellow,
                              child: const Text(
                                'pop',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () => ThrioNavigator.push(
                            url: 'native1',
                            params: {
                              '1': {'2': '3'}
                            },
                            poppedResult: (params) => ThrioLogger.v(
                                '/biz1/flutter1 poppedResult call params:$params'),
                          ),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.grey,
                              child: const Text(
                                'push native1',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () => ThrioNavigator.notify(
                            url: 'native1',
                            name: 'aaa',
                            params: {
                              '1': {'2': '3'}
                            },
                          ),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.grey,
                              child: const Text(
                                'notify native1',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                        InkWell(
                          onTap: () => ThrioNavigator.remove(url: 'native1'),
                          child: Container(
                              padding: const EdgeInsets.all(8),
                              margin: const EdgeInsets.all(8),
                              color: Colors.grey,
                              child: const Text(
                                'remove native1',
                                style: TextStyle(fontSize: 22, color: Colors.black),
                              )),
                        ),
                      ]),
                ),
              )));
    }
    
    
    
    1. 运行demo,按照如下顺序push native1->flutter1->native1->flutter1 可见每次flutter1都是会打开键盘,准备输入的

    3.然后按照顺序pop回来 flutter1->native1-> flutter1 当页面回到flutter1的时候,键盘不打开了,无论加入SystemChannels.textInput.invokeMethod('TextInput.show'); 都是不可行

    1. 猜测在此时embedded flutterActivity已经被干掉,并且每次做pop操作的时候都会报错

    报错信息: E/FlutterEnginePluginRegistry( 7345): Attempted to notify ActivityAware plugins of onNewIntent, but no Activity was attached. E/FlutterEnginePluginRegistry( 7345): Attempted to detach plugins from an Activity when no Activity was attached.

    此问题影响在此flutterActivity上的一系列插件,都变得不可用

    Android 
    opened by neeboo 6
  • Ambigous use of register

    Ambigous use of register

    截屏2020-10-30 上午10 11 05

    如图所示,OC代码转化为相应的swift代码后,以下三个方法具有相同的方法签名

    • (void)registerModule:(ThrioModule *)module
    • (ThrioVoidCallback)registerPageObserver:(id)pageObserver
    • (ThrioVoidCallback)registerRouteObserver:(id)routeObserver; 造成编译器无法区分要调用哪一个函数

    macOS:10.15.7 XCode: Version 12.1 (12A7403) swift: swift5 thrio:thrio: ^0.5.1

    Flutter 1.20.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision fba99f6cf9 (6 weeks ago) • 2020-09-14 15:32:52 -0700 Engine • revision d1bc06f032 Tools • Dart 2.9.2

    opened by fourdimspace 5
  • 新建一个flutter项目 加入   thrio: '^0.5.0'  导致的问题

    新建一个flutter项目 加入 thrio: '^0.5.0' 导致的问题

    新建一个flutter项目 加入 thrio: '^0.5.0' 导致的问题 kotlin版本 1.3.50 gradle classpath 'com.android.tools.build:gradle:3.5.0' dart版本 193.7547 flutter版本50.0.1 distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip

    为什么我的运行回报错

    e: C:\flutter.pub-cache\hosted\pub.flutter-io.cn\thrio-0.5.1\android\src\main\kotlin\io\flutter\embedding\android\ThrioFlutterView.kt: (601, 17): Type mismatch: inferred type is TextInputChannel but DartExecutor was expected e: C:\flutter.pub-cache\hosted\pub.flutter-io.cn\thrio-0.5.1\android\src\main\kotlin\io\flutter\embedding\android\ThrioFlutterView.kt: (604, 89): Too many arguments for public constructor AndroidTouchProcessor(@NonNull p0: FlutterRenderer) defined in io.flutter.embedding.android.AndroidTouchProcessor e: C:\flutter.pub-cache\hosted\pub.flutter-io.cn\thrio-0.5.1\android\src\main\kotlin\io\flutter\embedding\android\ThrioFlutterView.kt: (666, 53): Type mismatch: inferred type is TextInputChannel but DartExecutor was expected e: C:\flutter.pub-cache\hosted\pub.flutter-io.cn\thrio-0.5.1\android\src\main\kotlin\io\flutter\embedding\android\ThrioFlutterView.kt: (668, 76): Too many arguments for public constructor AndroidTouchProcessor(@NonNull p0: FlutterRenderer) defined in io.flutter.embedding.android.AndroidTouchProcessor

    opened by binbinyYang 5
  • 在swift中使用registerPageBuilder注册一个跳转路由,想要在flutter页面跳转到原生页面,一直失败,无法完成跳转。

    在swift中使用registerPageBuilder注册一个跳转路由,想要在flutter页面跳转到原生页面,一直失败,无法完成跳转。

    ///注册跳转路由 override func onPageRegister() { self.registerPageBuilder({ param -> UIViewController? in return MineSharePageController() }, forUrl: "native1")() self.registerPageObserver(self)() } 无法跳转到相应页面

    opened by wendeqiang 5
  • 请问我应该怎么注册自己的 Method Channel 呢

    请问我应该怎么注册自己的 Method Channel 呢

    请问 iOS 应该怎么注册自己的 Method Channel 呢

    ThrioChannel 暴露了方法: - (void)setupMethodChannel:(NSObject<FlutterBinaryMessenger> *)messenger

    messenger参数应该怎么传呢

    opened by sunimp 5
  • 高版本Xcode创建的iOS工程,以flutter_module方式引入插件,获取 navigationController 可能为空

    高版本Xcode创建的iOS工程,以flutter_module方式引入插件,获取 navigationController 可能为空

    高版本Xcode创建的工程,因为SceneDelegate缘故 UIApplication+Thrio.m , topmostNavigationController方法中, UIViewController *topmostViewController = self.delegate.window.rootViewController;获取可能为nil

    opened by renshaojuncool 5
  • 第二次从native页面打开flutter页面黑屏

    第二次从native页面打开flutter页面黑屏

    第一次native打开flutter正常,再执行pop返回native页面,再次从native打开同一个flutter页面,黑屏 日志如下: 2020-05-28 16:37:43.638 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method registerUrls 2020-05-28 16:37:43.993 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method ready 2020-05-28 16:37:57.276 22675-22675/com.fumikeji.dangkou D/ActivityStackManager: ThrioActivity:attach 2020-05-28 16:37:57.307 22675-22675/com.fumikeji.dangkou E/Thrio: stack push url /biz1/flutter1 index 1 2020-05-28 16:37:57.311 22675-22675/com.fumikeji.dangkou D/WindowManager: Add to mViews: DecorView@34f09f5[ThrioActivity], this = android.view.WindowManagerGlobal@74d5636,pkg= com.fumikeji.dangkou 2020-05-28 16:37:57.342 22675-22675/com.fumikeji.dangkou I/SurfaceView: 103682954 mSurfaceControl 38702587 mBackgroundControl 97984024 creating: SurfaceView - com.fumikeji.dangkou/io.flutter.embedding.android.ThrioActivity 2020-05-28 16:37:57.351 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method onCreate notImplemented 2020-05-28 16:37:57.351 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method willAppear notImplemented 2020-05-28 16:37:57.357 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method didAppear notImplemented 2020-05-28 16:37:57.389 22675-22675/com.fumikeji.dangkou E/Thrio: push result data 1 2020-05-28 16:37:57.451 22675-22675/com.fumikeji.dangkou E/Thrio: onListen arguments null events io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@3589e2 2020-05-28 16:37:59.058 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method pop 2020-05-28 16:37:59.070 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method willDisappear notImplemented 2020-05-28 16:37:59.081 22675-22675/com.fumikeji.dangkou E/Thrio: native1 popResult call params popped flutter1 2020-05-28 16:37:59.082 22675-22675/com.fumikeji.dangkou E/Thrio: stack pop url /biz1/flutter1 index 1 2020-05-28 16:37:59.140 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method didDisappear notImplemented 2020-05-28 16:38:01.704 22675-22675/com.fumikeji.dangkou D/ActivityStackManager: ThrioActivity:attach 2020-05-28 16:38:01.717 22675-22675/com.fumikeji.dangkou E/Thrio: stack push url /biz1/flutter1 index 1 2020-05-28 16:38:01.721 22675-22675/com.fumikeji.dangkou D/WindowManager: Add to mViews: DecorView@27d498a[ThrioActivity], this = android.view.WindowManagerGlobal@74d5636,pkg= com.fumikeji.dangkou 2020-05-28 16:38:01.729 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method onCreate notImplemented 2020-05-28 16:38:01.729 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method willAppear notImplemented 2020-05-28 16:38:01.729 22675-22675/com.fumikeji.dangkou E/Thrio: flutter call method didAppear notImplemented 2020-05-28 16:38:01.749 22675-22675/com.fumikeji.dangkou I/SurfaceView: 108825595 mSurfaceControl 80757784 mBackgroundControl 66879089 creating: SurfaceView - com.fumikeji.dangkou/io.flutter.embedding.android.ThrioActivity 2020-05-28 16:38:01.760 22675-22675/com.fumikeji.dangkou E/Thrio: push result data 1 2020-05-28 16:38:01.763 22675-22675/com.fumikeji.dangkou D/LeakCanary: Watching instance of io.flutter.embedding.android.ThrioActivity (io.flutter.embedding.android.ThrioActivity received Activity#onDestroy() callback) with key 7627e82f-0397-451c-8f86-4e29c01432fb 2020-05-28 16:38:01.763 22675-22675/com.fumikeji.dangkou D/ActivityStackManager: ThrioActivity:detach

    opened by yogkin 5
  • No implementation found for method push on channel _method___thrio_app__

    No implementation found for method push on channel _method___thrio_app__

    [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method push on channel method___thrio_app_) E/flutter ( 8687): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:154:7) E/flutter ( 8687): E/flutter ( 8687): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12) E/flutter ( 8687): #2 ThrioChannel.invokeMethod (package:thrio/src/channel/thrio_channel.dart:63:27) E/flutter ( 8687): #3 NavigatorRouteSendChannel.push (package:thrio/src/navigator/navigator_route_send_channel.dart:41:21) E/flutter ( 8687): #4 ThrioNavigatorImplement.push (package:thrio/src/navigator/thrio_navigator_implement.dart:123:10) E/flutter ( 8687): #5 ThrioNavigator.push (package:thrio/src/navigator/thrio_navigator.dart:42:31) E/flutter ( 8687): #6 MyPage._settingList. (package:time_bourse/page/my/my_page.dart:305:41) E/flutter ( 8687): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:779:19) E/flutter ( 8687): #8 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:862:36) E/flutter ( 8687): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter ( 8687): #10 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:504:11) E/flutter ( 8687): #11 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:282:5) E/flutter ( 8687): #12 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:254:7) E/flutter ( 8687): #13 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27) E/flutter ( 8687): #14 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20) E/flutter ( 8687): #15 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter ( 8687): #16 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter ( 8687): #17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter ( 8687): #18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter ( 8687): #19 _rootRunUnary (dart:async/zone.dart:1196:13) E/flutter ( 8687): #20 _CustomZone.runUnary (dart:async/zone.dart:1085:19) E/flutter ( 8687): #21 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7) E/flutter ( 8687): #22 _invoke1 (dart:ui/hooks.dart:275:10) E/flutter ( 8687): #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:184:5)

    请问下flutter作为第一屏 flutter—>native1 报这个错是什么原因

    opened by you-zuo 4
  • Android上Flutter页面回收重启问题

    Android上Flutter页面回收重启问题

    Describe the bug Android上由于Activity在后台时候会被系统回收,下次打开时会重启原有界面,非Flutter页面没有问题, 但是在Flutter页面的时候回收重启时,原有的页面路由不会恢复,出现了NavigatorMeterialApp中设置的home界面

    To Reproduce 1.打开demo->push flutter1 2.退到后台,操作其它app一段时间(具体看系统内存,垃圾手机比较容易出现) 3.再次点开demo

    期望结果:回收重启后Flutter路由可以还原

    opened by shingohu 2
  • [feat] Flutter端生成代码框架

    [feat] Flutter端生成代码框架

    虽然是混合栈框架,但引入后建议能用 Flutter 实现的都用 Flutter 实现,兼容原生路由栈只是为了复用既有功能和将来可能依赖的外部原生代码,所以本框架的重心之后会放在 Flutter 端的开发体验。

    通过 yaml 文件来配置 Flutter 所有页面的路径,类似如下:

    app:
      order:
        home:
        list:
        detail:
        handle:
          home:
          result:
      waybill:
        home:
        list:
        detail:
        handle:
          home:
          result:
    

    根据该配置,生成模块化的 Flutter 代码框架。实际使用时,url 末尾的 home 可以省略掉。

    opened by foxsofter 0
Owner
Hellobike
Hellobike Open Source
Hellobike
A routing package that lets you navigate through guarded page stacks and URLs using the Router and Navigator's Pages API, aka "Navigator 2.0".

A Flutter package to help you handle your application routing and synchronize it with browser URL. Beamer uses the power of Router and implements all

Sandro Lovnički 485 Jan 7, 2023
Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing

Flutter 148.2k Jan 8, 2023
A mobile client for the public apis repository, 1400+ free apis to use able to be navigated through your phone :)

Public APIs mobile app Your assistant app that will help you discover and pick the next API for your next development project What it contains, you sa

Gwhyyy 4 Dec 25, 2022
Easy nav - A simple wrapper around flutter navigator, dialogs and snackbar to do those things without context

EasyNav Just a simple wrapper around flutter navigator, dialogs and snackbar to

Abdul Shakoor 2 Feb 26, 2022
Flutter Image add drag sort, Image add drag sort, support click event, delete, add, long press drag sort.

flutter_image_add_drag_sort Flutter Image add drag sort, Image add drag sort, support click event, delete, add, long press drag sort, support video fi

null 5 Jun 23, 2020
Consistent design with Flutter Theme

Consistent design with Flutter Theme Source code for the "Consistent design with Flutter Theme" DartPad workshop by Anna Leushchenko ??‍?? ?? ?? ????

Anna (Domashych) Leushchenko 8 Oct 31, 2022
Flutter themes consistent with GitHub's Primer style guidelines

primer_flutter Flutter themes consistent with Primer style guidelines DISCLAIMER: This project is not affiliated with the Primer or GitHub organizatio

Reuben Turner 6 Aug 24, 2022
Scouter is a package which was made following the goal to provide a NestJS-like experience to Dart Developers that want to develop Rest APIS

Scouter is a package which was made following the goal to provide a NestJS-like experience to Dart Developers that want to develop Rest APIS Features

Vinicius Amélio 3 Sep 12, 2022
⚒️ A monorepo containing a collection of packages that provide useful functionality for building CLI applications in Dart.

⚒️ Dart CLI Utilities A monorepo containing a collection of packages that provide useful functionality for building CLI applications in Dart. Document

Invertase 14 Oct 17, 2022
Add easily to your app an introduction screen to provide informations to new users

IntroductionScreen Introduction screen allow you to have a screen at launcher for example, where you can explain your app. This Widget is very customi

Jean-Charles Moussé 484 Jan 6, 2023
FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts

中文文档 中文介绍 Release Note v3.0-preview.17 PS: Before updating the beta version, please read the CHANGELOG to see if there are any BREAKING CHANGE Flutter

Alibaba 6.3k Dec 30, 2022
Trying out Flutter for desktop Web app development as an alternative to SPA frameworks (such as React and Angular) by recreating one of the pages of an existing CV Management web app

HTML Renderer Demo CanvasKit Renderer Demo Reddit discussion This repo contains a PoC of using Flutter as a traditional SPA framework for creating a d

Maxim Saplin 20 Oct 11, 2022
Tencent Cloud Chat: Samples of integratation Flutter SDK to an existing app.

Tencent Cloud Chat Integrate In-App Chat and Call to your existing applications. Samples of integration Flutter SDK to an existing app. This directory

Tencent Cloud 4 Nov 24, 2022
A modified version of the existing checkbox with the shape of a circle instead of a rounded rectangle!

A modified version of the existing checkbox with the shape of a circle instead of a rounded rectangle!

Mash Ibtesum 53 Oct 24, 2022
This project is a rebuild of the existing movie colony https://github.com/debbsefe/Movie-Colony. Here's also a link to the figma file https://www.figma.com/file/XpLFNEsROiN1z6lwnNHMrU/Movie-app?node-id=2956%3A10161

Tvfiy Generated by the Very Good CLI ?? A Very Good Project created by Very Good CLI. Getting Started ?? This project contains 3 flavors: development

Eferha Mamus 3 Nov 12, 2022
A wrapper around Navigator 2.0 and Router/Pages to make their use a easier.

APS Navigator - App Pagination System This library is just a wrapper around Navigator 2.0 and Router/Pages API that tries to make their use easier: ??

Guilherme Silva 14 Oct 17, 2022
FlutterNavigator is a dart library for dealing with the Navigator API without a build context

FlutterNavigator is a dart library for dealing with the Navigator API without a build context. This package wraps the NavigatorKey and provides a cleaner service for navigating without context in your flutter application.

Luke Moody 10 Oct 1, 2022
Aplicação para aula sobre Scaffold, Drawer e Navigator

scaffold_class A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

Deyvid J. Lira 7 Dec 27, 2022
A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices.

Flutter Aeyrium Sensor Plugin Aeyrium Sensor Plugin A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices

Aeyrium 58 Nov 3, 2022