Git Product home page Git Product logo

verygoodcoffee's Introduction

Very Good Coffee

A random Coffee images app built with Flutter for VeryGoodVentures

Getting Started 🚀

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

$ flutter run

or

$ flutter -d your_device_id run

*Very Good Coffee works on iOS and Android devices.


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

NOTE: To run all unit and widget tests of a package, use the same command from inside that package or use the Test Explorer of Visual Studio Code to run all test at once


Localization (abbr. as L10N) 🌐

This project is setup to translate all string content and adjust layouts to match expectations for a user's device locale. This project generates localized messages based on arb files found in the lib/l10n/arb directory.

Adding new English strings to the project (Same for any other language as the Spanish (app_es.arb))

To add new strings to the project, add an entry to the app_en.arb file. Each entry requires:

  • A key-value pair -- the key should be a short camelCase name for the string, and the value is the string itself.
  • A matching dictionary entry to provide some flavor text in the form of a description comment.

A complete entry in the English file for a new string looks like this:

-- app_en.arb --
{
    "sampleKey": "Very Good Coffee",
    "@sampleKey": {
        "description": "The title of the application"
    }
}
-- app_es.arb --
{
    "sampleKey": "Un muy buen café",
    "@sampleKey": {
        "description": "El título de la aplicación"
    }
}

Each additional locale must be added to the supportedLocales property when configuring the top level MaterialApp.

Retrieving localized strings in code

To retrieve strings in code, we need to import the generated AppLocalizations class for compiler-safe references.

import 'package:flutter_gen/gen_l10n/app_localizations.dart';

Then, given a BuildContext context, localized string values are retrieved in one line using the string key you specified in app_en.arb and any other language file:

final localizedString = AppLocalizations.of(context).stringKey

Development Tools 🏁

  • Flutter 3.3.3
  • Editor: VS Code
  • Editor Extensions:
  • Format Rules:
    • Editor: Detect Indentation: true
    • Editor: Format On Save: true
    • Dart: Line Length: 80

App Architecture 🏠

BLoC Pattern

The primary UI state management pattern employed within this application is the BLoC Pattern.

Project Structure

The project is structured by grouping files around specific features.



Built by Pablo Tortosa :shipit:

verygoodcoffee's People

Contributors

pablotortosalopez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.