본문 바로가기
개발/Flutter

Flutter 플러터 화면 전환 애니메이션 삭제 간단 사용법 Navigator Animation

by SPNK 2022. 12. 25.
반응형

코드 작성

  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: ElevatedButton(
        child: Text(
          "메인 화면 이동",
        ),
        onPressed: () {
               
          Navigator.push(
            context,
            PageRouteBuilder(
              pageBuilder: (BuildContext context, Animation<double> animation1,
                  Animation<double> animation2) {
                return MyApp(); //변경 필요
              },
              transitionDuration: Duration.zero,
              reverseTransitionDuration: Duration.zero,
            ),
          );
                    
        },
      ),
    ));
  }
}

 


참고할만한 글

 

Flutter 플러터 Progress bar 진행바 간단 구현 LinearProgressIndicator

코드 예시 import 'package:flutter/material.dart'; class MyWidget extends StatefulWidget { const MyWidget({Key? key}) : super(key: key); @override _MyWidgetState createState() => _MyWidgetState(); } class _MyWidgetState extends State { double _progressV

parksh3641.tistory.com

 

Flutter 플러터 진동 간단 사용법 vibration

https://pub.dev/packages/vibration vibration | Flutter Package A plugin for handling Vibration API on iOS, Android, and web. pub.dev 패키지 설치 flutter pub add vibration 코드 작성 import 'package:vibration/vibration.dart'; void OnVibration() { Vi

parksh3641.tistory.com

 

반응형

댓글