flutter_smooth icon indicating copy to clipboard operation
flutter_smooth copied to clipboard

Missing classes and methods

Open fabio-o0 opened this issue 2 years ago • 2 comments

There are some things missing when I'm trying to compile, I'm using the custom flutter and engine but maybe I'm missing something.

(The following is not a complete list)

Some of the missing classes are:

  • HitTestEntryFilter (binding.dart)
  • TickerRegistry (auxiliary_tree_pack.dart)
  • TickerRegistryInheritedWidget (auxiliary_tree_pack.dart)

There filter argument is also missing from these methods:

  • gestureBinding.handlePointerEvent() (extra_event_dispatcher.dart)
  • super.dispatchEvent() (binding.dart)

And some other methods that are missing: The method 'readEnginePendingEventsAndClear' isn't defined for the type 'GestureBinding'.

To Reproduce Steps to reproduce the behavior:

  1. for glcient: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git in ~/.zshrc: export PATH=/path/to/depot_tools:$PATH

  2. for engine:

git clone https://github.com/fzyzcjy/engine.git smooth_engine

cd smooth_engine

in .gclient (create):

solutions = [ { "managed": False, "name": "src/flutter", "url": "https://github.com/fzyzcjy/engine.git@465ccd29740625d20ab0cdf2529a9dda19824e99", "custom_deps": {}, "deps_file": "DEPS", "safesync_url": "", }, ]

gclient sync

cd src

./flutter/tools/gn --unoptimized

ninja -C out/host_debug_unopt

(this is gonna take a while)

  1. for flutter: git clone https://github.com/fzyzcjy/flutter.git smooth_flutter

in ~/.zshrc: alias fluttersmooth=‘/path/to/smooth_flutter/bin/flutter'

fluttersmooth doctor: Upstream repository https://github.com/fzyzcjy/flutter.git is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to https://github.com/fzyzcjy/flutter.git to dismiss this error. (dont know how to resolve this but it doesn’t affect compilation)

  1. in pubspec.yaml: environment: sdk: '>=2.18.0 <3.0.0' flutter: ">=3.4.0-29.0.pre.111"

    dependencies: smooth: path: packages/smooth

    dependency_overrides: sky_engine: path: /path/to/smooth_engine/src/out/host_debug_unopt/gen/dart-pkg/sky_engine smooth: path: packages/smooth

  2. in main.dart

void main() {
  SmoothWidgetsFlutterBinding.ensureInitialized();
  ...

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: SmoothListView.builder(
          itemCount: 100,
          itemBuilder: (context, index) {
            return Padding(
              padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 16.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text('Item #$index'),
                  const Icon(Icons.error, color: Colors.grey),
                  const Divider()
                ],
              ),
            );
          }
      )
    );
  }
}

then,

fluttersmooth pub get

fluttersmooth run

Expected behavior Compile and run app.

Smartphone:

  • iPhone 13 Pro
  • OS: iOS 16.0

Additional context I've tried to follow the instructions for compiling but the documentation isn't complete yet (obviously this just came out last week), so maybe I'm missing something in my code/engine. Any help to get this working welcome :)

fabio-o0 avatar Oct 27 '22 18:10 fabio-o0

Hi! Thanks for opening your first issue here! :smile:

welcome[bot] avatar Oct 27 '22 18:10 welcome[bot]

Hi, please use the framework and engine code at the time I write down benchmark chapter of doc. Since I later refactor some of them (when submitting upstream PR) and those may be broken.

IIRC things like HitTestEntryFilter should be in the branch

fzyzcjy avatar Oct 27 '22 22:10 fzyzcjy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 26 '22 23:12 stale[bot]