pushTo method
Push to a new page
Implementation
pushTo(Widget page, {dynamic data}) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
if (page is NyStatefulWidget) {
page.controller.request = NyRequest(args: NyArgument(data));
}
return page;
},
),
);
}