* Add outer try block for obtainKey errors. Add docs.
* change to // from ///, and do specific error handling
* Add return statement after error
* Add test
This converts all remaining "## Sample code" segments into snippets, and fixes
the snippet generator to handle multiple snippets in the same dartdoc block
properly.
I also generated, compiled, and ran each of the existing application samples,
and fixed them up to be more useful and/or just run without errors.
This PR fixes these problems with examples:
1. Switching tabs in a snippet now works if there is more than one snippet in
a single dartdoc block.
2. Generation of snippet code now works if there is more than one snippet.
3. Contrast of text and links in the code sample block has been improved to
recommended levels.
4. Added five new snippet templates, including a "freeform" template to make
it possible to show examples that need to change the app instantiation.
5. Fixed several examples to run properly, a couple by adding the "Scaffold"
widget to the template, a couple by just fixing their code.
6. Fixed visual look of some of the samples when they run by placing many
samples inside of a Scaffold.
7. In order to make it easier to run locally, changed the sample analyzer to
remove the contents of the supplied temp directory before running, since
having files that hang around is problematic (only a problem when running
locally with the `--temp` argument).
8. Added a `SampleCheckerException` class, and handle sample checking
exceptions more gracefully.
9. Deprecated the old "## Sample code" designation, and added enforcement for
the deprecation.
10. Removed unnecessary `new` from templates (although they never appeared in
the samples thanks to dartfmt, but still).
Fixes#26398Fixes#27411
This makes Android raw key event handling use the "character" data coming from the engine properly, and gets rid of the "toLowerCase" hack that I was using to normalize logical key events, in favor of using the new "plainCodePoint" that has the unmodified code point (the code point as if no modifier keys were pressed).
* Update stepper.dart
Added 'physics' prop which allows the developer to assign the Stepper's scroll view's 'ScrollPhysics' which can solve with unwanted scrolling behaviour if the parent is also a scroll view. Defaults to 'AlwaysScrollableScrollPhysics' if null.
* Update stepper.dart
Removed unnecessary import and defaulting to 'AlwaysScrollableScrollPhysics' if physics prop is null.
* Update stepper.dart
Ran through format to remove unwanted whitespace which Analysis isn't happy about.
* Update stepper.dart
Tried reformatting again.
* Update stepper.dart
Tried reformatting again.
* Update stepper.dart
Formatting again why do you hate me github editor.
* Update stepper.dart
* Update stepper.dart
if this format doesn't work i'll cry
* Update stepper_test.dart
Added Stepper scroll tests. One that fails to find Text after Stepper if physics left as null and one that succeeds if physics set to `ClampingScrollPhysics()`
* Update stepper_test.dart
Added const constructors
* Update stepper_test.dart
trying to get rid of whitespace again
* Update stepper_test.dart
* Update stepper_test.dart
why whitespace why
* Update stepper_test.dart
* Update stepper_test.dart
* Update stepper_test.dart
* Update stepper_test.dart
Swapped to `findsNothing` because I'm an idiot.
* Update stepper_test.dart
* Update stepper.dart
* Fix for #26261. Changes CupertinoTextField's cursorColor to read from CupertinoTheme instead of prior default of activeBlue. CursorColor will still default to activeBlue for light theme and activeOrange for dark theme if a primary color has not been specified for the CupertinoTheme.
* Reverted unnecessary changes in XCode file.
* Updated text_field.dart per suggestions from @gspencergoog
* Updated comments for cursorColor to reflect appropriate hyperlinks per @Hixie
* Simplified cursorColor assignment per @xster
* Added test in cupertino/text_field_test.dart to check for correct cursorColor based on CupertinoTheme per @Hixie & @xster.
* Provide a simmplified API for skipping over slider thumb, overlay, and tick mark painting
* doc fixes
* comments
* comments
* comments
* comments
* comments
* analyzer
* comments
In Dart 2, it is a compile-time error if a superinitializer
appears in an initializer list at any other position than at the end so this
rule is made redundant by the Dart analyzer's basic checks and is no longer
necessary.
This adds support for logical and physical key information inside of RawKeyEvent. This allows developers to differentiate keys in a platform-agnostic way. They are able to tell the physical location of a key (PhysicalKeyboardKey) and a logical meaning of the key (LogicalKeyboardKey), as well as get notified of the character generated by the keypress. All of which is useful for handling keyboard shortcuts.
This PR builds on the previous PR (#27620) which generated the key code mappings and definitions.