Commit Graph

248 Commits

Author SHA1 Message Date
Adam Barth
ff14f35d6d CustomScrollView (#7881)
Also, use CustomScrollView in Shrine and fix a bug with one-line grids
not painting properly due to their reporiting zero paintExtent.
2017-02-03 22:52:25 -08:00
Ian Hickson
332a23030b Rename and refactor ScrollView hierarchy (#7865)
This prepares us for a CustomScrollView that takes slivers.
2017-02-03 16:05:43 -08:00
Ian Hickson
5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Adam Barth
fe01c71cf4 Switch clients to ScrollGrid (#7752)
The only remaining client of ScrollableGrid (the old version) is Pesto,
which needs AppBar integration.
2017-02-01 11:01:02 -08:00
Adam Barth
695302029f Revert "Revert "Add SliverGrid and ScrollGrid"" (#7780) 2017-02-01 10:18:48 -08:00
Ian Hickson
32784d35f9 Revert "Add SliverGrid and ScrollGrid" (#7769) 2017-01-31 17:34:02 -08:00
Adam Barth
9119969ad2 Add SliverGrid and ScrollGrid (#7745)
This patch adds grid supports to slivers and introduces a ScrollGrid
convenience class for making the common types of scrollable grids.

This patch also deploys ScrollGrid in an example in the Flutter Gallery.
2017-01-30 17:27:51 -08:00
Adam Barth
a0dee550c0 Use ScrollView in more places (#7746)
Now that ScrollView supports itemExtent, we can use it in a few more places.
2017-01-30 16:45:51 -08:00
Ian Hickson
62c1b0b217 Fix wording of app bar vs toolbar in gallery (#7720)
Reverts a change from https://github.com/flutter/flutter/pull/3158.
Fixes https://github.com/flutter/flutter/issues/3161
2017-01-28 14:24:19 -08:00
Ian Hickson
571834ea3c Indicate required fields in flutter_gallery demo. (#7717) 2017-01-28 01:48:18 -08:00
Adam Barth
5ecf8786b4 Add ScrollView.padding (#7690)
Uses SliverPadding to implementing paddding in ScrollView. Also, deploy
ScrollView in more places now that it implements padding.

Finally, remove loader_app.dart because it is not referenced.
2017-01-26 23:14:37 -08:00
Adam Barth
a4eca31777 Use ScrollView in examples a manual_tests (#7645)
This patch deploys ScrollView in a number of demos and manual tests.
2017-01-25 21:59:03 -08:00
Adam Barth
559621ca5a Add SingleChildScrollView (#7620)
This widget is a replacement for ScrollableViewport that uses the new
Scrollable2 machinery. The widget is not based on Slivers but does use the new
scroll behavior classes.
2017-01-24 15:16:01 -08:00
Adam Barth
bf296f715e Test DataTable (#7591)
This patch adds a basic test for the DataTable widget.
2017-01-23 12:40:51 -08:00
Ian Hickson
63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Ian Hickson
9573bc14e0 Avoid double negatives in text editing APIs (#7577)
hideText -> obscureText
hideDivider -> !showDivider
2017-01-21 23:34:54 -08:00
Ian Hickson
15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Adam Barth
b2a2ee72f9 Migrate from Input to TextField
We expect TextField to be used much more often than Input. This patch updates
our old example code to use TextField instead.

See #7031
2017-01-19 14:53:08 -08:00
Adam Barth
930b52a3e5 Rename InputFormField to TextField
This patch is the first of a series to rationalize the names of the text-input
related widgets.

See #7031
2017-01-19 14:53:08 -08:00
Michael Goderbauer
8b1121851e Fix icon color in dark theme of gallery (#7544)
Previously, the icon in the tooltip demo was black on black background
in the dark theme. Now it is white on black background in the dark theme
and black on white background in the light theme.

fixes #7018
2017-01-19 11:20:55 -08:00
Hans Muller
0ce9917fb2 Support for vetoing an attempt to pop the current route (#7488) 2017-01-18 11:04:18 -08:00
Adam Barth
ad27fcd3dc Add SimpleDialogOption (#7494)
The demo of the SimpleDialog had some useful code that should really be part of
the framework. This patch extracts it into a SimpleDialogOption widget.

Remove debugCheckHasScaffold because it is unused.

Also, add tests for InkWell, SimpleDialog, and other widgets.
2017-01-13 23:26:05 -08:00
Adam Barth
4955eef8a7 Refactor IconThemeData.fallback (#7490)
Now IconThemeData.fallback is a factory constructor and IconThemeData.of() does
the work of computing the fallback for its clients.

Also, add tests for ImageIcon and ListItems.
2017-01-13 14:44:47 -08:00
Hans Muller
b23aed7a86 New Tabs API (#7387) 2017-01-09 14:55:36 -08:00
Adam Barth
0c6dc598f7 Slider shouldn't be open at min (#7342)
This patch changes the default appearance of Slider to not have the
thumb be an open circle at its minimum position. The `thumbOpenAtMin`
property can enable drawing an open thumb at the min position, which was
the previous behavior.

Fixes #6941
2017-01-05 11:29:55 -08:00
Hans Muller
d05c7f62f2 UserAccountsDrawerHeader gallery demo, etc (#7297) 2016-12-21 06:19:42 -08:00
Luke
1b9939af95 Rename DestinationLabel on BottomNavigationBar (#7281)
* rename DestinationLabel and labels properties to BottomNavigationBarItem and items

* update/fix comments

* grammatical changes

* add myself to AUTHORS
2016-12-17 18:14:37 -08:00
Matt Perry
6d4191e98c Forms provide more control over when they validate. (#7283)
Callers can manually validate by calling validate(), or tell the Form to
validate on every change by setting the `autovalidate` parameter.

Fixes https://github.com/flutter/flutter/issues/7219
2016-12-16 18:14:37 -05:00
Hans Muller
dbf1cfdbf0 Do not pad the Input/InputContainer icon (#7282) 2016-12-16 12:10:57 -08:00
Hans Muller
a3183a4a86 BottomNavigationBar accepts widget icons (#7161) 2016-12-06 08:14:36 -08:00
Hans Muller
7667a3f8eb DropdownButton hint (#7114) 2016-12-01 07:27:14 -08:00
Adam Barth
f960215167 Remove unneeded analyzer ignores (#7109)
We don't need these anymore.
2016-11-30 14:54:01 -08:00
Hans Muller
57d5de8459 Fix label text wrapping in expansion panels gallery demo (#7103) 2016-11-30 09:52:54 -08:00
Hans Muller
e05dcc9c71 Remove extraneous gallery demo scrollable keys (#7098) 2016-11-30 08:47:22 -08:00
Hans Muller
ab0fdd7227 removed debugPrintFoo debris (#7067) 2016-11-29 09:26:34 -08:00
Hans Muller
1e90810566 Pesto favorite Recipe FAB should respond to taps within the app bar (#7059) 2016-11-29 09:02:20 -08:00
Hans Muller
2398cd9acc Remove extraneous gallery demo imports (#7002) 2016-11-23 11:08:06 -08:00
Adam Barth
8ca4caa440 Rename Flexible to Expanded and improve docs (#6978)
This patch replaces uses of Flexible with Expanded where we're using
FlexFit.tight. We still need to think of a better name for the
FlexFit.loose variant.

Also, improve the docs for Row, Column, Flex, and RenderFlex to be more
problem-oriented and to give a complete account of the layout algorithn.

Fixes #6960
Fixes #5169
2016-11-21 23:16:43 -08:00
Hans Muller
39872e7df1 Combine date and time picker demos (#6933) 2016-11-21 11:49:35 -08:00
Hans Muller
f496ad055a Fix GridTileBar layout (#6844) 2016-11-15 12:01:27 -08:00
Hans Muller
f0b8c866db Fix gallery demo body centering (#6841) 2016-11-14 10:21:05 -08:00
Raju Bitter
3f8c37cfab Fix for issue https://github.com/flutter/flutter/issues/6826 (#6833)
Exception in Flutter Gallery / Dialogs Demo #6826
2016-11-12 09:20:34 -08:00
Ian Hickson
a7debdc72f Delete fail.dart (#6699)
I think we must have accidentally checked this in some time.
2016-11-03 14:39:39 -07:00
Matt Perry
113991da95 Rethink Forms. (#6569)
FormField is now a widget that can contain any type of field. Input no
longer has special code to handle form fields. Instead, there is a
helper widget InputFormField for using an Input inside a FormField.

Fixes https://github.com/flutter/flutter/issues/6097 and based on
feedback from the same.
2016-11-02 14:27:21 -04:00
Chris Bracken
58630cc209 Derive colors demo TextStyle from theme (#6632) 2016-11-01 16:11:41 -07:00
Hans Muller
fc03057b1a Avoid known wide gallery title issues (#6534) 2016-10-28 12:05:01 -07:00
Matt Perry
76844e25da Fix Bruschetta typo. (#6568) 2016-10-27 17:18:12 -04:00
Eric Seidel
cf3452fbac Revert "Fix Bruschetta typo" (#6565) 2016-10-27 22:46:53 +02:00
Eric Seidel
bf3d478f25 Fix Bruschetta typo (#6563)
Fixes https://github.com/flutter/flutter/issues/6561
2016-10-27 22:27:22 +02:00
Hans Muller
8cd1b79364 Fix Gallery grid demo zoom (#6531) 2016-10-25 14:04:23 -07:00
Chris Bracken
2434747e6e Fix NPEs in DatePicker, TimePicker demos (#6509) 2016-10-24 17:52:16 -07:00
Ian Hickson
c895d2f6f5 Add more docs around .of functions (#6482) 2016-10-24 11:17:34 -07:00
Wyatt Arent
cc11c39b59 #6344 update google.com/material links to material.google.com (#6484) 2016-10-22 21:51:53 -07:00
Hans Muller
a8bf594e59 Scale card demo titles if they will not fit (#6462) 2016-10-21 14:10:39 -07:00
Ian Hickson
729efa2501 Propagate platform through the subsidiary themes. (#6396)
Since we can change the theme's platform, we need to make sure we
propagate that throughout rather than having half the app use the native
platform and half the app use the selected platform.
2016-10-20 23:28:30 -04:00
Matt Perry
fdb76da5c9 Remove default horizontal padding for Input. (#6437)
This partially reverts https://github.com/flutter/flutter/issues/626 ,
but horizontal padding is not in the spec, so we still match the spec.
2016-10-20 16:38:09 -04:00
Adam Barth
c08ea4eb33 Switch to TextInputPlugin (#6392)
This patch removes uses of keyboard.mojom in favor of the
TextInputPlugin.
2016-10-19 15:53:31 -07:00
Adam Barth
63e7a0e80a Add BuildContext.size as a convenience getter (#6355)
Developers need to get the size of the BuildContext sufficiently often
that we should provide a convenient getter for the value. Having this
getter is also an opportunity to catch common mistakes and provide
useful error messages that guide developers towards better patterns.

Fixes #2321
2016-10-17 12:33:11 -07:00
Adam Barth
ffe14b0d27 Navigator.push and Navigator.pushNamed should return Futures (#6333)
These futures complete when the route is popped off the navigator. This
generalizes and simplifies a mechanism already in place for dialogs and
menus.

Fixes #5283
2016-10-14 16:05:45 -07:00
Matt Perry
c13a6e275b Add a maxLines parameter for multiline Input. (#6310)
* Add a maxLines parameter for multiline Input.

If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271

* oops

* comments

* import

* test and RO.update fix

* constant

* fix.caretRect
2016-10-13 21:59:50 -04:00
Todd Volkert
67254ef626 Run dartfmt on a few of the gallery example files (#6260) 2016-10-10 20:04:07 -07:00
Matt Perry
2fd78dcc53 Add multiline support to Input and friends. (#6155)
Fixes https://github.com/flutter/flutter/issues/6154
2016-10-05 15:46:48 -04:00
Hans Muller
e2ff169d5b Have the scale gesture callback uses details objects (#6204) 2016-10-04 12:44:36 -07:00
Hans Muller
596637ade4 Added scale-to-zoom gesture support to the Gallery grid demo (#6185) 2016-10-03 16:08:15 -07:00
Chris Bracken
b371788df1 Remove Pesto recipe card scaffold leading override (#6172)
The current implementation matches the default behaviour of the material
scaffold.
2016-10-03 10:21:42 -07:00
Adam Barth
8a823328ca Make animation_demo a manual test (#6117)
This demo doesn't work properly in landscape and is confusing. It's
really more of a test of the material arc code.

Fixes #5710
2016-09-29 08:59:43 -07:00
Adam Barth
6469872abd Rename Container.align to alignment (#6116)
To match the Align widget (and several other widgets).

Fixes #6101
2016-09-28 11:17:04 -07:00
Adam Barth
dc4a1638ee Specialize AlertDialog and SimpleDialog (#6098)
We were trying to cram too much functionality in to the Dialog widget. Now we
have AlertDialog and SimpleDialog to cover to two different kinds of dialogs in
the spec.
2016-09-27 15:44:11 -07:00
Matt Perry
f6da3b2a95 Add a Submit button to text fields demo. (#6102)
Fixes https://github.com/flutter/flutter/issues/6056
2016-09-27 17:11:22 -04:00
Adam Barth
09506d5630 Progress indicator demo should look good in landscape (#6088)
This patch fixes the issue in two ways:

1. The content area is now scrollable, which means you can scroll to reveal any
   parts that don't fit on screen.
2. The content area is now small enough to fit on screen in landscape on a
   Nexus 5.

Fixes #6054
2016-09-27 12:31:00 -07:00
Adam Barth
c7369a40ac Make the floating action button respond to tap (#6095)
Fixes #6053
2016-09-27 10:18:05 -07:00
Adam Barth
0734edbeb0 Dialogs shouldn't scroll their headers or buttons (#6082)
Rather than scrolling the entire contents of the dialog, we should instead
scroll only the part between the title and the button bar.

Also, polish up the padding in the simple dialog demo.

Fixes #6057
2016-09-27 09:20:33 -07:00
Dragoș Tiselice
16305ad511 Fixed expansion panels demo alignment. (#6070)
The former horitzontal alignment in the expansion panels demo in
the Gallery was center instead of left. Fixes #6049.
2016-09-26 13:22:43 -07:00
Ian Hickson
9e673853e5 Turn off AnimationControllers when not in use (#5902)
This requires all AnimationController objects to be given a
TickerProvider, a class that can create the Ticker.

It also provides some nice mixins for people who want to have their
State provide a TickerProvider. And a schedulerTickerProvider for those
cases where you just want to see your battery burn.

Also, we now enforce destruction order for elements.
2016-09-26 10:57:10 -07:00
Matt Perry
c825237a38 Fix improper Input usage in Gallery's Expansion demo. (#6019)
Fixes https://github.com/flutter/flutter/issues/6011
2016-09-26 13:35:43 -04:00
Dragoș Tiselice
ef68f2f03b Added BottomNavigationBar demo. (#6003)
Added a demo of BottomNavigation to the Gallery.
2016-09-23 14:46:30 -07:00
Matt Perry
f0d2f5c58a Micro tweak to Pesto logo. Text fades out a bit sooner. (#5983) 2016-09-21 15:28:13 -04:00
Dragoș Tiselice
7ad5ec40aa Changed Pesto logotype's position. (#5970)
* Changed Pesto logotype's position.

This commit changes Pesto's logotype position so that its curve
aligns with the curve of the image size.

* Added clamping to Pesto logo animation.
2016-09-21 10:58:49 -07:00
Matt Perry
278711d5b1 Add an appbar shadow to Pesto's recipe page. (#5954)
Fixes https://github.com/flutter/flutter/issues/5711
2016-09-20 17:57:09 -04:00
Dragoș Tiselice
f3813202a1 Removed Pesto logo's animation. (#5957)
Removed Pesto logo's triggered animation in order to remove the
observable 'hop' when scrolling. The whole curve is now entirely
scroll dependent. Fixes #5907.
2016-09-20 13:13:30 -07:00
Dragoș Tiselice
eafe1c7a4e Renamed Positioned constructor. (#5927)
Renames stretch constructor to fill for better consistency with
the rest of the framework.
2016-09-19 10:46:06 -07:00
Dragoș Tiselice
51cd8b6799 Added a stretch Positioned constructor. (#5894)
Fixes #5835.
2016-09-16 15:59:01 -07:00
Dragoș Tiselice
84a879e66d Renamed constant. (#5910)
Due to a synchronization issue, a PR was merged with a green build
that was supposed to be rebuilt and to fail. This commit fixes the
issue by renaming the usage of a constant.
2016-09-16 12:24:37 -07:00
Dragoș Tiselice
b1a7720315 Fixed capitalization of toolbar. (#5895)
Fixes #4713.
2016-09-16 11:05:03 -07:00
Matt Perry
f0f99a45d9 Pesto logo now smoothly animates between image and image+text states. (#5890)
Fixes https://github.com/flutter/flutter/issues/5684
2016-09-16 13:31:54 -04:00
Dragoș Tiselice
87fb075fa1 Renamed DropDown to Dropdown. (#5897)
Fixes #3208.
2016-09-15 17:38:41 -07:00
Hans Muller
f4904b1459 Refresh indicator overscroll (#5836)
* Added OverscrollIndicatorEdge et al

* RefreshIndicator only clamps its scrollable edge

* added a test

* Updated the test

* fixed lint-os

* fixed a typo

* Scrollable should restore its viewport dimensions when it reappears

* removed an accidental commit

* updated per review feedback
2016-09-14 10:44:51 -07:00
Dragoș Tiselice
b298bdc8c4 Fixed expansion panels demo text in dark theme. (#5809)
Changed the text styling to make use of the current theme so that
it doesn't break when the user selects the dark theme.
2016-09-09 16:55:55 -07:00
Dragoș Tiselice
cc3df14268 Removed Pesto's drawer. (#5722)
The drawer was confusing without adding much value. It was
especially confusing when wanting to go back to the Gallery on iOS.
Fixes #5713.
2016-09-09 13:19:03 -07:00
Matt Perry
b71d7694ab Prevent Hero transition for AppBar on Pesto recipe page. (#5760)
BUG=https://github.com/flutter/flutter/issues/5351
2016-09-08 16:40:11 -04:00
Phil Quitslund
d2fda677e1 Update to Dart 1.20.0-dev.1.0. (#5689)
* Udpate to Dart `1.20.0-dev.1.0`.

Udpate to Dart `1.20.0-dev.1.0` and corresponding `analyzer` package.

* Added `--no-packages-dir`.

* Revert extension to master.

* Added ignores.

* Review nits.

* More nits.
2016-09-08 13:14:08 -07:00
Hans Muller
afc0550a67 Fix circle antialiasing in the animation demo (#5729) 2016-09-02 16:13:09 -07:00
Dragoș Tiselice
8a20b261d0 Changed Material ease animations to fastOutSlowIn. (#5643)
Fixes #5393.
2016-09-02 09:03:51 -07:00
Hans Muller
d6a6053630 Contacts icon alignment (#5719) 2016-09-01 15:42:23 -07:00
Dragoș Tiselice
8fed9d9e16 Added expansion panels demo to gallery. (#5539) 2016-09-01 15:36:26 -07:00
Hans Muller
f27fa0ece0 Gallery animation demo: lazily compute screen dimensions (#5715) 2016-09-01 14:07:22 -07:00
Dragoș Tiselice
b4fb23ad10 Increased text margin in typography demo. (#5691)
Subheading title was too close to the actual example. This commit
increases the size of its box. Fixes #5682.
2016-08-31 15:15:13 -07:00
Dragoș Tiselice
3964aaad55 Added action to Pesto FAB. (#5687)
The floating action button inside of the Pesto demo now opens up
a snackbar. Fixes #5685.
2016-08-31 14:50:14 -07:00
Adam Barth
e0f6c0db84 Add labels to the slider demos (#5639)
Previously, it was unclear that the middle slider was disabled.

Fixes #5517
2016-08-29 12:17:34 -07:00
Hans Muller
d0e72d616b Prevent looking up inherited widget values from initState() (#5609) 2016-08-26 15:19:46 -07:00