Commit Graph

564 Commits

Author SHA1 Message Date
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Dan Field
24f39d40a4 Revert "Revert "Add many more global analyses. (#47875)" (#48080)" (#48081)
This reverts commit 04ea3183ce.
2020-01-02 11:47:28 -08:00
Francisco Magdaleno
04ea3183ce
Revert "Add many more global analyses. (#47875)" (#48080)
This reverts commit e768c92fbc.
2020-01-02 09:25:59 -08:00
Ian Hickson
e768c92fbc
Add many more global analyses. (#47875)
* Update packages.

* Add many more global analyses.

* Catch trailing spaces and trailing newlines in all text files.
  Before we were only checking newly added files, but that means we
  missed some.

* Port the trailing spaces logic to work on Windows too.

* Correct all the files with trailing spaces and newlines.

* Refactor some of the dev/bots logic into a utils.dart library.
  Notably, the "exit" and "print" shims for testing are now usable
  from test.dart, analyze.dart, and run_command.dart.

* Add an "exitWithError" function that prints the red lines and
  then exits. This is the preferred way to exit from test.dart,
  analyze.dart, and run_command.dart.

* More consistency in the output of analyze.dart.

* Refactor analyze.dart to use the _allFiles file enumerating logic
  more widely.

* Add some double-checking logic to the _allFiles logic to catch
  cases where changes to that logic end up catching fewer files
  than expected (helps prevent future false positives).

* Add a check to prevent new binary files from being added to
  the repository. Grandfather in the binaries that we've already
  added.

* Update all the dependencies (needed because we now import crypto in
  dev/bots/analyze.dart).
2019-12-30 17:12:19 -08:00
Alexandre Ardhuin
ec0842e0d3
implicit-casts:false in examples (#45805) 2019-12-05 21:33:07 +01:00
Kate Lovett
2a5e528a18 Fixing SliverOverlapAbsorber & SliverOverlapInjector child property (#44283) 2019-12-02 17:08:02 -08:00
Ian Hickson
a78fb87dfe
Relicense Shrine demo to match rest of repository (#45718)
* Relicense Shrine demo to match rest of repository

The Shrine demo was Apache-licensed. The code was mostly
Google-written, with contributions from:

 - Michelle Dudley (@michdud)

 - Abhijeeth Padarthi <rkinabhi@gmail.com> (@rkinabhi)

 - @a14n

I contacted all three, and they confirmed their approval for this
change, as described below.

Abhijeeth Padarthi said by e-mail on Thu, Nov 21, 2019 at 5:48 PM:

> hi Ian,
>
> sure :)
>
> let me know if I need to do anything on my end..

Michelle Dudley wrote by e-mail on Sun, Nov 24, 2019 at 2:07 PM:

> Hi Ian,
>
> That would be ok with me.
>
> Thanks,
>
> Michelle

@a14n said on Discord's Flutter server in the #hackers channel at 10:44PM on Thursday, November 21, 2019:

> @Hixie no problem I agree with this relicensing

* Remove shrine loophole from license checker.
2019-11-27 16:25:56 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* 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
2019-11-27 15:04:02 -08:00
Greg Spencer
245d1b51ce
Add macOS to TargetPlatform (#43457)
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.
2019-11-26 18:32:34 -08:00
Alexandre Ardhuin
fcb40a05bb
make some BuildContext methods generics (#44189)
* make BuildContext.{ancestorStateOfType,ancestorRenderObjectOfType,rootAncestorStateOfType} generic

* make BuildContext.inheritFromWidgetOfExactType generic

* make BuildContext.ancestorInheritedElementForWidgetOfExactType generic

* make BuildContext.ancestorWidgetOfExactType generic

* fix snippet

* bump scoped_model on temp version

* update names

* Revert "bump scoped_model on temp version"

This reverts commit d1fcbba028cdb07f44738d1652391692d1ea5ec0.

* address review comments

* fix ci

* address review comments

* repeat the deprecation notice

* fix uppercase

* use of recommanded deprecation syntax

* address review comment
2019-11-22 17:35:20 +01:00
Justin McCandless
299fbc422f
Fix typo (#45125)
Typo in a title in a gallery demo
2019-11-20 17:05:01 -08:00
Todd Volkert
2c7af1e24e
Revert "[Gallery] Add Material Study app Rally as an example app (#44907)" (#45279)
This reverts commit 399aebc4b7.

It contained Apache 2.0 licensed files, which aren't allowed in flutter/flutter
2019-11-20 12:18:44 -08:00
Todd Volkert
ce8e2bb7cf
Revert "[Material] Update the Slider and RangeSlider to the latest Material spec (#44351)" (#45268)
This reverts commit 421bf64703.

Was causing severe breakages in Google.
2019-11-20 10:42:23 -08:00
Anthony
421bf64703
[Material] Update the Slider and RangeSlider to the latest Material spec (#44351)
Update the Slider and RangeSlider to the latest Material spec. This introduces an updated track, updated thumbs, updated tick marks, and a new value indicator shape. The old paddle value indicator shape is also updated so that text scaling works consistently.
2019-11-20 18:18:40 +01:00
Per Classon
399aebc4b7
[Gallery] Add Material Study app Rally as an example app (#44907)
Add Material Study app Rally as an example app
2019-11-19 12:12:56 +01:00
Ian Hickson
1ce4a4f36f
Make sure all our .dart files have license headers (#44467) 2019-11-08 16:53:21 -08:00
LongCatIsLooong
62db22d152
CupertinoDynamicColor improvements (#44317) 2019-11-07 13:14:08 -08:00
Shi-Hao Hong
7d03371610
Revert "[Gallery] Add Material Study app Rally as an example app (#42236)" (#44194)
This reverts commit a214b4628e.
2019-11-05 08:57:25 -08:00
Per Classon
a214b4628e
[Gallery] Add Material Study app Rally as an example app (#42236)
* Add Material Study app Rally to examples
2019-11-05 17:27:40 +01:00
LongCatIsLooong
bbb2a0f837
Update cupertino demos in gallery (#43841) 2019-11-04 16:31:52 -08:00
Greg Spencer
560873af92
Wire up canRequestFocus and skipTraversal in FocusScopeNode (#43013)
This adds a canRequestFocus and skipTraversal argument to FocusScope and FocusScopeNode, so that a scope can prevent being traversed.

This allows a fix for a problem in the gallery where the focus while traversing the list of items would sometimes appear to disappear, since it would be focusing things that were in the backdrop that were part of the tree, but were not visible.

Related Issues
Fixes #42955
2019-10-18 12:31:15 -07:00
Alexandre Ardhuin
c3ddfb924f
add missing trailing commas (in examples/) (#40701) 2019-09-18 20:48:07 +02:00
Alexandre Ardhuin
58bd39cd23
Extract some onPress methods (#40678)
* Extract some onPress methods

* address review comments
2019-09-17 21:00:16 +02:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Shouichi Kamiya
77f71ef48f Center action icons of swipe to dismiss example (#39670) 2019-09-09 18:32:27 -07:00
Konstantin Scheglov
3118ae19ff
Fix new prefer_const_constructors after analyzer fix. (#39917) 2019-09-05 19:59:24 -07:00
lisa-liao
d883337669 [Shrine] Adding outlines to text fields (#38895)
* Adding outlines to text fields
2019-08-23 15:52:28 -04:00
Darren Austin
9dce19e96f
Replace ButtonBar.bar method with ButtonBarTheme (#37544)
* Added new ButtonBarTheme to replace the deprecated ButtonTheme.bar method.

* Responding to PR feedback.

* [Material] Create material Banner component (#36880)

This PR creates a new material widget for the Banner component. This includes a theme as well. This widget can be dropped into any application, ideally at the top of a listview or scrollview.

(cherry picked from commit 35b6d668e1)

Removed the use of ButtonTheme.bar in the Banner implementation.

* Updated documentation from PR review comments.
2019-08-19 17:35:44 -07:00
rami-a
232dce966b
Analyzer fix that wasn't caught in the PR originally (#38348) 2019-08-12 17:55:27 -04:00
rami-a
8fe424f9fe
[Material] Create demo for material banner (#37631) 2019-08-09 14:26:04 -04:00
Alexandre Ardhuin
758009ba70
more ui-as-code (#35393)
* more ui-as-code

* address review comments
2019-07-02 21:11:56 +02:00
Anthony
8418daaeb1
Wrap expansion panel slider in padded container (#35129)
Fix the Expansion Panel flutter_gallery demo by wrapping the Slider in a padded Container so that the value indicator does not get clipped.
2019-06-28 15:11:41 -04:00
Alexandre Ardhuin
919dcf53f3
enable lints prefer_spread_collections and prefer_inlined_adds (#35189) 2019-06-27 21:23:16 +02:00
Alexandre Ardhuin
fecf99ff1e
enable lint avoid_bool_literals_in_conditional_expressions (#35055) 2019-06-25 17:40:05 +02:00
Anthony
04bd87794d
[Material] Update slider gallery demo, including range slider (#34597)
Update the flutter_gallery Slider demo by aligning the text field in the first slider, adding range slider examples (including custom range thumbs), and separating single slider and range slider examples with tabs.
2019-06-24 17:10:11 -04:00
LongCatIsLooong
d759197d1f
Add scrollbars to Gallery (#33634) 2019-06-06 10:54:28 -07:00
Chris Bracken
4d9923201b
Correct typos (#33322)
Corects a bnuch of typeos throuhgout teh Fluter codebsae.

Made use of the `misspell` tool:
https://github.com/client9/misspell
2019-05-24 19:12:45 -07:00
Darren Austin
5ba0461b6d
Fixed several issues with the confirmDismiss handling on the LeaveBehindItem demo. (#33080) 2019-05-20 18:10:24 -07:00
Sam Rawlins
c2a93bd545 Fix missing return statements on function literals (#33058) 2019-05-20 12:51:57 -07:00
Darren Austin
3d93f24c05
Tapping a modal bottom sheet should not dismiss it by default (#32528)
Removed the GestureDetector from the modal bottom sheet that dismissed it on tap and updated several tests to accommodate this change.
2019-05-15 15:50:39 -07:00
Phil Quitslund
d96c1c88b7
make immutables const (#32340)
* make immutables const
2019-05-09 05:47:01 -07:00
MH Johnson
a40e5c90f0
[Material] selected/unselected label styles + icon themes on BottomNavigationBar (#31018)
* add text style params

* add icon theme params

* Added tests
2019-05-02 18:20:16 -04:00
Dan Field
fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
LongCatIsLooong
7d19f97d03
Fix refresh control in the gallery demo, update comments (#30129)
- Fixed the bug where CupertinoRefreshControl doesn't work in the gallery demo on Android.
- Updated documentation on CupertinoRefreshControl
- Added comments to the gallery demo
- Added concrete examples to ScrollPhysics
2019-04-25 20:49:47 -07:00
xster
8cfc92465d
CupertinoPicker fidelity revision (#31464) 2019-04-25 00:03:04 -07:00
rami-a
d4e4726ac2
Update SnackBar to allow for support of the new style from Material spec (#31275)
This PR introduces a number of changes and improvements to snack bars. This includes the ability to specify:

floating style of snack bars that adhere to the updated Material spec
elevation and shape on the SnackBar itself instead of relying on fixed values
a snackBarTheme as part of ThemeData which allows you to customize all of the above on an app-wide level.
This PR is includes the changes from #21484 as well as additional fixes and modifications. Thanks to @NikoYuwono for providing these changes and getting this off the ground!
2019-04-24 17:22:30 -04:00
Anthony
0572f158fb
[Material] Adaptive Slider constructor (#30572)
Adds an adaptive constructor for the Material Slider. An adaptive widget is one that renders itself as Material on Android, and Cupertino on iOS. This work is based off of a similar feature on Switches: bbb080b#diff-fe2bb980c6207699cbf45538fe927afa.

The motivation for this change is that we should provide adaptive constructors for as many widgets as necessary in the Material library. In Material, it is suggested that the slider is an iOS-style slider.
2019-04-24 16:26:22 -04:00
Justin McCandless
ec7f3f0956
2d transforms UX improvements (#30932)
Small usability fixes for pan and zoom demo. Title and instruction dialog.
2019-04-15 15:11:26 -07:00
rami-a
a12c5618de
Prevent vertical scroll in shrine by ensuring card size fits the screen (#30455) 2019-04-08 11:22:19 -04:00
Taym Haddadi
3067825946 Add confirmDismiss example to flutter_gallery (#30497) 2019-04-05 16:02:55 -07:00