A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter

Overview

last_fm

example workflow codecov Flutter version License: MIT

A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the tech stacks used in this project.


ScreenShots πŸ“·

albums artist
top_albums album_detail

Getting Started πŸš€

For the app to work, you need to provide your own last.fm API key by issuing here.

Once you get your API key, you can run or build the app by using the following command:

# Run
$ flutter run --dart-define=API_KEY=PUT_YOUR_API_KEY_HERE

# Build
$ flutter build --dart-define=API_KEY=PUT_YOUR_API_KEY_HERE

Running Tests πŸ§ͺ

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

$ flutter test --coverage --test-randomize-ordering-seed random

To remove generated files from the coverage report, use the following command:

# install remove_from_coverage package 
$ pub global activate remove_from_coverage

# remove `.g.dart` and `.config.dart` files from the coverage report
$ pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '.g.dart', '.config.dart'

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 localized string, open the app_en.arb file at lib/config/l10n/arb/app_en.arb.
{
  "@@locale": "en",
  "appName": "LastFM",
  "@appName": {
    "description": "The application name"
  }
}
  1. Then add a new key/value and description
{
  "@@locale": "en",
  "appName": "LastFM",
  "@appName": {
    "description": "The application name"
  },
  "albums": "Albums",
  "@albums": {
    "description": "Text shown in the AppBar of AlbumsScreen"
  },
}
  1. Use the new string
import 'package:some_app/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.albums);
}

Adding Supported Locales

Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.

    ...

<key>CFBundleLocalizationskey>
<array>
<string>enstring>
<string>amstring>
array>

        ...

Adding Translations

  1. For each supported locale, add a new ARB file in lib/config/l10n/arb.
β”œβ”€β”€ l10n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ app_en.arb
β”‚   β”‚   └── app_am.arb
  1. Add the translated strings to each .arb file:

app_en.arb

{
  "@@locale": "en",
  "appName": "LastFM",
  "@appName": {
    "description": "The application name"
  },
}

app_am.arb

{
  "@@locale": "am",
  "appName": "α‹¨αˆ˜αŒ¨αˆ¨αˆ» ኀፍ ኀም",
  "@appName": {
    "description": "α‹¨αˆ˜α‰°αŒα‰ αˆͺα‹« ሡም"
  },
}

Credit πŸ™

Thanks to all the people who created and are maintaining these awesome packages used in this project.

Maintainers Packages
Felix Angelov bloc & flutter_bloc, equatable, mocktail
Thomas Burkhart get_it
Milad akarie injectable
Chris Sells go_router
Very Good Ventures For their awesome README template
And everyone else dio, hive, and many more...

Features and bugs

You can file features requests (not intending to add new features, but I will try to add based on requests), bugs or any questions at the issue tracker.

And don't forget to give a star if you find this repo helpful, or you have learned something from it!

Maintainers

You might also like...

E-Commerce App built on Flutter with Firebase, SQLite, GetX and MVVM Architecture.

E-Commerce App built on Flutter with Firebase, SQLite, GetX and MVVM Architecture.

Shopzler A new open source E-commerce App created using Flutter and GetX. ScreenShots Features : Sign-In, Sign-Up and LogOut using Email & Password /

Jan 6, 2023

Flutter travel app with clean architecture and firebase

atlas A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Jan 25, 2022

Flutter App to save notes secure, using cryptography, clean architecture and some design patterns.

notes A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Mar 28, 2022

This is not an app. I made this architecture to build robust and easy-to-maintain products but in a faster way.

simple_architecture_flutter This is not an app. I made this architecture to build robust and easy-to-maintain products but in a faster way. Info I use

Oct 28, 2022

Online Shop App with Clean Architecture, Bloc and Freezed

Online Shop App with Clean Architecture, Bloc and Freezed

Online Shop App with Clean Architecture, Bloc and Freezed The aplication is a sm

Dec 22, 2022

This repository is a sample app for learning TDD and clean architecture in action!

flutter_weather_app_sample A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get y

Jan 1, 2023

Number trivia Android and ios application using flutter clean architecture

demo_project A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Jun 9, 2022

A MVVM architecture and project structure approaches to developing Flutter apps

A MVVM architecture and project structure approaches to developing Flutter apps

Flutter Architecture Blueprints Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to dev

Mar 18, 2022

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Moving Pictures Moving Pictures is a mobile application built with the Flutter SDK for Android and iOS. It’s an application that gets the information

Jan 7, 2023
Owner
Elias Andualem
Elias Andualem
The Clean architecture and manage the Flutter project to make scalable with a modularization approach

Clean architecture sample project Flutter template project to explore the Clean architecture and manage the Flutter project to make scalable with a mo

null 5 Oct 18, 2022
DoneIt is a sample note app πŸ“ Flutter application πŸ“± built to demonstrate use of Clean Architecture tools. Dedicated to all Flutter Developers with ❀️.

DoneIt ?? DoneIt is a sample note app ?? Flutter application ?? built to demonstrate use of Clean Architecture tools. Dedicated to all Flutter Develop

Shubham Chhimpa 175 Dec 24, 2022
Starter architectures for your next Flutter project in order to make it scalable and easy for maintenance and tests.

?? ?? ?? Flutter Starter Architecture (MVVM) My custom starter project for Flutter apps. I was looking for a simple way to build Flutter app in a scal

Junior Medehou 29 Dec 25, 2022
A guideline for building scalable Flutter applications.

Scalable flutter app You probably need to read this article before inspecting the repo's code. Building scalable Flutter apps (Architecture, Styling,

Nour El-Din Shobier 36 Nov 23, 2022
A collection of simple, bare-bones Flutter apps that each demonstrate a concept

flutter-by-example A collection of simple, bare-bones Flutter apps that each demonstrate a concept The apps are slowly being updated to Dart 2; be sur

Matt Sullivan 1k Dec 10, 2022
Sample app to demonstrate the integration and working of Dyte SDK for mobile, using Flutter.

Flutter Sample App by dyte Sample App to demonstrate Dyte SDK in flutter Explore the docs Β» View Demo Β· Report Bug Β· Request Feature Table of Contents

Dyte 12 Jan 1, 2023
Caching with flutter riverpod and looking into future providers. Example to demonstrate stale while revalidate pattern.

FLUTTER SWR EXAMPLE Test stale-while-revalidate pattern with riverpod. Look; query_provider package Backend calls are made with ghibli-api Tested Prov

Dipesh Dulal 7 Jun 30, 2022
Super easy mood tracking app to demonstrate use of the Firebase Local Emulator Suite

Mood Tracker Example App in Flutter This is a simple example app showing how to use Cloud Functions and the Firebase Local Emulator inside a Flutter a

Andrea Bizzotto 8 Oct 14, 2022
An example project to demonstrate how moor can be used on multiple platforms

moor_shared An example project to demonstrate how moor can be used on multiple p

null 0 Dec 28, 2021
Amir Khan 47 Jan 8, 2023