Repositório GitHubUdaraWanasinghe/AwesomePageTransitions

AwesomePageTransitions

UdaraWanasinghe/AwesomePageTransitions open-source repository details.

Capa do projeto AwesomePageTransitions
Estrelas
8
Forks
1
Último push (UTC)
12 de abr. de 2020
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Awesome Page Transitions

Awesome page transitions for Flutter

pub package

Screenshots

Installing

dependencies:
  awesome_page_transitions: ^1.0.0

Demo

Demo application available at https://awesome-page-transitions.web.app/

Using

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Awesome Page Transitions Demo',
      home: MyHomePage(title: 'Awesome Page Transitions Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Container(
        alignment: Alignment.center,
        color: Colors.yellow,
        child: RaisedButton(
          color: Colors.red,
          child: Text("Open"),
          onPressed: () => Navigator.push(
            context,
            AwesomePageRoute(
              transitionDuration: Duration(milliseconds: 600),
              exitPage: widget,
              enterPage: SecondScreen(),
              transition: CubeTransition(),
            ),
          ),
        ),
      ),
    );
  }
}

class SecondScreen extends StatefulWidget {
  @override
  _SecondScreenState createState() => _SecondScreenState();
}

class _SecondScreenState extends State<SecondScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Second Screen"),),
      body: Container(
        alignment: Alignment.center,
        color: Colors.red,
        child: RaisedButton(
          color: Colors.yellow,
          onPressed: () => Navigator.pop(context),
          child: Text("Go Back"),
        ),
      ),
    );
  }
}
UdaraWanasinghe GitHub avatar
Autor no GitHub

UdaraWanasinghe ↗

🎓 BSc (Hons) in Information Technology Graduate | University of Moratuwa | Passionate about Open Source & Tech Entrepreneurship

LinguagensDartMakefileC++HTMLCSwiftKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 2 itens

  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗