Skip to content

Instantly share code, notes, and snippets.

@fabiomsr
Last active May 1, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiomsr/5bf82fbc88400d1003f234b4ce3e27d3 to your computer and use it in GitHub Desktop.
Save fabiomsr/5bf82fbc88400d1003f234b4ce3e27d3 to your computer and use it in GitHub Desktop.
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("NotificationListener example"),
),
body: NotificationListener<TimeNotification>(
child: Timer(),
onNotification: (notification) {
print(notification.time);
}),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment