Skip to main content

Posts

Showing posts with the label pageview

PageView in Flutter | Everything about PageView in Flutter

 Introduction PageView is one of the best widgets in Flutter. You can make your screen swipeable and in this tutorial, we are going to learn PageView . Table of Contents Project Setup Code Design Extra features Result Project Setup We don't need any package to install for this tutorial. Also this tutorial we are going to use Containers in our PageView for simplicity. So create a new Flutter project and come to the body field of the Scaffold widget. Make sure to delete the rest of the sample code provided. Also, remove the FloatingActionButton widget. We do not need it for our tutorial. Inside the body field of Scaffold , use the PageView widget and declare the children field here. The code should be like below. If cannot delete the code properly copy and paste the code below in main.dart file. import 'package:flutter/material.dart' ; void main() { runApp(MyApp()); } class MyApp extends Statele...