본문 바로가기

카테고리 없음

FlutterWidget 정리2

- Tutorial Screen

Stateful widget

void _onNextTap

DefualtTabController -> 스와이프 가능한 페이지를 생성해줌, 어느 페이지에 있는지 알려줌

( length : 3

Scaffold

body : SafeArea(

TabBarView (required controller

children

Padding(padding :

Column

children

Text

Gaps.v20,

Text

bottomNavigationBar : BottomAppBar

child : Container

padding:

child: Row(

mainAxisAlignment

children : const[TabPageSelector()]) -> 화면 전환 상황을 보여줌

 

enum Direction {right, left}

enum Page {first, second}

void _onPanUpdate(DragUpdateDetails details){

details

}

 

return GestureDetector(

onPanUpdate-> 사용자 드래그 감지 : _onPanUpdate

onPanEnd -> 사용자 드래그 끝남 감지 : _onPanEnd

child : Scaffold(

body :

SafeArea (

AnimatedCrossFade(
firstChild:화면

secondChild:화면

crossFadeState: CorssFadeState.showFirst,

duration:),),)

 

- BottomNavigationBar

bottomNavigationBar: BottomNavigationBar(

type: BottomNavigationBarType : shifting -> or fixed

selectedItemColor: Theme.of(context).primaryColor,

items : [

BottomNavigationBarItem(

icon: FaIcon(FontAwesomeIcons.house),

label:"Home",

tooltip:"what are you"),

BottomNavigationBarItem(

icon: FaIcon(FontAwesomeIcons.house),

label:"Home",

tooltip:"what are you")

 

NavigationBar(

destinations : const [

NavigationDestination])

 

Stack(

Offstage(

offstage: _selectedIndex != 0,

child: StfScreen()))

 

navigator.push는 화면 위에 화면을 올리는거임

이전 화면으로 돌아갈 수 있으므로 이걸 막아야함

pushAndRemoveUntil로 원하는 개수의 화면을 없앨 수 있음