A Template Project for Flutter.

Overview

Flutter Boilerplate

coverage style: very good analysis License: MIT

A Template Project for Flutter.


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

*Flutter Boilerplate 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:flutter_boilerplate/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"
    }
}
You might also like...

For creating custom flutter project from template

For creating custom flutter project from template A standalone solution to issue flutter/flutter#15279 Installation If you want to use flutter_create

Nov 21, 2022

Flutter project template with BloC and repository pattern.

Flutter project template with BloC and repository pattern.

Dec 10, 2022

Clean architecture template project for new flutter applications.

Clean architecture template project for new flutter applications.

clean_template Clean architecture template project for new flutter applications. Implemented app logic RestClient - rest API client-server networking

Jul 27, 2022

A Template Project for Flutter.

Flutter Boilerplate A Template Project for Flutter. Getting Started πŸš€ This project contains 3 flavors: development staging production To run the desi

Nov 21, 2022

This is template toolkit fasten your project setup within a minute. The toolkit is based on MVC+S structure.

This is template toolkit fasten your project setup within a minute. The toolkit is based on MVC+S structure.

BWeird Flutter Toolkit! Hi! From a Weirder Flutter has been great on mobile development and I took this opportunity to make it even greater with templ

Aug 22, 2021

Use the template to create your own repository, complete the project and verify

Use the template to create your own repository, complete the project and verify

Proyecto NivelaciΓ³n MisionTic Usar el template para crear un repositorio propio,

Dec 20, 2021

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

Jan 9, 2023

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications. We have redesigned all the usual components to make it look like our Now UI Design, minimalistic and easy to use.

Oct 9, 2022

Flutter Getx Template

This is source flutter template use getx for statemanagement β˜•

Oct 18, 2022
Owner
Kimmy
Formerly a backend developer, now a frontend developer.
Kimmy
Flutter template project - Simple ToDo app with scalable project structure.

Flutter Template Flutter template project - A simple TODO list app. This template provides simple UI and scalable project structure that goes beyond t

Web Factory LLC 128 Nov 21, 2022
Starting template for a new Flutter project. Using clean architecture + Riverpod.

flutter_project_template_riverpod Installation Add Flutter to your machine Open this project folder with Terminal/CMD Ensure there's no cache/build le

Bahri Rizaldi 39 Dec 27, 2022
Flutter empty template to start your project.

flutter_starter Flutter empty template to help you start your project. PACKAGES Packages I've used Getx Shimmer Shared Preferences Gap Flutter Localiz

martinoyovo 2 Dec 2, 2021
A basic boilerplate template for starting a Flutter GetX project. GetX, Dio, MVVM, get CLI, Localization, Pagination etc are implemented.

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We

Hasan Abdullah 214 Jan 9, 2023
Template for large or scaleable Flutter project

Template Project See example usage on Youtube Config config folder contains the following folders: routes : The route folder contains all the files wh

Firgia 88 Dec 21, 2022
Project-x2 - A Flutter E-Commerce starter template that bootstraps development of your mobile application

Flutter E-Commerce UI KIT A powerful Flutter E-Commerce starter template that bo

null 1 Apr 7, 2022
Structured and Organized Flutter (ANDROID+WEB) template project using Redux architecture and Retrofit rest package

flutter_redux_template A new Flutter project. JSON Models classes need this lines to json generator: part 'foo.g.dart'; //on imports factory Foo.from

Raul Abreu 2 Apr 11, 2022
Flutter Project Template

Flutter Project Template This template is currently under developemnt. Features ?? Enterprise Ready, build robust, maintainable and testable real apps

Minsik Kim 2 Feb 23, 2022
The project of the empty template with Flutter has built the basic framework to realize the functions of internationalization, theme peeling etc.

flutter-bloc-app-template ?? The project of the empty template with Flutter has built the basic framework to realize the functions of internationaliza

Oleksii Shtanko 30 Dec 31, 2022
Flutter project template with BloC architecture. Implemented many feature as stated in README

Flutter Project Template Using BloC Implementations Theme switching Advanced Routing Bloc Observer for debugging Hydrated Cubit for holding value even

Baran Açıkgâz 9 Dec 10, 2022