Commit Graph

151 Commits

Author SHA1 Message Date
Ian Hickson
561a94ccfe Miscellaneous dartdoc markdown fixes 2016-03-17 22:27:58 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Adam Barth
726eff4953 [rename fixit] *OneChild* -> *SingleChild*
Fixes #1482
2016-03-12 12:33:39 -08:00
Hixie
6795efacab Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-12 00:37:31 -08:00
Ian Hickson
43b0104114 Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commit f41b3411da, reversing
changes made to e33d8d9621.

This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.

This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
2016-03-12 00:34:37 -08:00
Hixie
d162d98c79 Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-11 18:27:32 -08:00
Adam Barth
0277b075e0 Provide the BuildContext to createRenderObject and updateRenderObject
We'll need this for RTL support because the RTL state will live in the widget
tree. Also, remove the `oldWidget` argument to updateRenderObject because there
aren't any clients for it.
2016-03-11 08:59:37 -08:00
Ian Hickson
1b9cd52081 Enable ALL THE LINTS
Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
2016-03-10 23:15:31 -08:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
Adam Barth
ac1cba59ca updateRenderObject() methods should use the .. pattern
Fixes #1381
2016-03-01 13:03:29 -08:00
Adam Barth
fb4dbf4584 Improve TextSpan
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.

This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
2016-02-24 14:07:10 -08:00
Viktor Lidholt
ecfc303270 Correctly calculates gravity in particle systems 2016-02-17 10:14:44 -08:00
Ian Hickson
a94999ba50 Clean up imports and exports.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.

- In painting.dart, export from dart:ui all the Canvas-related APIs
  that make sense to be used at higher levels, e.g. PaintingStyle.

- Delete painting/shadows.dart. It was dead code.

- In rendering/object.dart, export all of painting.dart.

- In widgets/basic.dart, export all of painting.dart and
  animation.dart. Some classes in animation/ are renamed to make this
  less disruptive and confusing to the namespace.

- Split out Stocks back into an import model rather than a part model,
  so that it's easier to manage its dependencies on a per-file basis.

- Move Ticker to scheduler library.

- Remove as many redundant imports as possible now.

- Some minor nit picking cleanup in various files.
2016-02-11 00:06:23 -08:00
Viktor Lidholt
b727f34fc2 Fixes issue with replacing the root node 2016-02-08 09:56:56 -08:00
Ian Hickson
e739d7431e Merge pull request #1043 from devoncarew/flutter_sprites_test
Flutter sprites test
2016-02-04 12:55:46 -08:00
Jason Simmons
6f6584b6da Update flutter_sprites now that ImageResource.first returns an ImageInfo 2016-02-02 17:07:26 -08:00
Viktor Lidholt
592250885f Adds opacity property to particle systems 2016-01-29 14:52:31 -08:00
Devon Carew
9aa39192a9 add a test for flutter_sprites 2016-01-14 09:13:44 -08:00
Devon Carew
f6518a6254 remove the flutter_sprites/lib/src/sound_manager.dart library 2016-01-14 09:07:25 -08:00
Ian Hickson
8f894f3757 Merge pull request #1140 from Hixie/concat
Transition callers from 'concat' to 'transform'
2016-01-11 20:05:07 -08:00
Alex Fandrianto
ddb060d685 Add reference to "mojo:media_service" in sound.dart
Related: https://github.com/domokit/mojo/issues/614

Flutter can play sounds using this package. However, when Mojo Shell is running Flutter, it lacks the necessary media service.

This patch creates a hook to the mojo binary `media_service.mojo`. If Mojo Shell is built with this media service, then it will be able to play sounds when running Flutter.
2016-01-11 18:13:50 -08:00
Ian Hickson
17ef9488ff Transition callers from 'concat' to 'transform'
See: https://github.com/flutter/flutter/issues/1080
2016-01-08 08:58:31 -08:00
Seth Ladd
ef4ea9b776 generate docs for sprites 2016-01-07 15:55:41 -08:00
Jason Simmons
1d16ebff05 Merge pull request #959 from jason-simmons/sound_track_pause
Pause and resume of all tracks in SoundTrackPlayer
2015-12-16 13:17:06 -08:00
Jason Simmons
8c45c949a9 Pause and resume of all tracks in SoundTrackPlayer 2015-12-16 13:11:23 -08:00
Jason Simmons
680540f9f4 Apply looping and volume in the SoundTrackPlayer 2015-12-16 13:05:44 -08:00
Jason Simmons
db10a6ee29 Update SoundEffectPlayer to use the SoundPool API 2015-12-14 12:37:17 -08:00
Jason Simmons
80e2422f6a Use Scheduler.instance in flutter_sprites 2015-12-14 10:27:55 -08:00
Ian Hickson
5996d381a7 Check for cycles in our various tree structures. 2015-12-10 19:30:46 -08:00
Jason Simmons
0c9333cc10 Change flutter_sprites to use the current PointerEvent.position API 2015-12-08 10:46:44 -08:00
Viktor Lidholt
1e683b2f61 Merge pull request #704 from vlidholt/master
Fixes issue with physics debug drawing in sprites
2015-12-07 10:22:25 -08:00
Ian Hickson
2965dcb61f Cleanup for the Pointer changes. 2015-12-05 00:31:27 -08:00
Adam Barth
abf0359569 Remove PaintingCanvas
We can just use Canvas now.  The two are the same thing.
2015-12-04 20:26:08 -08:00
Viktor Lidholt
aafcbbc4f9 Fixes issue with physics debug drawing in sprites 2015-12-03 13:55:32 -08:00
Florian Loitsch
728211526a Rename some of the functions from the scheduler.
The names are probably less familiar, but more consistent:
- FrameCallback: a callback that is relative to the frame and wants the
  frame offset (a duration) as argument.
- addXFrameCallback: adds the given callback to the internal lists/maps.
- scheduleXFrameCallback (currently only X = ""): add the callback, but
  also trigger a new frame.
- handleX: the method that is invoked when the event-loop or the frame
  calls into the scheduler.
- ensureXYZ: ensure that the callback happens.
  Unfortunately there is the ambiguity between a "callback": it can be a
  closure, or the action of doing a callback, so we end up with:
  ensureBeginFrameCallback, and ensureEventLoopCallback, where
  "callback" means the action of being called back.
2015-12-02 15:37:11 -08:00
Adam Barth
12304965a4 Add missing import to flutter_sprites 2015-12-02 10:39:20 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Adam Barth
68eebaa5db Add some basic benchmarks of the Stocks app
- animation_bench.dart. This benchmark measures the full main-thread pipeline
   for ticking the drawer entrance and exit animation.
 - build_bench.dart. This benchmark measures a full app rebuild when there's no
   state change.
 - layout_bench.dart. This benchmark measures a full relayout.
2015-11-10 09:29:37 -08:00
Adam Barth
08539b4e4d Rewire the pubspecs to use local paths
Using local paths ensures that each package sees each other package at HEAD.
2015-11-06 22:46:52 -08:00
Adam Barth
e9cc4d73fe Rev pub spec 2015-11-06 15:39:56 -08:00
Adam Barth
70bd462074 Rev pub specs 2015-11-04 14:49:29 -08:00
Adam Barth
e971f32648 Rev pubspecs 2015-11-02 13:19:55 -08:00
Hixie
fca9b8f3d6 Rev package versions for release.
sky_engine is now at 0.0.45
sky_services is now at 0.0.45
flx is now at 0.0.4
flutter is now at 0.0.15
flutter_sprites is now at 0.0.12
2015-10-29 14:41:56 -07:00
Adam Barth
fab160cfce Rationalize embedder.dart and shell.dart
This patch combines embedder.dart and shell.dart into one thing. We should now
handle a bunch of error cases better.

  * embedder.connectToApplication has moved to shell.connectToApplication,
    matching the rest of the mojo universe.
  * embedder.connecttoService has moved to shell.connnectToService (and merged
    with shell.requestService).
  * shell.requestService is now shell.connectToService, matching the rest of
    the mojo universe.
  * serviceRegistry has moved from embedder.serviceRegistry to a top-level
    getter.

Fixes #1803
2015-10-29 10:47:34 -07:00
Viktor Lidholt
856ee97892 Merge pull request #1863 from vlidholt/master
Adds API documentation to sprite physics
2015-10-28 17:07:02 -07:00
Viktor Lidholt
567b0cf293 Adds API documentation to sprite physics and renames a few private variables for clarity. 2015-10-28 16:51:00 -07:00
Hixie
cbf9eab8fe Rev package versions for release.
sky_engine is now at 0.0.44
sky_services is now at 0.0.44
flx is now at 0.0.3
flutter is now at 0.0.14
flutter_sprites is now at 0.0.11
2015-10-28 14:54:33 -07:00
Adam Barth
02a1ebabd7 Rev pub packages 2015-10-27 20:15:58 -07:00
Viktor Lidholt
fde92a69a5 Improves physics debug drawing 2015-10-27 13:38:52 -07:00
Viktor Lidholt
96689dec7f Fixes issue with physics collision groups 2015-10-27 13:38:20 -07:00