Giter Club home page Giter Club logo

100-days-of-flutter's Introduction

100 days of Flutter

When starting this project, I've already had experiences with Flutter, so the challenge difficulties will bypass some basic knowledge and the knowledge that I knew it already. 🧑‍💻

  1. DraggableScrollableSheet
  • Use another sizing widget beside scrolling widget to make sheet affect. Please check demo.
  • minChildSize: is for smallest size that sheet can shrink and then opposite is maxChildSize from 0 to 1.
  • snap:true: to turn on custom snap, snapSizes: List(double) to define points to snap when users release their finger.
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-12.at.01.25.08.mp4
  1. ListWheelScrollView
  • Use for fancy scrolling
  • useMagnifier & magnification: for zoomed-in rate of the magnifier
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-12.at.00.56.24.mp4

Day 002: Fancy scrolling with Slivers & scrolling performance

  • SingleChildScrollView is 1 widget, so wrapping another widget with it will cause redundant rebuilds a whole widget tree when scrolling. However, if you have a relatively simple layout and performance isn't a major concern, SingleChildScrollView maybe be more suitable.
  • ListView => render a whole list, it doesn't implement lazy loading for UIs.
  • ListView.builder => optimize performance better, because of lazy loading UIs (build & render only can-see items). But there is an issue with ListView.builder, it's just able to use for item with the same type.

How about case that we need ListView in ListView ?

  • Set shrinkWrap: true & physics: const NeverScrollableScrollPhysics() for children list view ? => it will back to ListView mechanism => not good for performance
  • Solution: Use Slivers with CustomScrollView.
day002.mp4

Day 003: Animation basic concepts

There are 2 variants: implicit & explicit.

  • Implicit rely on simple setting a new value through Widget property, then Flutter takes care the rest.
  • Explicit require an animation controller => mean that you need to handle animation manually. Before deciding what type of animation that you need, answering some question first:
  • Question list

Day 004: Implicit animation and TweenAnimationController

  • The process between old and the new value is called interpolation.
  • There are 2 props need to be highlighted.
    1. Duration -> Duration that animation will execute.
    2. Curve -> How transaction works beginning and end values.

TweenAnimationBuilder

  • Use case: when can not find any "AnimatedFoo" widget.
  • Optimization:
    1. use child parameter is rather than call directly on builder. Because widget will reconstructed every time builder methods get called.
    2. set tween as static final when appropriate.
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-16.at.00.37.33.mp4
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-08-16.at.00.15.16.mp4

100-days-of-flutter's People

Contributors

taitrien avatar

Stargazers

Miles avatar Hoai-Nam Truong avatar Huỳnh Gia Bôi avatar

Watchers

 avatar Huỳnh Gia Bôi 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.