presentation 2.2.0 copy "presentation: ^2.2.0" to clipboard
presentation: ^2.2.0 copied to clipboard

Set of tools providing presentation capabilities (tansitions, animation, navigation,...) to a Flutter application

example/lib/main.dart

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

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

class PresentationExample extends StatefulWidget {
  const PresentationExample({super.key});

  @override
  _PresentationExampleState createState() => _PresentationExampleState();
}

class _PresentationExampleState extends State<PresentationExample> {
  late PageController _controller;
  late PresentationController _presentationController;

  @override
  void initState() {
    super.initState();
    _controller = PageController();
    _presentationController = PresentationController(controller: _controller);
  }

  @override
  void dispose() {
    _presentationController.dispose();
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Presentation(
        controller: _controller,
        presentationController: _presentationController,
        children: const [
          SimplePage('1'),
          SimplePage('2'),
        ],
      ),
    );
  }
}

class SimplePage extends StatelessWidget {
  const SimplePage(
    this.text, {
    super.key,
  });

  final String text;

  @override
  Widget build(BuildContext context) {
    return Center(child: Text(text));
  }
}
10
likes
130
pub points
70%
popularity

Publisher

verified publishertomek-polanski.com

Set of tools providing presentation capabilities (tansitions, animation, navigation,...) to a Flutter application

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on presentation