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

Overview

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: https://github.com/flutter/flutter/issues/51752#issuecomment-667737471
  • 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)

You might also like...

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget.

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget.

📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.

Jan 7, 2023

A widget that allow user resize the widget with drag

Flutter-Resizable-Widget A widget that allow user resize the widget with drag Note: this widget uses Getx Example bandicam.2021-11-11.12-34-41-056.mp4

Dec 13, 2022

A widget lib that the widget in this lib can react to flutter ScrollController's offset

A widget lib that the widget in this lib can react to flutter ScrollController's  offset

Language: English | 中文įŽ€äŊ“ linked_scroll_widgets A lib full of widgets that can react to the scrollController's offset change,to custom your UI effect.

Oct 16, 2022

Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget

Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget

lite_rolling_switch Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget https://github.com/pedromas

Dec 1, 2022

A Flutter widget that will give a Glitch Animation Effect to it's child widget.

A Flutter widget that will give a Glitch Animation Effect to it's child widget.

GlitchEffect A Flutter widget that will give a Glitch Animation Effect to it's child widget. Installation Add the latest version of package to your pu

Nov 25, 2022

A highly customizable toggle switch with a loading state.

A highly customizable toggle switch with a loading state.

A highly customizable toggle switch with a loading state.

Dec 30, 2022

Create beautiful Loading and Timer buttons in Flutter

Create beautiful Loading and Timer buttons in Flutter

Argon Buttons (Timer and Loading) Create beautiful Loading and Timer buttons using Argon Buttons. No need to worry about handling animations or timers

Dec 11, 2022

A library to easily create radio button and checkbox groups.

A library to easily create radio button and checkbox groups.

Check/Radio Group A library to easily create radio button and checkbox groups. Define font size, selection color, position of radios / check and text

Jan 6, 2021

Create beautiful flutter tags quickly and easily

Create beautiful flutter tags quickly and easily

flutter_tags Create beautiful tags quickly and easily. Installing Add this to your package's pubspec.yaml file: Null-safety version (Beta) MORE INFO d

Mar 4, 2022
Comments
Owner
Tim Whiting
I'm a PhD student at BYU. I am researching proficiency self-assessment of autonomous systems. I love human-robot/AI interaction, HCI, Flutter & languages.
Tim Whiting
A widget that imposes different constraints on its child than it gets from its parent

A widget that imposes different constraints on its child than it gets from its parent, possibly allowing the child to overflow the parent. Similar to `OverflowBox` except that the unconstrained width or height is sized to the intrinsic size of the child, instead of being assumed to be infinite, which allows IntrinsicSizeOverflowBox to be used in a `Scrollable` widget.

Ron Booth 3 Dec 7, 2022
The flutter_otp_text_field package for flutter is a TextField widget that allows you to display different style pin.

flutter_otp_text_field flutter_otp_text_field The flutter_otp_text_field package for flutter is a TextField widget that allows you to display differen

David-Legend 30 Nov 8, 2022
An advanced flutter package to build responsive application accross all platform with ease and has an handful of different types of extension

Flutter Next Now build flutter apps with ease and responsive. An advanced flutter package to build responsive application accross all platform with ea

Shashi Kumar 10 Dec 29, 2022
A Flutter Widget that create a horizontal table with fixed column on left hand side.

horizontal_data_table A Flutter Widget that create a horizontal table with fixed column on left hand side. Installation This package is starting to su

May Lau 204 Dec 27, 2022
A flutter carousel widget, support infinite scroll, and custom child widget.

carousel_slider A carousel slider widget. Features Infinite scroll Custom child widgets Auto play Supported platforms Flutter Android Flutter iOS Flut

Bart T 1 Nov 25, 2021
Progress Dialog widget for flutter projects with ability to customize loading widget, background color and background blur.

DISCONTINUED Checkout ArsDialog ars_progress_dialog Customizable progress dialog for Flutter applications with smooth animation for background dim col

Arsam 8 Apr 15, 2022
GetX demo Counter with full understanding of State Management, Route Management and SnackBar

GetX demo Counter with full understanding of State Management, Route Management and SnackBar

TAD 1 Apr 4, 2022
A simple Flutter widget to add in the widget tree when you want to show nothing, with minimal impact on performance.

nil A simple widget to add in the widget tree when you want to show nothing, with minimal impact on performance. Why? Sometimes, according to a condit

Romain Rastel 127 Dec 22, 2022
A Flutter Widget to make interactive timeline widget.

Bubble Timeline Package A Flutter Widget to make interactive timeline widget. This widget can be used to make Event Timelines, or Timelines for certai

Vansh Goel 12 Sep 22, 2022
Widget, that can make any static located widget hidable

Installing See the official installing guidline from hidable/install Usage & Overview To start using Hidable widget, we have to create a ScrollControl

Anon 18 Dec 16, 2022