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

outdated

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

example/lib/main.dart

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

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

class PresentationExample extends StatefulWidget {
  const PresentationExample({Key? key}) : super(key: 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, {
    Key? key,
  }) : super(key: key);

  final String text;

  @override
  Widget build(BuildContext context) {
    return Center(child: Text(text));
  }
}
10
likes
80
pub points
69%
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