Giter Club home page Giter Club logo

flutterchallenge's Introduction

Getting Started

This project is a starting point for a Flutter application.

Here are a few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Code Generation

We use Mason to generate clean code easily. You can refer to the package complete documentation.

You can use the page template in this way:

1. Installation (do once)

# ๐ŸŽฏ Activate from https://pub.dev
dart pub global activate mason_cli

Now you can call the mason command in the terminal

2. Generate a page

Get all bricks registered in mason.yaml via:

mason get

Go to the folder where you want to create the new page

cd lib/pages

Run the command

mason make page

Insert the name of the page, and you're done ๐ŸŽ‰

Architecture

Store

State management: Get

A Store is where data and app state are retained.

Services

App-level state and data reside in /lib/store in *.service file.

Services are initialized at the app's start and can be retrieved from everywhere with the ServiceClassName.to method.

Model

A Service is often bound to a Model that matches a database object.

Ex. BreedService stores data about BreedModel, like the list of breeds.

A Model contains methods to transform JSON data to the class object.

Selector

A .selector file helps to keep the model's file clean and to keep variables private.

Api

.api file is a collection of methods that make REST calls about the model.

APIs should not be called directly from Widgets. Actions should be used instead.

Actions

The actions are an extension of the Service and are a collection of methods that call APIs and process data into models.

Pages

App routes.

Page

A .page file contains the route definition and Binding with the Controller.

When calling Get.toNamed the Controller is automatically initialized.

Controller

The Controller is responsible for the page logic.

The Controller is similar to a Service, but it's responsible only for its page and gets created and destroyed with it. It retrieves data from Services for the Widget and makes API calls through Service's Actions.

Widget

High-level widget that defines Page layout and content.

Widget content is reactively updated using Obx Widget

Design

Low-level widgets and UI tokens

Tokens

Design tokens point to style values like colors, fonts, and measurements

Material 3 definition

Atoms

Lowest-level widgets like structure widgets and buttons.

Atomic Design

Components

Medium-level widgets are composed of many lower-level widgets.

Utils

Translations

Get package is used for translations

*.translations files are used where a string needs to be translated.

All .translations files are then merged in utils/translations.dart.

This could lead to some repetition and overwriting, but it keeps translations organized and easier to track.

flutterchallenge's People

Contributors

ciock avatar

Stargazers

 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.