Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Aug 19, 2015

No description provided.

@eseidelGoogle
Copy link
Contributor

lgtm

eseidelGoogle added a commit that referenced this pull request Aug 19, 2015
Implement 'stretch' for flexible items.
@eseidelGoogle eseidelGoogle merged commit 667cfe5 into flutter:master Aug 19, 2015
@Hixie Hixie deleted the flex branch August 19, 2015 20:31
Hixie added a commit to Hixie/sky_engine that referenced this pull request Aug 21, 2015
Fixes flutter#698 to actually work.
Also, adds some debugging aids around Flex.
And a test to check this fix.
rhencke pushed a commit to rhencke/engine that referenced this pull request Dec 20, 2020
…ter#698)

* Attempt to uniformly format code with or without "new"/"const".

One problem with optional new is that dartfmt can no longer reliably
tell what's a constructor call versus some other kind of invocation
(usually a static method on a class). In particular, named constructor
calls do not get formatted as part of a method chain. You get this:

  new Foo().named()
      .method()
      .method()
      .method();

Not:

  new Foo()
      .named()
      .method()
      .method()
      .method();

But if that were a static method call, you *would* get:

  Foo()
      .named()
      .method()
      .method()
      .method();

This means that removing the "new"/"const" keywords from your code can
change how its formatted (beyond just the changes caused by the lines
being shorter). In particular, it means if you run:

  dartfmt --fix -w .
  dartfmt -w .

The second invocation may produce changes, even though it should be
strictly redundant. That's because the first call *does* know which
calls are constructors because the keywords are still there when it's
parsed, but the second does not.

That violates an expectation that dartfmt is idempotent.

This addresses that by having a uniform set of formatting rules for
constructors and other invocations. To avoid ugly cases where a named
constructor would get slurped into a method chain, it pulls out all
static calls from method chains. So with this change you *would* get:

  Foo().named()
      .method()
      .method()
      .method();

It does this for all static calls, not just constructors. That makes
this a fairly large change. I've run it on a large corpus, and I
actually think it looks pretty good with that style.

There is no fully reliably way to identify a "static" call just from
syntax. Instead, it uses the heuristic that class names are capitalized
(but not all caps). This seems to work correctly on all but the weirdest
code I've seen in the wild.

* Update CHANGELOG.
rhencke pushed a commit to rhencke/engine that referenced this pull request Dec 20, 2020
Random VK_ANDROID_external_memory_android_hardware_buffer cleanup
rhencke pushed a commit to rhencke/engine that referenced this pull request Dec 20, 2020
Reapply flutter#698: VK_ANDROID_external_memory_android_hardware_buffer markup cleanup
itekdev pushed a commit to itekdev/flutter-engine0 that referenced this pull request May 1, 2023
Bump actions/checkout from 3.4.0 to 3.5.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants