Skip to content

Game powered by Gemini, Flutter and Flame. Presented at Google Cloud Next 2024.

Notifications You must be signed in to change notification settings

VGVentures/digital_escape_room

Repository files navigation

Digital Escape Room

style: very good analysis License: MIT

Generated by the Very Good CLI 🤖

A Very Good Project created by Very Good CLI.


Getting Started 🚀

Getting a Google AI Studio API key

In order to run the project and use the power of Gemini, you must get first an API key from Google AI Studio.

Running the project

To run the project either use the launch configuration in VSCode/Android Studio or use the following commands:

$ flutter run --dart-define GOOGLE_GENERATIVE_AI_API_KEY=${input:google-studio-api-key}

*Digital Escape Room only works on Web.


Working with Translations 🌐

This project relies on flutter_localizations and follows the official internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}
  1. Then add a new key/value and description
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World Text"
    }
}
  1. Use the new string
import 'package:digital_escape_room/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Translations

  1. For each supported locale, add a new ARB file in lib/l10n/arb.
├── l10n
│   ├── arb
│   │   ├── app_en.arb
│   │   └── app_es.arb
  1. Add the translated strings to each .arb file:

app_en.arb

{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}

app_es.arb

{
    "@@locale": "es",
    "counterAppBarTitle": "Contador",
    "@counterAppBarTitle": {
        "description": "Texto mostrado en la AppBar de la página del contador"
    }
}

Generating Translations

To use the latest translations changes, you will need to generate them:

  1. Generate localizations for the current project:
flutter gen-l10n --arb-dir="lib/l10n/arb"

Alternatively, run flutter run and code generation will take place automatically.

🤝 Credits

The assets used to build this game were purchased from https://limezu.itch.io/.

Thank you so much for creating the Modern Office and Modern Interiors assets!

If you fork this project, please consider buying the asset pack here: https://limezu.itch.io/.

About

Game powered by Gemini, Flutter and Flame. Presented at Google Cloud Next 2024.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published