1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +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:
Eric Windmill
2025-08-14 12:26:24 -07:00
committed by GitHub
parent 0aa5415d5e
commit 2999d738b8
410 changed files with 28166 additions and 27661 deletions

View File

@@ -39,7 +39,7 @@ class Event implements Comparable<Event> {
);
}
updateWith(Event e) {
void updateWith(Event e) {
title = e.title;
color = e.color;
icon = e.icon;

View File

@@ -55,9 +55,8 @@ class _EventDetailState extends State<EventDetail> {
Navigator.of(context)
.push(
CupertinoPageRoute<(IconData, ColorOptions)?>(
builder:
(_) =>
SymbolEditor(event.icon, event.color),
builder: (_) =>
SymbolEditor(event.icon, event.color),
),
)
.then(((IconData, ColorOptions)? data) {

View File

@@ -41,22 +41,21 @@ class _EventEditorState extends State<EventEditor> {
//
// Is this maybe the issue here?
// https://github.com/flutter/flutter/issues/91715
leading:
isNew
? CupertinoButton(
padding: EdgeInsets.zero,
child: const Text('Cancel'),
onPressed: () => Navigator.pop(context, null),
)
: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: () {
Navigator.pop(context, event);
},
child: const Row(
children: [Icon(CupertinoIcons.back), Text('Date Planner')],
),
leading: isNew
? CupertinoButton(
padding: EdgeInsets.zero,
child: const Text('Cancel'),
onPressed: () => Navigator.pop(context, null),
)
: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: () {
Navigator.pop(context, event);
},
child: const Row(
children: [Icon(CupertinoIcons.back), Text('Date Planner')],
),
),
trailing: CupertinoButton(
padding: EdgeInsets.zero,
child: Text(isNew ? 'Add' : (isEditing ? 'Done' : 'Edit')),

View File

@@ -36,11 +36,10 @@ class EventList extends StatelessWidget {
// Blocked on https://github.com/flutter/flutter/issues/42560.
Event? newEvent = await Navigator.of(context).push(
CupertinoPageRoute<Event>(
builder:
(_) => EventEditor(
event: Event(title: 'New event'),
isNew: true,
),
builder: (_) => EventEditor(
event: Event(title: 'New event'),
isNew: true,
),
),
);
@@ -69,17 +68,15 @@ class EventList extends StatelessWidget {
EventRow(
event: e,
onTap: () async {
Event? updatedEvent = await Navigator.of(
context,
).push(
CupertinoPageRoute<Event>(
builder:
(_) => EventEditor(
Event? updatedEvent = await Navigator.of(context)
.push(
CupertinoPageRoute<Event>(
builder: (_) => EventEditor(
event: e.copy(),
isNew: false,
),
),
);
),
);
if (updatedEvent == null) {
// The editor passes back null when it deleted
// the element.

View File

@@ -31,9 +31,9 @@ class EventRow extends StatelessWidget {
event.isComplete
? const Icon(CupertinoIcons.check_mark)
: Text(
'${event.remainingTaskCount}',
style: const TextStyle(color: CupertinoColors.systemGrey),
),
'${event.remainingTaskCount}',
style: const TextStyle(color: CupertinoColors.systemGrey),
),
const CupertinoListTileChevron(),
],
),

View File

@@ -39,11 +39,8 @@ class _SymbolEditorState extends State<SymbolEditor> {
CupertinoButton(
padding: EdgeInsets.zero,
child: const Text('Done'),
onPressed:
() => Navigator.pop(context, (
_currentIcon,
_currentColor,
)),
onPressed: () =>
Navigator.pop(context, (_currentIcon, _currentColor)),
),
],
),

View File

@@ -29,14 +29,13 @@ class _TaskRowState extends State<TaskRow> {
return Row(
children: [
CupertinoButton(
onPressed:
widget.isEditing
? () {
setState(() {
widget.task.isCompleted = !widget.task.isCompleted;
});
}
: null,
onPressed: widget.isEditing
? () {
setState(() {
widget.task.isCompleted = !widget.task.isCompleted;
});
}
: null,
child: Icon(
widget.task.isCompleted
? CupertinoIcons.checkmark_circle_fill
@@ -45,15 +44,14 @@ class _TaskRowState extends State<TaskRow> {
),
),
Expanded(
child:
widget.isEditing
? CupertinoTextField(
decoration: null,
padding: EdgeInsets.zero,
controller: _taskText,
onChanged: (value) => widget.task.text = value,
)
: Text(widget.task.text),
child: widget.isEditing
? CupertinoTextField(
decoration: null,
padding: EdgeInsets.zero,
controller: _taskText,
onChanged: (value) => widget.task.text = value,
)
: Text(widget.task.text),
),
],
);

View File

@@ -2,9 +2,10 @@ name: date_planner
description: "An iOS-style date planner."
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.1.0
resolution: workspace
environment:
sdk: ^3.7.0
sdk: ^3.9.0-0
dependencies:
flutter:
@@ -15,4 +16,6 @@ dependencies:
uuid:
dev_dependencies:
flutter_lints: ^5.0.0
analysis_defaults:
path: ../analysis_defaults
flutter_lints: ^6.0.0