custom_route_transition_peterpaulez 0.3.1 copy "custom_route_transition_peterpaulez: ^0.3.1" to clipboard
custom_route_transition_peterpaulez: ^0.3.1 copied to clipboard

discontinuedreplaced by: transitioner

This package helps how to manage transitions between different views/pages with custom curve animation also.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Material App',
      initialRoute: 'uno',
      routes: {
        'uno': (_) => UnoPage(),
        'dos': (_) => DosPage(),
      },
    );
  }
}

class UnoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.blue,
      appBar: AppBar(
        actions: [],
        title: Text('Page Uno'),
        backgroundColor: Colors.transparent,
      ),
      body: Center(
        child: MaterialButton(
          onPressed: () {
            RouteTransitions(
              context: context,
              child: DosPage(),
              animation: AnimationType.scale,
              duration: Duration(milliseconds: 500),
              replacement: true,
              curveType: CurveType.bounceOut,
            );
          },
          color: Colors.white,
          child: Text('Go to Page Dos'),
        ),
      ),
    );
  }
}

class DosPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.orange,
      appBar: AppBar(
        actions: [],
        title: Text('Page Dos'),
        backgroundColor: Colors.transparent,
      ),
      body: Center(
        child: MaterialButton(
          onPressed: () {
            RouteTransitions(
              context: context,
              child: UnoPage(),
              animation: AnimationType.normal,
              duration: Duration(milliseconds: 2000),
              replacement: true,
              curveType: CurveType.decelerate,
            );
          },
          color: Colors.white,
          child: Text('Go to Page Uno'),
        ),
      ),
    );
  }
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

This package helps how to manage transitions between different views/pages with custom curve animation also.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_route_transition_peterpaulez