A new flutter package for collection of common popular social media widgets
- Snapchat screen dismiss - By swiping down
- Instagram story swipe
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SnapchatDismiss(
child: Screen('Screen', Colors.redAccent),
),
),
);
Here we are navigating to another screen and applying the snapchat screen dismiss
Navigator.push(
context,
PageRouteBuilder(
opaque: false,
pageBuilder: (_, __, ___) =>
SnapchatDismiss(child: Screen('Screen', Colors.redAccent),)
),
);
Here we are navigating to another screen and applying the snapchat screen dismiss and with the previous screen as background when we dismiss
Navigator.push(
context,
PageRouteBuilder(
opaque: false,
pageBuilder: (_, __, ___) => SnapchatDismiss(
dismissHeight: 250,
child: Screen('Screen', Colors.redAccent),
),
),
);
Here we are navigating to another screen and applying the snapchat screen dismiss and this will require more drag than default to dismiss screen
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InstagramStorySwipe(
children: <Widget>[
Screen('Screen 1', Colors.lightBlueAccent),
Screen('Screen 2', Colors.redAccent),
Screen('Screen 3', Colors.greenAccent),
],
),
),
);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InstagramStorySwipe(
initialPage: 1,
children: <Widget>[
Screen('Screen 1', Colors.lightBlueAccent),
Screen('Screen 2', Colors.redAccent),
Screen('Screen 3', Colors.greenAccent),
],
),
),
);
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (_, __, ___) => SnapchatDismiss(
child: InstagramStorySwipe(
initialPage: 1,
children: <Widget>[
Screen('Screen 1', Colors.lightBlueAccent),
Screen('Screen 2', Colors.redAccent),
Screen('Screen 3', Colors.greenAccent),
],
),
),
),
);