Skip to content

realmeylisdev/zonely

Repository files navigation

Zonely

coverage style: very good analysis License: MIT

Generated by the Very Good CLI 🤖

Zonely — a smart time zone converter


Getting Started 🚀

Run the app using the launch configuration in VSCode/Android Studio or the following command:

$ flutter run

*Zonely works on iOS and Android.


Running Tests 🧪

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

$ very_good 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

Bloc Lints 🔍

This project uses the bloc_lint package to enforce best practices using bloc.

To validate linter errors, run

dart run bloc_tools:bloc lint .

You can also validate with VSCode-based IDEs using the official bloc extension.

To learn more, visit https://bloclibrary.dev/lint/


Working with Translations 🌐

This project follows the official internationalization guide for Flutter using ARB files for translations.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb and add a new key/value pair with the relevant description (optional):
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World greeting."
    }
}
  1. Use the new string:
import 'package:zonely/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 the new .arb file:

app_es.arb

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

Generating Translations

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

flutter gen-l10n --arb-dir="lib/l10n/arb"

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

About

Zonely — a smart timezone converter

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages