Hero Animation

 

[Ko]

 - Hero Animation 특징 : 2 x Hero widget (1st, 2md screen 각각에 Hero widget 있어야 .), Shared tag property, Navigator-based screen transition

 - Hero 적용 : navigator 연결된 이상의 화면에서 양쪽 화면에 동일하게 존재하는 요소(image ) widget Hero widget으로 감싸고, 양쪽 모두에 동일한 tag 설정해주면 .

 

[En]

 - Hero Animation features: 2 x Hero widget (1st, 2md screen must have a Hero widget), Shared tag property, Navigator-based screen transition
 - Hero application: On two or more screens connected by navigator, you can wrap the widgets of elements (image, etc.) that are the same on both screens with the Hero widget, and set the same tag on both sides.

 

 - final code

  1. welcome_screen.dart

Hero(

  tag: 'logo',

  child: Container(

    child: Image.asset('images/logo.png'),

    height: 60.0,

  ),

),

 

  1. login_screen.dart

Hero(

  tag: 'logo',

  child: Container(

    height: 200.0,

    child: Image.asset('images/logo.png'),

  ),

),

'플러터(Flutter) > 플러터 일반(Flutter General)' 카테고리의 다른 글

setup Firebase Project  (0) 2020.03.19
[Dart] Mixins  (0) 2020.03.19
set Named Route  (0) 2020.03.19
Passing Data to a State Object  (0) 2020.03.19
JSON Parsing and Dynamic Types  (0) 2020.03.19

+ Recent posts