GitXplorerGitXplorer
f

super_dash

public
340 stars
129 forks
8 issues

Commits

List of commits on branch main.
Verified
38b7a9a819d69fe8d59d4a0cea744d6ca353616f

fix: Fixing dependencies for newer flutter (#199)

eerickzanardo committed a year ago
Verified
6160adf5f226547924a1c9468833b322ce826380

Update README.md launch configuration filenames (#194)

committed a year ago
Verified
f9f9082f4b374188f043d0da1d20f11957e6b1ac

fix(ios): fix ios native splash image (#178)

cchyiiiiiiiiiiii committed a year ago
Verified
f3562d60167f597a21d6fd503579631b51b21aae

Add license (#191)

ddomesticmouse committed a year ago
Verified
d5991328a1675ea24ce4033127de6e39e2a6c9b4

feat: smoother camera movement (#185)

eerickzanardo committed a year ago
Verified
c0a22bd12af9df9c2595a05eb267899867e67561

feat: Improving Android and web icons (#183)

eerickzanardo committed a year ago

README

The README file for this repository.

Super Dash

coverage style: very good analysis License: MIT

Generated by the Very Good CLI ๐Ÿค–

A Very Good Platformer Game generated by Very Good CLI.


Play the game ๐ŸŽฎ

Play directly in your desktop browser, or download the application for Android and iOS.

Getting Started ๐Ÿš€

This project contains 3 flavors:

  • development
  • staging
  • production

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

# Development
$ flutter run --flavor development --target lib/main_dev.dart

# Staging
$ flutter run --flavor staging --target lib/main_tester.dart

# Production
$ flutter run --flavor production --target lib/main_prod.dart

*Super Dash works on iOS, Android, Web, and Windows.


Running Tests ๐Ÿงช

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

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

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

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:dash_run/l10n/l10n.dart';

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

Adding Supported Locales

Update the CFBundleLocalizations array in the Info.plist at ios/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 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"
    }
}