Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

OrangePants-R/slide_puzzle

 
 

Repository files navigation

Photo Booth Header

coveragestyle: very good analysisLicense: MIT

A slide puzzle built forFlutter Challenge.

Built byVery Good Ventures in partnership with Google.

Created usingVery Good CLI.


Getting Started 🚀

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

$ flutter run -d chrome

Running Tests 🧪

To run all unit and widget tests use the following command:

$ fluttertest --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can uselcov.

# Generate Coverage Report$ genhtml coverage/lcov.info -o coverage/# Open Coverage Report$ open coverage/index.html

Working with Translations 🌐

This project relies onflutter_localizations and follows theofficial internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open theapp_en.arb file atlib/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:very_good_slide_puzzle/l10n/l10n.dart';@overrideWidgetbuild(BuildContext context) {final l10n= context.l10n;returnText(l10n.helloWorld);}

Adding Supported Locales

Update theCFBundleLocalizations array in theInfo.plist atios/Runner/Info.plist to include the new locale.

    ...    <key>CFBundleLocalizations</key><array><string>en</string><string>es</string></array>    ...

Adding Translations

  1. For each supported locale, add a new ARB file inlib/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"    }}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart98.5%
  • HTML0.9%
  • Ruby0.3%
  • Shell0.2%
  • Swift0.1%
  • Kotlin0.0%

[8]ページ先頭

©2009-2025 Movatter.jp