Skip to content

Find information about the next movie you're going to watch in the company of a nice Chicken Box πŸ—πŸŽ¬

Notifications You must be signed in to change notification settings

samuelematias/chicken_box_time

Repository files navigation

Chicken Box Time πŸ—πŸŽ¬

show_case


About this App πŸ—£

In this app, it is possible to you find information about the next movie you're going to watch in the company of a nice Chicken Box and of course, having a good time!

This App has some features such as:

Internationalization (i10n) Dark/Light mode And more!
show_case show_case show_case

πŸ’‘ The Search feature considers both title and description of the movie.

This project has a simple CI pipeline, to analyze the code and run the unit and widget tests.
For more information, check the ci.yaml file, which has the whole process in detail, step by step.


Running the project locally πŸ”¨

  1. Clone this repository into your machine:
git clone https://github.com/samuelematias/chicken_box_time.git
  1. With the repository cloned, open the repository root in your terminal and run the command:
bash ./flutter_packages.sh

With FVM (In project root, and into each package, run this command):

fvm flutter pub get
  1. Everything working fine, without any errors, run the app with the following command:
flutter run --flavor development -t lib/main_development.dart

With FVM:

fvm flutter run --flavor development -t lib/main_development.dart
  1. Have fun!

Flavor's 🍨

  • Android
  • iOS
  • Linux
  • Hover
  • macOS - Soon!
Flavor Development Flavor Staging Flavor Production
CleanShot 2022-04-14 at 10 40 12 CleanShot 2022-04-14 at 10 40 00 CleanShot 2022-04-14 at 10 40 21

For building development environment :

flutter run --flavor development -t lib/main_development.dart

For building staging environment :

flutter run --flavor staging -t lib/main_staging.dart

For building production environment :

flutter run --flavor production -t lib/main_production.dart

Run Flavor's in debug mode

In VsCode, add this config in your .vscode/launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "development",
            "request": "launch",
            "type": "dart",
            "program": "lib/main_development.dart",
            "args": [
                "-t",
                "lib/main_development.dart",
                "--flavor",
                "development"
            ]
        },
        {
            "name": "staging",
            "request": "launch",
            "type": "dart",
            "program": "lib/main_staging.dart",
            "args": [
                "-t",
                "lib/main_staging.dart",
                "--flavor",
                "staging"
            ]
        },
        {
            "name": "production",
            "request": "launch",
            "type": "dart",
            "program": "lib/main_production.dart",
            "args": [
                "-t",
                "lib/main_production.dart",
                "--flavor",
                "production"
            ]
        }
    ]
}

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:very_good_example_app/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>pt</string>
	</array>

    ...

Adding Translations

  1. For each supported locale, add a new ARB file in lib/l10n/arb.
β”œβ”€β”€ l10n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ app_en.arb
β”‚   β”‚   └── app_pt.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_pt.arb

{
    "@@locale": "pt",
    "counterAppBarTitle": "Contador",
    "@counterAppBarTitle": {
        "description": "Texto mostrado na AppBar da Counter Page"
    }
}

Tech Stack πŸ‘©πŸΎβ€πŸ’»

πŸ’ͺ Building with sound null safety πŸ’ͺ

Aren't you in this Flutter/Dart vesion? Consider taking a look at FVM, I believe it can help you at this point πŸ˜‰.


Packages/Plugins πŸ“Ÿ


Tools πŸ› 


Next Steps πŸ’Ό

  • Design System - Tests
  • Movie API - Tests
  • Movie Repository - Tests
  • Movie Feature - More Tests
  • Local Storage - Implementation
  • Local Storage - Tests
  • Manually change theme/mode (take default by system)
  • Manually change language
  • Settings page (change theme/language)
  • Infinite scroll - movie_list_page
  • Accessibility

Contributors πŸš€

Samuel Matias
Samuel Matias

πŸ’» 🎨

About

Find information about the next movie you're going to watch in the company of a nice Chicken Box πŸ—πŸŽ¬

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published