240528 TIL

나고수·2024년 5월 28일
0

2024 TIL

목록 보기
12/94
post-thumbnail

① 배운 것
1. 키보드가 보일때, 안보일때 ui를 다르게 하기 - textField의 포커스노드를 이용

//키보드 보이는것, 안보이는것 감지하는 코드
class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  final FocusNode _focusNode = FocusNode();

  void isActive(){
    if(_focusNode.hasFocus){
      debugPrint("Keyboard is active");
    }else{
      debugPrint("Keyboard is not active");
    }
  }

  
  void initState() {
    _focusNode.addListener(isActive);
    super.initState();
  }

  
  void dispose() {
    _focusNode.dispose();
    super.dispose();
  }

  
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(focusNode: _focusNode,),
          ],
        ),
      ),
    );
  }
}
  1. 깃헙에 이벤트 발생하면 슬랙 웹훅과 연동
    구독할 수 있는 이벤트는 여기 참고
    슬랙에서 이벤트 구독,구독취소는 이런 식으로 슬랙에 작성한다
/github unsubscribe {팀이름}/{레포이름} {기능}
/github subscribe {팀이름}/{레포이름} {기능}
  1. 특정 링크를 통해 앱을 설치 한것을 감지하는 방법
    android - install referrer api를 제공
    ios - 공식적으로 제공하는 방법은 없고, 해당 링크를 클릭 시 클립보드에 해당 링크 복사, 앱 설치 후 클립보드에 있는 데이터를 불러옴
    private 정리문서

② 회고 (restropective)
오늘 일을 다 잘 끝내고 퇴근해서 기분이 좋았다.

③ 개선을 위한 방법
없음

profile
되고싶다

0개의 댓글