Flutter Cryptocurrency App with Riverpod & Freezed + Dio for API REST

Overview

Flutter Crypto APP

Complete Flutter Application with Riverpod & Freezed + Dio for API REST.

test build codecov Flutter version GitHub license

Features

  • API REST (CryptoWatch)
  • Linear Graph View (Hour, Day, Week, etc)
  • OHLC Graph
  • Search
  • Light / Dark Theme
  • Multi Lenguage
  • Exchange Selection
  • Favorite Pair

Stack

  • Flutter 2.2.0 (Null Safety)
  • Riverpod + Hooks
  • Freezed
  • Dio

Testing

  • Unit Testing (flutter_test)
  • Integration Testing (integration_test)
  • Mock Data (http_mock_adapter)
  • Github Actions (iOS & Android Integration Test)

Screenshots

Home Details Settings

Setup project

Download project

git clone https://github.com/salvadordeveloper/flutter-crypto-app

Get flutter dependencies

flutter pub get

You need to create an account at https://cryptowat.ch/ to get a personal API KEY

Rename the env.example file to .env and put there you API KEY

API_KEY={CryptoWatch_KEY}

Run the app

flutter run

If you have any error with generated files try to run this

flutter pub run build_runner build --delete-conflicting-outputs

Testing

Unit Test

flutter test

Integration Test

flutter drive --driver=test_driver/integration_test.dart --target=integration_test/main_test.dart

Resources

Flutter Docs

Riverpod Docs

Cryptowatch Docs

Licence

MIT License

Copyright (c) 2021 Salvador Valverde

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Comments
  • Error: A value of type 'ListTileThemeData' can't be assigned to a variable of type 'ListTileTheme'.  -

    Error: A value of type 'ListTileThemeData' can't be assigned to a variable of type 'ListTileTheme'. -

    /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/settings_ui-1.0.0/lib/src/cupertino_settings_item.dart:76:51: Error: A value of type 'ListTileThemeData' can't be assigned to a variable of type 'ListTileTheme'.

    • 'ListTileThemeData' is from 'package:flutter/src/material/list_tile.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/material/list_tile.dart').
    • 'ListTileTheme' is from 'package:flutter/src/material/list_tile.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/material/list_tile.dart'). final ListTileTheme tileTheme = ListTileTheme.of(context); ^
    opened by RajuNarula369 1
  • [Security] Workflow tests.yml is using vulnerable action actions/checkout

    [Security] Workflow tests.yml is using vulnerable action actions/checkout

    The workflow tests.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability. The vulnerability fix that is missing by actions version could be related to: (1) CVE fix (2) upgrade of vulnerable dependency (3) fix to secret leak and others. Please consider to update the reference to the action.

    opened by Ale0x78 1
  • [Security] Workflow release.yml is using vulnerable action actions/checkout

    [Security] Workflow release.yml is using vulnerable action actions/checkout

    The workflow release.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability. The vulnerability fix that is missing by actions version could be related to: (1) CVE fix (2) upgrade of vulnerable dependency (3) fix to secret leak and others. Please consider to update the reference to the action.

    opened by Ale0x78 1
  • Can you consider integrate flutter_native_splash?

    Can you consider integrate flutter_native_splash?

    Thanks for nice app. It's hard to find a good repo to learn Flutter with Riverpod like yours.

    I see this app doesn't have any splash yet. Can you consider integrate https://pub.dev/packages/flutter_native_splash?

    opened by anticafe 1
  • Add a close button to the search bar

    Add a close button to the search bar

    When the user enters the search content, they can click the close button to quickly clear the search content to improve user experience. Screenshot_20220630-050119

    You can consider using ConsumerStatefulWidget to achieve this function. 2022-06-30_045739 2022-06-30_045924

    opened by tenSunFree 0
  • SearchScreen doesn't show CircularProgressIndicator first

    SearchScreen doesn't show CircularProgressIndicator first

    When SearchScreen requests network data, it first displays No results. Screenshot_20220626-212147

    Because the list is initialized by default, if the network data is not loaded, the returned list will cause data.length to be 0, and then display No results. So consider trying not to initialize the list and let it return null. 2022-06-26_215549

    Then consider displaying CircularProgressIndicator when data == null. And when data.length == 0, displays No results. 2022-06-26_215740

    opened by tenSunFree 2
  • Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

    Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

    Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present] 2022-06-13_024527

    Consider adding android:exported="true" to AndroidManifest.xml. 2022-06-13_024925

    opened by tenSunFree 0
  • Exception has occurred. DataException (errorBadRequest)

    Exception has occurred. DataException (errorBadRequest)

    Hello! I tried to run your code but it gives me the following error:

    
    Exception has occurred.
    DataException (errorBadRequest)
    

    The error occurs in this part of the code:

    
    final favoritePairProvider = FutureProvider<FavoritePair>((ref) async {
      final cancelToken = CancelToken();
      ref.onDispose(() => cancelToken.cancel());
    
      final settings = ref.watch(cryptoSettings);
      String exchangeName = settings.maybeWhen(
          data: (details) => details.favoriteExchange, orElse: () => "");
      String pairName = settings.maybeWhen(
          data: (details) => details.favoritePair, orElse: () => "");
    
      if (exchangeName.isEmpty || pairName.isEmpty) {
        throw DataException(message: LocaleKeys.errorSomethingWentWrong);
      }
    
      Pair pair = Pair(pair: pairName, exchange: exchangeName);
      try {
        PairSummary pairSummary = await ref
            .read(cryptoRepository)
            .getPairSummary(exchangeName, pairName, cancelToken: cancelToken);
        return FavoritePair(pair: pair, pairSummary: pairSummary);
      } on DataException catch (error) {
        if (error.message == LocaleKeys.errorRequestNotFound) {
          ref.read(cryptoSettings.notifier).verifyFavoritePair();
        }
        throw error;
      }
    });
    

    I also changed the .env-example file to .env and copied my gotten API private key like below into it:

    API_KEY=ddTaK3jVw5fgdfgdgfdgfgfdgfdgfd

    Do you know how can I fix it?

    opened by Zohalmohal 0
Releases(v1.0.1)
Owner
Salvador Valverde
Salvador Valverde
Getx and Dio APi-Integration - Flutter RestApi Integration using Dio

Flutter RestApi Integration using Dio. Click this image to find videos==> //Crud

Fsd Ramjan 9 Nov 5, 2022
Developed using Dart & Flutter & Rest Api & Dio & Bloc & SharedPreferenes.

This is an ecommerce app which contain Many features like : Sign in , Sign up , Verify Email , log out. Fetch Products Data Search for any product Add

Mohamed Hashim 4 Nov 3, 2022
A boilerplate project for Flutter using RiverPod, Dio, auto_route

Flutter Boilerplate A boilerplate project for Flutter using RiverPod, Dio, auto_route, Freezed and generated with very_good_cli. This is a very simple

Gildo Jr 9 Dec 9, 2022
Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight Node.js based Bhagavad Gita API [An open source rest api on indian Vedic Scripture Shrimad Bhagavad Gita].

Gita Bhagavad Gita flutter app. Download App - Playstore Web Application About Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight No

Ravi Kovind 7 Apr 5, 2022
Riverpod Messages Listener: A message notification listener for apps build with Riverpod

Riverpod Messages Listener Hello all, this is the home page of riverpod_messages package, a message notification listener for apps build with Riverpod

Fabrizio Tognetto 4 Dec 8, 2022
Netflix app UI clone using bloc,Rest API and TMDB for API key

netflix_flutter project_using_bloc packages Used flutter_bloc json_serializable get_it dio A few resources to get you started if this is your first Fl

Pranav Pv 16 Nov 25, 2022
A rewrite of Bloc tutorial: Flutter Weather Tutorial using freezed

A rewrite of Bloc tutorial: Flutter Weather Tutorial using freezed. Bloc was used instead of Cubit (Cubit vs Bloc)

Yu-Han Luo 17 Nov 23, 2022
A Flutter Result type that feels like a Freezed union.

Freezed Result A Result<Success, Failure> that feels like a Freezed union. It represents the output of an action that can succeed or fail. It holds ei

Day Logger, Inc. 2 Nov 24, 2022
🎯 This library automatically generates object classes from JSON files that can be parsed by the freezed library.

The Most Powerful Way to Automatically Generate Model Objects from JSON Files ⚑ 1. Guide ?? 1.1. Features ?? 1.1.1. From 1.1.2. To 1.2. Getting Starte

KATO, Shinya / εŠ θ—€ 真也 14 Nov 9, 2022
FLutter Api Integration - Flutter Rest API Integration

Flutter_Rest_Api_integration Flutter_Rest_Api_integration. Preview How To Use To

Rahul Ranjan Singh 0 Feb 17, 2022
In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API.

Flutter CRUD Using NodeJS API In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API. ?? Packages Used h

SnippetCoder 14 Dec 30, 2022
Movie API Use Rest And Restful API

movie_api use rest and restful api The home screen fetches data from the Episodate API and shows a list of popular shows. The details screen and the s

Le Gia Huy 1 Dec 5, 2022
API call using Dio package and GetX in Flutter.

API call demo This demo is to get API data using Dio package and I have also used GetX package for state management. I have implemented two ways to di

Dhola Hardik 42 Dec 11, 2022
A Cryptocurrency app made with Flutter

Cryptoholic A Cryptocurrency app made with Flutter using Provider and BLoC pattern. UI is heavily inspired by this design. You can aquire the current

Karim Elghamry 128 Dec 16, 2022
A cryptocurrency tracker and portfolio app, built with Flutter and Dart

I'm currently rewriting the application from scratch to remove a lot of the ugly code, conform better to modern flutter best practices with regards to

Dominique Rwema Bagirishya 30 Oct 6, 2022
DeFi Scan - Mobile BlockChain Explorer app for cryptocurrency accounts.

DeFi Scan This is the official repository for DeFi Scan - a mobile blockchain explorer built with Dart/Flutter for searching, curating and storing det

Ayodeji Olabisi 4 Dec 20, 2022
Flutter-for-Wordpress-App - Cross platform wordpress news app built with Flutter and WP REST API

Flutter for Wordpress A flutter app for a wordpress websites with clean and elegant design. This app is available in free and pro version. You can cho

Madhav Poudel 243 Dec 23, 2022
Effortless Cryptocurrency Portfolio Tracker Application Built With Flutter

UNICOIN - DEVFEST HCMC 2021 Effortless Cryptocurrency Portfolio Tracker Application. Unicorn utilizes Coingecko's trusty API to track up-to-date data

null 5 Nov 9, 2022