page_view_360 0.0.4 copy "page_view_360: ^0.0.4" to clipboard
page_view_360: ^0.0.4 copied to clipboard

outdated

A flutter package to utilize PageView.builder(). This package allow to implement a quad directional Pageview. User are allow to scroll/slide pages in 4 direction.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:page_view_360/page_view_360.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final colorsList = [
    Colors.blue,
    Colors.green,
    Colors.pink,
    Colors.purple,
    Colors.blueGrey,
    Colors.amber,
    Colors.deepOrange
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ThreeSixtyPageView(
        itemCount: colorsList.length,
        // pageMargin: const EdgeInsets.all(16),
        itemBuilder: (context, index) {
          return Container(
            color: colorsList[index],
            alignment: Alignment.center,
            child: Text(
              '$index',
              style: const TextStyle(
                fontSize: 56,
              ),
            ),
          );
        },
      ),
    );
  }
}
8
likes
0
pub points
19%
popularity

Publisher

unverified uploader

A flutter package to utilize PageView.builder(). This package allow to implement a quad directional Pageview. User are allow to scroll/slide pages in 4 direction.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on page_view_360