Skip to content

Commit

Permalink
Fix asset paths for gemini branch (dart-lang#3176)
Browse files Browse the repository at this point in the history
* Fix gemini asset paths

This adjusts the asset configuration to make sure the Gemini logo
loads when deployed to Firebase Hosting.

* Use absolute path for Codemirror

* format

* revert path changes to index.html
  • Loading branch information
johnpryan authored and malloc-error committed Mar 5, 2025
1 parent a2bbba8 commit eb24617
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkgs/dartpad_ui/lib/console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class _ConsoleWidgetState extends State<ConsoleWidget> {
if (genAiEnabled && appModel.consoleShowingError)
MiniIconButton(
icon: Image.asset(
'gemini_sparkle_192.png',
'assets/gemini_sparkle_192.png',
width: 16,
height: 16,
),
Expand Down
6 changes: 5 additions & 1 deletion pkgs/dartpad_ui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,11 @@ class GeminiMenu extends StatelessWidget {

@override
Widget build(BuildContext context) {
final image = Image.asset('gemini_sparkle_192.png', width: 18, height: 18);
final image = Image.asset(
'assets/gemini_sparkle_192.png',
width: 24,
height: 24,
);

return MenuAnchor(
builder: (context, MenuController controller, Widget? child) {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/dartpad_ui/lib/problems.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ProblemWidget extends StatelessWidget {
),
tooltip: 'Suggest fix',
icon: Image.asset(
'gemini_sparkle_192.png',
'assets/gemini_sparkle_192.png',
width: 16,
height: 16,
),
Expand Down

0 comments on commit eb24617

Please sign in to comment.