Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions pkgs/dart_services/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,36 @@ publish_to: none
resolution: workspace

environment:
sdk: ^3.8.0
sdk: ^3.10.0

dependencies:
analysis_server_lib: ^0.2.5
analyzer: ^8.4.1
args: ^2.7.0
bazel_worker: ^1.1.3
bazel_worker: ^1.1.4
dartpad_shared:
path: ../dartpad_shared
encrypt: ^5.0.3
google_cloud_ai_generativelanguage_v1beta: ^0.2.0
google_cloud_rpc: ^0.2.0
http: ^1.3.0
json_annotation: ^4.9.0
logging: ^1.2.0
meta: ^1.15.0
path: ^1.9.0
http: ^1.6.0
logging: ^1.3.0
meta: ^1.17.0
path: ^1.9.1
resp_client: ^1.2.0
shelf: ^1.4.2
shelf_gzip: ^4.1.0
shelf_router: ^1.1.4
shelf_static: ^1.1.0
shelf_static: ^1.1.3
shelf_web_socket: ^3.0.0
web_socket_channel: ^3.0.0
web_socket_channel: ^3.0.3
yaml: ^3.1.3

dev_dependencies:
collection: ^1.19.0
dart_flutter_team_lints: ^3.2.1
collection: ^1.19.1
dart_flutter_team_lints: ^3.5.2
grinder: ^0.9.5
json_serializable: ^6.9.5
package_config: ^2.2.0
synchronized: ^3.3.1
test: ^1.25.9
test_descriptor: ^2.0.1
synchronized: ^3.4.0
test: ^1.26.3
test_descriptor: ^2.0.2
6 changes: 2 additions & 4 deletions pkgs/dartpad_shared/lib/services.dart
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class WebsocketServicesClient implements DartPadService {
}

void _init() {
socket.events.listen((e) async {
socket.events.listen((e) {
switch (e) {
case TextDataReceived(text: final text):
_dispatch(JsonRpcResponse.fromJson(text));
Expand All @@ -224,9 +224,7 @@ class WebsocketServicesClient implements DartPadService {
break;
case CloseReceived(code: final _, reason: final _):
// Notify that the server connection has closed.
if (onClosed != null) {
onClosed!(this);
}
onClosed?.call(this);
break;
}
});
Expand Down
14 changes: 7 additions & 7 deletions pkgs/dartpad_shared/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ publish_to: none
resolution: workspace

environment:
sdk: ^3.8.0
sdk: ^3.10.0

dependencies:
collection: ^1.19.1
http: ^1.3.0
http: ^1.6.0
json_annotation: ^4.9.0
meta: ^1.15.0
web_socket: ^1.0.0
meta: ^1.17.0
web_socket: ^1.0.1

dev_dependencies:
build_runner: ^2.10.3
dart_flutter_team_lints: ^3.2.1
json_serializable: ^6.9.5
build_runner: ^2.10.4
dart_flutter_team_lints: ^3.5.2
json_serializable: ^6.11.2
4 changes: 2 additions & 2 deletions pkgs/dartpad_ui/lib/app/genai_dialogs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Future<void> openCodeGenerationDialog(
'Generate a Flutter login screen with email and password fields, validation, and a submit button',
'tic-tac-toe':
'Generate a Flutter tic-tac-toe game with two players, win detection, and a reset button',
if (lastPrompt != null) 'your last prompt': lastPrompt,
'your last prompt': ?lastPrompt,
},
dartPromptButtons: {
'hello, world': 'Generate a Dart hello world program',
'fibonacci':
'Generate a Dart program that prints the first 10 numbers in the Fibonacci sequence',
'factorial': 'Generate a Dart program that prints the factorial of 5',
if (lastPrompt != null) 'your last prompt': lastPrompt,
'your last prompt': ?lastPrompt,
},
promptTextController: appModel.genAiManager.newCodePromptController,
attachments: appModel.genAiManager.newCodeAttachments,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/dartpad_ui/lib/app/genai_editing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _EditorWithButtonsState extends State<EditorWithButtons> {
widget.appModel.genAiManager.resetState();
}

void _handleUpdateCodePrompt(BuildContext context) async {
void _handleUpdateCodePrompt(BuildContext context) {
widget.appModel.sourceCodeController.textNoScroll =
widget.appModel.genAiManager.preGenAiSourceCode.value;
widget.appServices.performCompileAndReloadOrRun();
Expand Down
4 changes: 2 additions & 2 deletions pkgs/dartpad_ui/lib/app/simple_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,9 @@ class SectionWidget extends StatelessWidget {
children: [
Row(
children: [
if (title != null) Text(title!, style: subtleText),
if (title case final title?) Text(title, style: subtleText),
const Expanded(child: SizedBox(width: defaultSpacing)),
if (actions != null) actions!,
?actions,
],
),
const Divider(),
Expand Down
2 changes: 1 addition & 1 deletion pkgs/dartpad_ui/lib/primitives/samples.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions pkgs/dartpad_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ publish_to: none
resolution: workspace

environment:
sdk: ^3.8.0
sdk: ^3.10.0

dependencies:
collection: ^1.19.0
collection: ^1.19.1
dartpad_shared:
path: ../dartpad_shared
flutter:
sdk: flutter
flutter_markdown: ^0.7.2
flutter_markdown: ^0.7.7+1
flutter_web_plugins:
sdk: flutter
go_router: ^17.0.0
google_fonts: ^6.3.0
http: ^1.3.0
image_picker: ^1.1.2
google_fonts: ^6.3.2
http: ^1.6.0
image_picker: ^1.2.1
json_annotation: ^4.9.0
mime: ^2.0.0
pointer_interceptor: ^0.10.1
pretty_diff_text: ^2.0.0
provider: ^6.1.2
pointer_interceptor: ^0.10.1+2
pretty_diff_text: ^2.1.0
provider: ^6.1.5+1
split_view: ^3.2.1
url_launcher: ^6.3.0
url_launcher: ^6.3.2
vtable: ^0.4.0
web: ^1.1.0
web_socket: ^1.0.0
web: ^1.1.1
web_socket: ^1.0.1

dev_dependencies:
dart_services:
Expand All @@ -43,7 +43,7 @@ dev_dependencies:
sdk: flutter
integration_test:
sdk: flutter
test: ^1.25.7
test: ^1.26.3

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion pkgs/samples/lib/brick_breaker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class BrickBreaker extends FlameGame
double get height => size.y;

@override
FutureOr<void> onLoad() async {
void onLoad() {
super.onLoad();
camera.viewfinder.anchor = Anchor.topLeft;
world.add(PlayArea());
Expand Down
12 changes: 6 additions & 6 deletions pkgs/samples/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ publish_to: none
resolution: workspace

environment:
sdk: ^3.8.0
sdk: ^3.10.0

dependencies:
flame: ^1.33.0
flame: ^1.34.0
flutter:
sdk: flutter
flutter_markdown: ^0.7.7
google_generative_ai: ^0.4.6
flutter_markdown: ^0.7.7+1
google_generative_ai: ^0.4.7
url_launcher: ^6.3.2

dev_dependencies:
args: ^2.5.0
args: ^2.7.0
flutter_lints: ^6.0.0
path: ^1.9.0
path: ^1.9.1

flutter:
uses-material-design: true
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ workspace:
- pkgs/samples

environment:
sdk: ^3.8.0
sdk: ^3.10.0