1. 07 Jan, 2021 1 commit
    • Ian Hickson's avatar
      Minor doc, style, and perf updates to Navigator/Routes (#71689) · fdab8546
      Ian Hickson authored
      * Minor doc, style, and perf updates to Navigator/Routes
      
      These are minor fixes I ended up making while working on a larger
      project that never went anywhere.
      
      - Used a ColoredBox instead of a DecoratedBox for ModalBarrier
        (probably a trivial memory/perf win).
      
      - A bunch of Navigator documentation fixes around when things rebuild.
      
      - Mark routes dirty when the Navigator has a dependency change. I
        cannot find a way to test this because as far as I can tell it makes
        no actual difference to when things rebuild because whenever the
        Navigator rebuilds the Overlay rebuilds and whenever that happens
        every OverlayEntry rebuilds, but in theory that's not guaranteed so
        this is sort of a correctness fix. It may even be a perf loss. We do
        something similar in didUpdateWidget already. I could be convinced
        to maybe remove these...
      
      - Make ModalRoute.filter public like everything else.
      
      - Made ModalRoute update its barrier when it gets an update, in case
        e.g. the modal barrier depends on inherited widgets via the
        navigator context. Again, not sure of any way to detect this, it
        might actually be moot, but it seems to be the technically correct
        solution?
      
      - Minor style fixes.
      
      All in all I couldn't figure out a way to test any of this (I wrote
      multiple large tests but it turns out they all already pass on master
      and are effectively redundant with existing tests).
      
      * Remove extraneous blank line
      fdab8546
  2. 21 Oct, 2020 1 commit
  3. 10 Oct, 2020 1 commit
  4. 15 Sep, 2020 1 commit
    • Alexandre Ardhuin's avatar
      Reland "Nnbd widgets" (#65528) · b007a81a
      Alexandre Ardhuin authored
      * Reland "Nnbd widgets (#64672)"
      
      This reverts commit 127e6790.
      
      * remove non-nullable enforcement on AsyncSnapshot
      
      * make data param non-nullable for AsyncSnapshot.withData
      
      * make some Text params non-nullable
      b007a81a
  5. 09 Sep, 2020 2 commits
    • Michael Goderbauer's avatar
      Revert "Nnbd widgets (#64672)" (#65488) · 127e6790
      Michael Goderbauer authored
      This reverts commit e682ec71.
      127e6790
    • Alexandre Ardhuin's avatar
      Nnbd widgets (#64672) · e682ec71
      Alexandre Ardhuin authored
      * migrate widget to nullsafety
      
      * remove double blank line after license
      
      * address review comments in actions.dart
      
      * nullable ObjectKey.value
      
      * use local variable oldElement
      
      * make State.build non-nullable
      
      * make State.context non-nullable
      
      * newline at eof
      
      * make ProxyWidget.child non-nullable
      
      * make _InactiveElements.debugContains non-nullable
      
      * make Element.depth non-nullable
      
      * make ProxyElement.build non-nullable
      
      * make StatefulElement.state non-nullable
      
      * remove 'Notice that'
      
      * avoid cast of list in RenderObjectElement.updateChildren
      
      * make IndexedSlot.value non-nullable
      
      * avoid cast of list in MultiChildRenderObjectElement.mount
      
      * make some WidgetsApp parameters non-nullable
      
      * hitTest take non-nullable position
      
      * make ScrollableState.position non-nullable
      
      * use _pixels instead of pixels
      
      * make ViewportOffset.pixels non-nullable
      
      * make param and return type of IndexedWidgetBuilder non-nullable
      
      * unused_import
      
      * make context param non-nullable for Builder in animated_list.dart
      
      * make ScrollMetrics.viewportDimension non-nullable
      
      * make ScrollMetrics.{min,max}ScrollExtent non-nullable
      
      * make _Location.file non-nullable
      
      * _WidgetForTypeTests.createElement throw UnimplementedError
      
      * update _NullWidget.build error message
      
      * make _ShortcutsState.manager non-nullable
      
      * Fix childCount issues for NNBD
      
      * fix childCount computation on web
      
      * increase max value on js side to compute childCount
      
      * make aspect parameter of dependOnInheritedWidgetOfExactType nullable
      
      * merge has{min,max}ScrollExtent into hasScrollExtents
      
      * update focus_manager.dart
      
      * address review comments in icon.dart
      
      * address review comments in image.dart
      
      * address review comments in routes.dart
      
      * address review comments in scroll_activity.dart
      
      * update doc comments
      
      * make UserScrollNotification.direction non-nullable and required
      
      * rename hasScrollExtents to hasContentDimensions
      
      * unnecessary late
      Co-authored-by: 's avatarIan Hickson <ian@hixie.ch>
      e682ec71
  6. 24 Jul, 2020 1 commit
  7. 11 Jun, 2020 1 commit
  8. 28 May, 2020 1 commit
  9. 03 Mar, 2020 1 commit
  10. 04 Dec, 2019 1 commit
  11. 27 Nov, 2019 2 commits
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * Update project.pbxproj files to say Flutter rather than Chromium
      
      Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
      
      * Update the copyright notice checker to require a standard notice on all files
      
      * Update copyrights on Dart files. (This was a mechanical commit.)
      
      * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
      
      Some were already marked "The Flutter Authors", not clear why. Their
      dates have been normalized. Some were missing the blank line after the
      license. Some were randomly different in trivial ways for no apparent
      reason (e.g. missing the trailing period).
      
      * Clean up the copyrights in non-Dart files. (Manual edits.)
      
      Also, make sure templates don't have copyrights.
      
      * Fix some more ORGANIZATIONNAMEs
      449f4a66
    • Greg Spencer's avatar
      Add macOS to TargetPlatform (#43457) · 245d1b51
      Greg Spencer authored
      This PR adds TargetPlatform.macOS to the TargetPlatform enum. This allows us to begin implementation of some adaptive UI based on which target platform is desired.
      
      I haven't updated the tests here, that will come in a follow-up PR.
      245d1b51
  12. 13 Nov, 2019 1 commit
  13. 14 Oct, 2019 1 commit
  14. 02 Oct, 2019 1 commit
  15. 20 Aug, 2019 1 commit
  16. 29 Jul, 2019 1 commit
    • Tong Mu's avatar
      Redo: Modal dismissed by any button (#36956) · 24f483cf
      Tong Mu authored
      This PR makes ModalBarrier dismiss modal with any button press instead of primary button up, by making it use a private recognizer _AnyTapGestureRecognizer that is similar to TapGestureRecognizer but accepts gestures by any single button.
      24f483cf
  17. 24 Jul, 2019 1 commit
  18. 18 Jul, 2019 1 commit
    • Tong Mu's avatar
      Dismiss modal with any button press (#32770) · 1aa4628f
      Tong Mu authored
      This PR makes ModalBarrier dismiss modal with any button press instead of primary button up, by making it use a private recognizer _AnyTapGestureRecognizer that claims victor and calls onAnyTapDown immediately after it receives any PointerDownEvent.
      1aa4628f
  19. 01 Mar, 2019 1 commit
    • Alexandre Ardhuin's avatar
      Add missing trailing commas (#28673) · 387f8854
      Alexandre Ardhuin authored
      * add trailing commas on list/map/parameters
      
      * add trailing commas on Invocation with nb of arg>1
      
      * add commas for widget containing widgets
      
      * add trailing commas if instantiation contains trailing comma
      
      * revert bad change
      387f8854
  20. 22 Jan, 2019 1 commit
  21. 18 Dec, 2018 1 commit
  22. 01 Nov, 2018 1 commit
  23. 12 Sep, 2018 1 commit
  24. 10 Aug, 2018 1 commit
  25. 10 Jul, 2018 1 commit
  26. 05 Jun, 2018 1 commit
  27. 23 Apr, 2018 1 commit
    • Yegor's avatar
      a11y traversal: sort locally; use new sorting algorithm (#16253) · d3540962
      Yegor authored
      New a11y traversal:
      
      - sort direct sibling SemanticsNodes only
      - use new sorting algorithm
      - implement RTL
      - test semantics in traversal order by default
      - add AppBar traversal test
      - breaking: remove nextNodeId/previousNodeId from the framework
      - breaking: remove DebugSemanticsDumpOrder.geometricOrder
      d3540962
  28. 14 Dec, 2017 1 commit
  29. 28 Sep, 2017 1 commit
  30. 06 Jul, 2017 1 commit
  31. 03 Jun, 2017 1 commit
  32. 30 May, 2017 1 commit
  33. 27 Apr, 2017 1 commit
  34. 21 Apr, 2017 1 commit
  35. 20 Mar, 2017 1 commit
  36. 01 Mar, 2017 1 commit
  37. 16 Jun, 2016 1 commit
    • Ian Hickson's avatar
      Refactor everything to do with images (#4583) · 2dfdc840
      Ian Hickson authored
      Overview
      ========
      
      This patch refactors images to achieve the following goals:
      
      * it allows references to unresolved assets to be passed
        around (previously, almost every layer of the system had to know about
        whether an image came from an asset bundle or the network or
        elsewhere, and had to manually interact with the image cache).
      
      * it allows decorations to use the same API for declaring images as the
        widget tree.
      
      It requires some minor changes to call sites that use images, as
      discussed below.
      
      Widgets
      -------
      
      Change this:
      
      ```dart
            child: new AssetImage(
              name: 'my_asset.png',
              ...
            )
      ```
      
      ...to this:
      
      ```dart
            child: new Image(
              image: new AssetImage('my_asset.png'),
              ...
            )
      ```
      
      Decorations
      -----------
      
      Change this:
      
      ```dart
            child: new DecoratedBox(
              decoration: new BoxDecoration(
                backgroundImage: new BackgroundImage(
                  image: DefaultAssetBundle.of(context).loadImage('my_asset.png'),
                  ...
                ),
                ...
              ),
              child: ...
            )
      ```
      
      ...to this:
      
      ```dart
            child: new DecoratedBox(
              decoration: new BoxDecoration(
                backgroundImage: new BackgroundImage(
                  image: new AssetImage('my_asset.png'),
                  ...
                ),
                ...
              ),
              child: ...
            )
      ```
      
      DETAILED CHANGE LOG
      ===================
      
      The following APIs have been replaced in this patch:
      
      * The `AssetImage` and `NetworkImage` widgets have been split in two,
        with identically-named `ImageProvider` subclasses providing the
        image-loading logic, and a single `Image` widget providing all the
        widget tree logic.
      
      * `ImageResource` is now `ImageStream`. Rather than configuring it with
        a `Future<ImageInfo>`, you complete it with an `ImageStreamCompleter`.
      
      * `ImageCache.load` and `ImageCache.loadProvider` are replaced by
        `ImageCache.putIfAbsent`.
      
      The following APIs have changed in this patch:
      
      * `ImageCache` works in terms of arbitrary keys and caches
        `ImageStreamCompleter` objects using those keys. With the new model,
        you should never need to interact with the cache directly.
      
      * `Decoration` can now be `const`. The state has moved to the
        `BoxPainter` class. Instead of a list of listeners, there's now just a
        single callback and a `dispose()` method on the painter. The callback
        is passed in to the `createBoxPainter()` method. When invoked, you
        should repaint the painter.
      
      The following new APIs are introduced:
      
      * `AssetBundle.loadStructuredData`.
      
      * `SynchronousFuture`, a variant of `Future` that calls the `then`
        callback synchronously. This enables the asynchronous and
        synchronous (in-the-cache) code paths to look identical yet for the
        latter to avoid returning to the event loop mid-paint.
      
      * `ExactAssetImage`, a variant of `AssetImage` that doesn't do anything clever.
      
      * `ImageConfiguration`, a class that describes parameters that configure
        the `AssetImage` resolver.
      
      The following APIs are entirely removed by this patch:
      
      * `AssetBundle.loadImage` is gone. Use an `AssetImage` instead.
      
      * `AssetVendor` is gone. `AssetImage` handles everything `AssetVendor`
        used to handle.
      
      * `RawImageResource` and `AsyncImage` are gone.
      
      The following code-level changes are performed:
      
      * `Image`, which replaces `AsyncImage`, `NetworkImage`, `AssetImage`,
        and `RawResourceImage`, lives in `image.dart`.
      
      * `DecoratedBox` and `Container` live in their own file now,
        `container.dart` (they reference `image.dart`).
      
      DIRECTIONS FOR FUTURE RESEARCH
      ==============================
      
      * The `ImageConfiguration` fields are mostly aspirational. Right now
        only `devicePixelRatio` and `bundle` are implemented. `locale` isn't
        even plumbed through, it will require work on the localisation logic.
      
      * We should go through and make `BoxDecoration`, `AssetImage`, and
        `NetworkImage` objects `const` where possible.
      
      * This patch makes supporting animated GIFs much easier.
      
      * This patch makes it possible to create an abstract concept of an
        "Icon" that could be either an image or a font-based glyph (using
        `IconData` or similar). (see
        https://github.com/flutter/flutter/issues/4494)
      
      RELATED ISSUES
      ==============
      
      Fixes https://github.com/flutter/flutter/issues/4500
      Fixes https://github.com/flutter/flutter/issues/4495
      Obsoletes https://github.com/flutter/flutter/issues/4496
      2dfdc840
  38. 07 Jun, 2016 1 commit