animated_page_transition 0.0.1+2 copy "animated_page_transition: ^0.0.1+2" to clipboard
animated_page_transition: ^0.0.1+2 copied to clipboard

This package is for animated page transitioning. This is easy to use package. Add animation_page_transition dependency into the pubspec.yaml file. Then, then import package into the implementation fil [...]

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Animated Page Transition',
      home: HomeScreen(),
    );
  }
}

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

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

class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: PageTransitionButton(
          vsync: this,
          child: Container(
            height: 120,
            width: 120,
            decoration: BoxDecoration(
              color: const Color(0xFFFF9735),
              borderRadius: BorderRadius.circular(10),
            ),
          ),
          nextPage: const SecondScreen(),
        ),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return PageTransitionReceiver(
      scaffold: const Scaffold(
        backgroundColor: Color(0xFFFF9735),
      ),
    );
  }
}
38
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

This package is for animated page transitioning. This is easy to use package. Add animation_page_transition dependency into the pubspec.yaml file. Then, then import package into the implementation file/s and you can implement animated page transition very easily.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animated_page_transition