global_wings 1.0.4 copy "global_wings: ^1.0.4" to clipboard
global_wings: ^1.0.4 copied to clipboard

An awesome Flutter package to manage state of program declaratively and functionally.

Global Wings

Fast, enjoyable, declaratively and functionally variables management in flutter

You can also view a video demonstration if are a video person

πŸ›ΈπŸ›ΈπŸ›ΈπŸ›Έ Variables fly πŸ˜ƒ with Global Wings πŸ›ΈπŸ›ΈπŸ›ΈπŸ›Έ #

Global Wings #

An awesome Flutter package to share data across widgets and services without having to pass them directly.

Inspiration #

This package is inspired from javascript way of storing objects in map like structures and redux way of making state global.

Usage #

You can use global_wings to manage variables as follows. Let us imagine a complex scenariao where global_wings shines. We have have an alert dialog collecting input and we want alert to contact back to its caller to do so we may need to define variables and objects in class which is kind of bug prone and messy but with global_wings you can do it as

// In AlertBox
alertResponeCollectedByDialog() {
  save('alertResponsePermissionAccepted', true);
}
// In CallerWidget
whenNeedToAccessData() {
  if (serve('alertResponsePermissionAccepted')) {
    // Make user exit app

  } else {
    // Make user enter app
  }
}

  logCompleteStore() ;

You may need to watch complete state of your app for debugging purposes using global_wings to do so

  // It displays data in a nicely formatted way
  logCompleteStore() ;

You may also save multiple data in global_wings to do so

  saveMultiple({'name':'Chetan' , 'favouriteGame':'Badminton'});

You can also make different containers for saving data in global_wings to do so

  useStore('cart') ;
    // Save and retreive Data related to store
  useStore('product') ;
    // Save and retreive Data related to product

Global Wings ❀️ Flutter #

Global Wings was written with Flutter in mind. It is a perfect fit for managing primitive variables that don't need type inference like strings and ints:

Licence #

Copyright 2020 Chetan Jain

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

An awesome Flutter package to manage state of program declaratively and functionally.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on global_wings