Giter Club home page Giter Club logo

flutter_simple_base_project's Introduction

flutter_simple_base_project

Base cơ bản cho dự án Flutter.

Cấu trúc thư mục

  • Tất cả các file/thư mục được đặt tên theo kiểu snake_case

Guideline

Naming Convention

  1. Effective Dart: Style

  2. Flutter: Best Practices and Tips

Note

Concept được trình bày dưới đây là đề xuất của cá nhân

Để giảm số lần viết code cập nhật dữ liệu từ tương tác của người dùng, ví dụ:

  • Cập nhật dữ liệu người dùng nhập vào TextField (thông qua hàm onChanged).

  • Thay đổi trạng thái của nút like (thông qua một custom callback).

  • Hiển thị thông tin (dữ liệu) mà người dùng chọn trên chính button đã ấn vào (ví dụ: thông qua hàm onChanged của DropdownButton).

  • ...

Ý tưởng đưa ra: Mỗi widget (trực tiếp) nhận và xử lý tương tác của người dùng sẽ đảm nhận trách nhiệm cập nhật kết quả vào ValueListenable, *Subject (ReactiveX)... Các widget đó cũng sẽ theo dõi/lắng nghe thông báo dữ liệu đã thay đổi và cập nhật lại giao diện (rebuild/setState).

Ví dụ trong base project này là widget CustomTextFormField (file custom_text_form_field.dart) có một trường tên là data kiểu ValueNotifier.

flutter_simple_base_project's People

Contributors

thanhle1547 avatar

Watchers

 avatar

Forkers

ngoxuantrong6

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.