본문 바로가기

Flutter

[j Flutter] GetX 사용하기

728x90
반응형

1. getx plugin 설치

pub.dev/packages/get/install

 

get | Flutter Package

Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX.

pub.dev

 

2. main.dart에서 MaterialApp -> GetMaterialApp로 바꿔준다.

return GetMaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        scaffoldBackgroundColor: Colors.amberAccent,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Home(),
    );

 

 

 

728x90
반응형