stepper_page_view 0.0.1 copy "stepper_page_view: ^0.0.1" to clipboard
stepper_page_view: ^0.0.1 copied to clipboard

outdated

A custom stepper that displays steps in a page view

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Stepper page view example',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

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

class _MyHomePageState extends State<MyHomePage> {
  final controller = PageController(initialPage: 0);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: StepperPageView(
        pageController: controller,
        pageSteps: const [
          PageStep(
            title: Text('Step 1'),
            content: Center(child: Text('Page 1')),
          ),
          PageStep(
            title: Text('Step 2'),
            content: Center(child: Text('Page 2')),
          ),
          PageStep(
            title: Text('Step 3'),
            content: Center(child: Text('Page 3')),
          ),
        ],
      ),
    );
  }
}
10
likes
0
pub points
80%
popularity

Publisher

unverified uploader

A custom stepper that displays steps in a page view

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, dotted_line, flutter

More

Packages that depend on stepper_page_view