diff --git a/README.md b/README.md index 6c7c890..3b1d4ee 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, ## Screenshots And Usage +## Tik Tok Swipe Up + +tik tok like Flutter Swipe Up UI using pageView widget. + +![Screenshots on iOS](./screenshots/swipe_up.gif) + ## SlideListView A widget that can be used to present two different views that can be toggled using a Floating Action Button. The views toggle with a nice cube-rotation animation. diff --git a/lib/tiktok_swipe/swipe.dart b/lib/tiktok_swipe/swipe.dart new file mode 100644 index 0000000..0863204 --- /dev/null +++ b/lib/tiktok_swipe/swipe.dart @@ -0,0 +1,170 @@ +import 'package:flutter/material.dart'; + +void main() => runApp(Swipe()); + +class Swipe extends StatelessWidget { + final controller = PageController(initialPage: 0); + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + body: PageView( + scrollDirection: Axis.vertical, + controller: controller, + children: [ + Container( + color: Colors.orange.shade100, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.red.shade200, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.red.shade300, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.red.shade400, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.white, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.green.shade300, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.green.shade600, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.green.shade900, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.white, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.blue.shade200, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.blue.shade600, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 50), + ), + ], + ), + ), + Container( + color: Colors.blue.shade900, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Swipe Up!", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.white, + fontSize: 50), + ), + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index c8baac6..a7a3dad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" boolean_selector: dependency: transitive description: @@ -99,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -134,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" typed_data: dependency: transitive description: diff --git a/screenshots/swipe_up.gif b/screenshots/swipe_up.gif new file mode 100644 index 0000000..02dad91 Binary files /dev/null and b/screenshots/swipe_up.gif differ