Git Product home page Git Product logo

flutter_generate_colors's Introduction

Flutter Generate Colors

๐Ÿ“– Main objectives:

  • Create a screen that changes the backgrund color every time the user taps on it;
  • Create the generate color and random number functions without libraries;
  • Use the base template with the default actions and linters.

๐Ÿ“– Secondary objectives:

  • Created two unitary tests to make sure that the main objectives are working properly;
  • Added smooth animation to the changing color behavior;
  • Created an organized README.md to improve the documentation.

Showcase

IOS ๏ฃฟ

Android ๐Ÿค–

Features descriptions

Generate random colors algorithm: The idea here was, firstly, generate random numbers from 0 to 255 into a list and, after that, shuffle the List and take the very first element (actually I could take any element from the list, because it was entirely shuffled, however to make it clear and simpler I preferred taking the first element). Now, with the random number I filled them into the fromRgb() method of Colors class to generate the desired random colors.

OBS 1: I was having a specific problem with the action "Dart Code Metrics" and it looks like a problem with generated projects from the template, I found this Issue documented in the template's repository here. So, in order not to be blocked by this issue, I skipped and let the other actions run.

OBS 2: I was in doubt about using the method nextInt from dart:math because it is a library, native from dart but still a library. Then to make sure, I developed a standalone function to generate these random numbers from the List logic described above.

flutter_generate_colors's People

Contributors

giovaniavs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.