tabcontroller2 Flutter TickerProviderStateMixin Animation 을 만들때, TabBar를 만들때 필수로 사용하게 되는 TickerProviderStateMixin 클래스에 대해서 알아보자 먼저 공식 문서를 살펴보자 https://api.flutter.dev/flutter/widgets/TickerProviderStateMixin-mixin.html TickerProviderStateMixin mixin - widgets library - Dart API Provides Ticker objects that are configured to only tick while the current tree is enabled, as defined by TickerMode. To create an AnimationController in a class that .. 2022. 6. 9. Flutter Tab layout (TabBar, TabBarView, TabController) Flutter에서 tab 레이아웃을 만드는 방법에 대해서 알아보자 우선 flutter에서 tab의 기본구조에 대해서 알아보자면 tab layout을 만들기 위해서는 TabBar, TabBarView, TabController 이렇게 3개의 위젯이 필요하다. TabBar는 상단 tab TabBarView는 tab의 인덱스에 따라 바뀌어야 하는 View 이고 TabController는 이 둘을 연결해 주는 역할을 하는 연결자라고 보면 이해하기 쉽다. 우선 가장 기본적으로 사용하는 방법에 대해서 알아보자. 다음 애니메이션은 flutter.dev에서 제공하는 기본 코드를 실행한 결과 이다. 위 동작을 가능하게 해주는 코드 이다. import 'package:flutter/material.dart'; void m.. 2022. 6. 2. 이전 1 다음