gurleensethi / sailor

Easy page navigation and management in Flutter apps.
https://pub.dev/packages/sailor
MIT License
145 stars 23 forks source link

Adds SailorConsumer Widget #20

Closed hjJunior closed 11 months ago

hjJunior commented 4 years ago

This PR is a MVP of #10, which will allow users to use SailorConsumer as a Builder

Example

class PageWithSailorConsumer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SailorConsumer<ThirdPageArgs>(
      builder: (context, ThirdPageArgs arg) {
        return Scaffold(
          appBar: AppBar(
            title: Text('Using SailorConsumer'),
          ),
          body: Text('Count arg: ${arg.count}'),
        );
      },
    );
  }
}

Simulator Screen Shot - iPhone X - 2019-12-02 at 10 29 34

I also added this to example folder

pishguy commented 4 years ago

when this PR can be merge?