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.

Overview

last_fm

codecov

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>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>am</string>
</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": "የመተግበሪያ ስም"
  },
}
You might also like...

Resto with flutter_bloc and firebase

Resto with flutter_bloc and firebase

eshop A new Flutter project. Getting Started Why bloc ? Business logic components (BLoC) allow you to separate the business logic from the UI. Writing

Nov 11, 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,

Nov 23, 2022

Simple and modern news app that incorporates REST API (newsapi.org), all built entirely with Flutter.

Simple and modern news app that incorporates REST API (newsapi.org), all built entirely with Flutter.

A simple news app with a minimalistic and clean UI that incorporates the newsapi.org api all built entirely with Flutter. Be sure to leave a star 🌟

Dec 1, 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

Dec 10, 2022

DChisel is simple Dart Framework for creating REST API

DChisel is simple Dart Framework for creating REST API

DChisel Dart Framework DChisel is simple Dart Framework for creating REST API Features Custom host server and port GET, POST, PUT, DELETE, PATCH Route

Jan 6, 2023

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

A new practical project made with Flutter and some native widgets, movie API, provider state and more.

A new practical project made with Flutter and some native widgets, movie API, provider state and more.

Flutter Movie App This project was created with Flutter and some native Widgets like SingleChildScrollView, Hero Animation, SliverAppBar, StreamBuilde

Jul 12, 2022

Flutter-Covid-19-App - A flutter Covid-19 Trakcer app with Rest API

Flutter-Covid-19-App - A flutter Covid-19 Trakcer app with Rest API

covid_tracker I have created this app flutter with Rest API, API is open source.

Jan 4, 2023

To cure symptoms of various disease using medicines at home this app will act as guideline. Few animations are used and Firebase is used as database.

To cure symptoms of various disease using medicines at home this app will act as guideline. Few animations are used and Firebase is used as database.

Medkit It's a Pharmacy application that help you in curing basic symptoms and diseases with medicines available in your home. How to Run Code Clone or

Dec 22, 2022
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
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
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
a shop app with flutter_bloc and laravel api

kamelshop A new Flutter project. link to the backend api: https://github.com/kamelneili/kamelshop_api Why bloc ? Business logic components (BLoC) allo

Kamel Neili 10 Nov 22, 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
News Headline app is build in Flutter MVVM and REST Apis for News is used in this app.

About The Project Flutter MVVM project for News Headlines. REST Api for News is used in this project. App Demo Api for News Get free api from here : h

Aizaz ahmad 3 Aug 16, 2022
Respository for the I/O 2019 demo: Become a tech lead, slay bugs, and don't get fired.

Developer Quest Become a tech lead, slay bugs, and don't get fired. All in Flutter. Research tree The game progression is based on a "research tree" o

2D, Inc 3k Dec 28, 2022
Flutter application for the online hackathon MORE.tech 3.0 from VTB

vtb_hack_mobile Игра (мобильное приложение) для онлайн-хакатона MORE.tech 3.0 от ВТБ Скриншоты Getting Started For help getting started with Flutter,

Mirea Ninja 8 Nov 10, 2022
Flutter application for the online hackathon MORE.tech 3.0 from VTB

vtb_hack_mobile Игра (мобильное приложение) для онлайн-хакатона MORE.tech 3.0 от ВТБ Скриншоты Getting Started For help getting started with Flutter,

Mirea Ninja 8 Nov 10, 2022
A weather app with a minimalist design using the flutter_bloc library for state management.

weather_bloc_app_v2 A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you star

null 1 Jul 9, 2022