• This repository has been archived on 21/Feb/2024
  • Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    C++
  • Created over 3 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Very Good Flutter Starter Project created by the Very Good Ventures Team ๐Ÿฆ„

Very Good Core

Very Good Ventures Very Good Ventures

Developed with ๐Ÿ’™ by Very Good Ventures ๐Ÿฆ„

coverage style: very good analysis License: MIT

A Very Good Flutter Starter Project created by the Very Good Ventures Team.

Generated by the Very Good CLI ๐Ÿค–


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_development.dart

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

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

*Very Good Core 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:very_good_core/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"
    }
}

Generating Translations

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

  1. Generate localizations for the current project:
flutter gen-l10n --arb-dir="lib/l10n/arb"

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

More Repositories

1

very_good_cli

A Very Good Command-Line Interface for Dart created by Very Good Ventures ๐Ÿฆ„
Dart
2,149
star
2

dart_frog

A fast, minimalistic backend framework for Dart ๐ŸŽฏ
Dart
1,830
star
3

formz

A unified form representation in Dart used at Very Good Ventures ๐Ÿฆ„
Dart
378
star
4

very_good_analysis

Lint rules for Dart and Flutter used internally at Very Good Ventures ๐Ÿฆ„
Dart
357
star
5

very_good_workflows

Reusable GitHub workflows used at Very Good Ventures ๐Ÿฆ„
CSS
292
star
6

very_good_infinite_list

A Very Good Infinite List Widget created by Very Good Ventures. Great for activity feeds, news feeds, and more. ๐Ÿฆ„
Dart
171
star
7

very_good_coverage

GitHub Action which helps enforce code coverage threshold using lcov created by Very Good Ventures ๐Ÿฆ„
JavaScript
159
star
8

mockingjay

A package that makes it easy to mock, test, and verify navigation in Flutter. Created by Very Good Ventures ๐Ÿฆ„
Dart
112
star
9

awesome_dart_frog

An awesome repo with Dart Frog articles, tutorials, plugins, and more! Created by Very Good Ventures.
105
star
10

very_good_flame_game

A Very Good Flutter Starter Flame Game created by the Very Good Ventures Team ๐Ÿฆ„
Dart
85
star
11

very_good_performance

Utility on top of the Flutter Driver API that facilitates measuring the performance of your app in an automated way created by Very Good Ventures ๐Ÿฆ„
C++
81
star
12

very_good_ranch

A very good Flame game built by Very Good Ventures ๐Ÿฆ„
Dart
75
star
13

r13n

Regionalization support for Flutter. Built by Very Good Ventures ๐Ÿฆ„
Dart
72
star
14

flutter_web_preloader

A brick that creates a smart web entrypoint for Flutter and preloads any type of asset before starting an app.
JavaScript
71
star
15

very_good_wear_app

A Very Good Flutter Wear OS App Starter Project created by the Very Good Ventures Team ๐Ÿฆ„
Dart
65
star
16

flame_behaviors

An implementation of the behavioral composition pattern for Flame. Built by Very Good Ventures ๐Ÿฆ„
Dart
64
star
17

very_good_templates

Collection of open-source templates created and maintained by Very Good Ventures.
Dart
61
star
18

pub_updater

A Dart package which supports checking if a current package is up-to-date.
Dart
55
star
19

cli_completion

Completion functionality for Dart Command-Line Interfaces built using CommandRunner. Built by Very Good Ventures. ๐Ÿฆ„
Dart
49
star
20

very_good_flutter_package

A Very Good Flutter Package Template created by the Very Good Ventures Team ๐Ÿฆ„
Dart
42
star
21

very_good_dart_cli

A Very Good Dart CLI Template created by the Very Good Ventures Team ๐Ÿฆ„
Dart
33
star
22

very_good_flutter_plugin

A Very Good Flutter Federated Plugin created by the Very Good Ventures Team ๐Ÿฆ„
Dart
29
star
23

very_good_test_runner

A test runner for Flutter and Dart created by Very Good Ventures ๐Ÿฆ„
Dart
18
star
24

very_good_hub

An end-to-end example of Flutter+Dart Frog application, using authentication
Dart
15
star
25

very_good_docs_site

A Very Good Documentation Site created by the Very Good Ventures Team ๐Ÿฆ„
JavaScript
15
star
26

very_good_dart_package

A Very Good Dart Package Template created by the Very Good Ventures Team ๐Ÿฆ„
Dart
14
star
27

flame_steering_behaviors

Flame behaviors used to organically manage the movement of an entity. Built by Very Good Ventures ๐Ÿฆ„
Dart
10
star
28

.github

7
star
29

changelogs

Changelogs for open source tools maintained by Very Good Ventures.
TypeScript
5
star
30

very_good_dictionaries

Custom cspell dictionaries used at Very Good Ventures ๐Ÿฆ„
4
star
31

flutter_and_friends_tic_tac_toe

Flutter and Friend workshop about Tic Tac Toe
Dart
1
star