Skip to content

SenseLogic/INFLUX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Influx

Flutter base library.

Features

  • Model dataView manager with navigation observer

Installation

Add influx: ^0.2.0 to your pubspec.yaml dependencies:

dependencies:
  flutter:
    sdk: flutter
  ...
  influx: ^0.2.0

Import it:

import 'package:influx/influx.dart';

Examples

Model dataView manager

class AppViewState extends State<AppView>
{
    ...

    @override
    Widget build( BuildContext context )
    {
        return MaterialApp(
            ...
            navigatorObservers: <NavigatorObserver>[ DataViewNavigatorObserver.instance ],
            ...
            );
    }
}
class AbcViewState extends State<AbcView> implements DataView
{
    Abc
        abc;

    ...

    @override
    Widget build( BuildContext build_context )
    {
        DataViewManager.instance.addView( this );

        return Scaffold(
            ...
            );
    }

    @override
    void dispose()
    {
        DataViewManager.instance.removeView( this );

        super.dispose();
    }

    @override
    List<dynamic> getViewData()
    {
        return [ abc ];
    }

    @override
    void updateView()
    {
        setState( () {} );
    }
}
class Abc
{
    ...

    void ChangeSomething(
        )
    {
        ...
        DataViewManager.instance.updateViews( [ this ] );
    }
}

Version

0.2

Author

Eric Pelzer (ecstatic.coder@gmail.com).

License

This project is licensed under the GNU Lesser General Public License version 3.

See the LICENSE file for details.

About

Flutter base library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages