Skip to content

Latest commit

 

History

History
42 lines (19 loc) · 1.8 KB

File metadata and controls

42 lines (19 loc) · 1.8 KB

Flutter hooks_riverpod example with S.O.L.I.D principle

A Flutter project to learn riverpod following S.O.L.I.D principles

If you're starting with hooks_riverpod so this project is a good start point to see how it works, do more with less 😉

In this app we get trending giphys fetching Giphy API

giphy-for-all.mp4

Getting Started

To getting start make sure you have installed the Flutter version 3.0.0, we used it in this project.

Once you have the project running you'll need to get a new api_key in Giphy Console a new one and replace on the project giphy.repository.dart line 14 -> apiKey variable

Packages

Just to remember you

You can learn more about S.O.L.I.D princples with Dart in this amazing MEDIUM article solid principles in Dart

Basically the SOLID ideas are

1 - The single-responsibility principle: "There should never be more than one reason for a class to change." In other words, every class should have only one responsibility.

2 - The open–closed principle: "Software entities ... should be open for extension, but closed for modification."

3 - The Liskov substitution principle: "Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it."

4 - The interface segregation principle: "Many client-specific interfaces are better than one general-purpose interface."

5 - The dependency inversion principle: "Depend upon abstractions, [not] concretions."