Giter Site home page Giter Site logo

samuelematias / local_widget_state_approaches Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timwhiting/local_widget_state_approaches

0.0 1.0 0.0 1.31 MB

A repository to create and compare different methodologies of reusing local widget state logics.

License: MIT License

Kotlin 0.48% Swift 3.80% Objective-C 0.12% Dart 91.78% HTML 3.82%

local_widget_state_approaches's Introduction

Flutter Web Demo Link: https://timwhiting.github.io/local_widget_state_approaches/#/

Widget UI State Logic encaspulation approaches

This project intends to illustrate via several case studies what is difficult when reusing state logic. (Not state) among multiple stateful widgets.

Note that I'm doing this in my spare time, and therefore I can not gurantee timeliness as far as incorporating all different approaches for all examples.

Also, I'm not sure the best name for the respository, so I did my best. I think the header of the Readme might be more instructive as to what these examples will try to demonstrate. Open an issue if you'd like to discuss that. Or we can create a Wiki page about that.

Getting access

Please request access and respect the other contributors. Make sure you resolve merge conflicts properly, and keep the repository organized. Otherwise, just fork and submit pull request like usual open-source practice. (I'm not sure how many people are wanting to contribute).

Current Progress

Approaches

  • Stateful - Nothing to add
  • Builders - Nothing to add
  • LateProperty - Adds registration of callbacks via mixin see this: flutter/flutter#51752 (comment)
  • Hooks - Using flutter_hooks package
  • State Restoration Framework
    • This was mentioned at one point in the issue, because flutter now has a state restoration framework. I don't know if it can work, but I'm willing to try for at least a few of the things that we are trying to solve here.

Examples

  • Counter Example
    • Hooks: Done
    • Stateful: Done
    • LateProperty: Not Started
    • Builders: Not Started

Future Work

I intend to keep the examples small like Remi suggests, they should not be full blown apps unless absolutely needed.

Instead they should be small examples that illustrate a point in reusability of state logics.

(TODO: determine scope and what would make an illustrative examples)

  • Setup 404 unimplemented page
  • Better navigation
  • Highlight navigation for unimplemented pages in a different color
  • Animation heavy page
  • Form page
  • Use some of Remi's potential examples: flutter/flutter#51752 (comment)
  • Also this: flutter/flutter#51752 (comment)
  • Would love to see the code along with the app like flutter gallery's code samples.

local_widget_state_approaches's People

Contributors

timwhiting avatar rrousselgit avatar hixie avatar

Watchers

James Cloos 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.