mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 22:38:42 +00:00
Dart 3.9 / Flutter 3.35 [first LLM release] (#2714)
I got carried away with Gemini and basically rewrote CI and the release process for the new LLM reality. This work was largely completed by Gemini. - Bump all SDK versions to the current beta (3.9.0-0) - Run `flutter channel beta` - Wrote `ci_script.dart` to replace the bash scripts - Converted repository to pub workspace #2499 - Added llm.md and release.md - Added redirect for deprecated Samples Index ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I have added sample code updates to the [changelog]. - [x] I updated/added relevant documentation (doc comments with `///`).
This commit is contained in:
@@ -89,7 +89,9 @@ class _BasicTextFieldState extends State<BasicTextField> {
|
||||
TextSelection selection,
|
||||
SelectionChangedCause? cause,
|
||||
) {
|
||||
final bool willShowSelectionHandles = _shouldShowSelectionHandles(cause);
|
||||
final bool willShowSelectionHandles = _shouldShowSelectionHandles(
|
||||
cause,
|
||||
);
|
||||
if (willShowSelectionHandles != _showSelectionHandles) {
|
||||
setState(() {
|
||||
_showSelectionHandles = willShowSelectionHandles;
|
||||
@@ -98,16 +100,15 @@ class _BasicTextFieldState extends State<BasicTextField> {
|
||||
}
|
||||
|
||||
void _onDragUpdate(DragUpdateDetails details) {
|
||||
final Offset startOffset =
|
||||
_renderEditable.maxLines == 1
|
||||
? Offset(
|
||||
_renderEditable.offset.pixels - _dragStartViewportOffset,
|
||||
0.0,
|
||||
)
|
||||
: Offset(
|
||||
0.0,
|
||||
_renderEditable.offset.pixels - _dragStartViewportOffset,
|
||||
);
|
||||
final Offset startOffset = _renderEditable.maxLines == 1
|
||||
? Offset(
|
||||
_renderEditable.offset.pixels - _dragStartViewportOffset,
|
||||
0.0,
|
||||
)
|
||||
: Offset(
|
||||
0.0,
|
||||
_renderEditable.offset.pixels - _dragStartViewportOffset,
|
||||
);
|
||||
|
||||
_renderEditable.selectPositionAt(
|
||||
from: _startDetails.globalPosition - startOffset,
|
||||
@@ -134,7 +135,8 @@ class _BasicTextFieldState extends State<BasicTextField> {
|
||||
_textSelectionControls = cupertinoTextSelectionHandleControls;
|
||||
case TargetPlatform.macOS:
|
||||
// ignore: deprecated_member_use
|
||||
_textSelectionControls = cupertinoDesktopTextSelectionHandleControls;
|
||||
_textSelectionControls =
|
||||
cupertinoDesktopTextSelectionHandleControls;
|
||||
case TargetPlatform.android:
|
||||
case TargetPlatform.fuchsia:
|
||||
// ignore: deprecated_member_use
|
||||
@@ -151,7 +153,8 @@ class _BasicTextFieldState extends State<BasicTextField> {
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onPanStart: (dragStartDetails) => _onDragStart(dragStartDetails),
|
||||
onPanUpdate: (dragUpdateDetails) => _onDragUpdate(dragUpdateDetails),
|
||||
onPanUpdate: (dragUpdateDetails) =>
|
||||
_onDragUpdate(dragUpdateDetails),
|
||||
onSecondaryTapDown: (secondaryTapDownDetails) {
|
||||
_renderEditable.selectWordsInRange(
|
||||
from: secondaryTapDownDetails.globalPosition,
|
||||
@@ -190,12 +193,12 @@ class _BasicTextFieldState extends State<BasicTextField> {
|
||||
);
|
||||
}
|
||||
},
|
||||
onLongPressEnd:
|
||||
(longPressEndDetails) => _textInputClient!.showToolbar(),
|
||||
onHorizontalDragStart:
|
||||
(dragStartDetails) => _onDragStart(dragStartDetails),
|
||||
onHorizontalDragUpdate:
|
||||
(dragUpdateDetails) => _onDragUpdate(dragUpdateDetails),
|
||||
onLongPressEnd: (longPressEndDetails) =>
|
||||
_textInputClient!.showToolbar(),
|
||||
onHorizontalDragStart: (dragStartDetails) =>
|
||||
_onDragStart(dragStartDetails),
|
||||
onHorizontalDragUpdate: (dragUpdateDetails) =>
|
||||
_onDragUpdate(dragUpdateDetails),
|
||||
child: SizedBox(
|
||||
height: double.infinity,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
|
||||
Reference in New Issue
Block a user