프로그래밍263 [Flutter] Flavor 처리(New Version) Flutter Flavor 처리(Old version) https://kymworld.tistory.com/70 Flavor 처리를 적용하다 Flutter에서 Flavor 시스템을 구축하는 방법에 대해서 조사를 했고 실제로 Android에서는 Flavor, IOS에서는 scheme 정보를 추가하여 flutter의 --flavor 명령어를 사용하여 정상적으로 동작하는 것을 확인했습니다. 이러한 방식은 다음 블로그의 내용을 참고하여 작업을 했으며 BuildConfig에 대한 다트 코드 및 main문에 대한 분기 처리를 제외하고는 동일한 방식으로 개발이 되었습니다. Flavor를 통한 빌드 변형 — PART#1 (안드로이드 사이드) Flavor를 통한 빌드 변형 — PART#2 (iOS 사이드) Flavor를.. 2022. 6. 20. [WebRTC] Real time communication with WebRTC 4 https://codelabs.developers.google.com/codelabs/webrtc-web/#6 7. Set up a signaling service to exchange messages In this step, you'll find out how to: Use npm to install project dependencies as specified in package.json Run a Node.js server and use node-static to serve static files. Set up a messaging service on Node.js using Socket.IO. Use that to create ‘rooms' and exchange messages. Node.js, .. 2022. 6. 19. [Flutter] Provider 성능 최적화 Flutter의 provider라는 패키지를 사용하여 프로그램을 개발하고 있었는데, 어플 실행시 CPU점유율이 너무 높고 발열이 심한 이슈가 있어서 성능 최적화 작업을 진행하게 되었습니다. 개발과정에서도 어플이 느리긴 했는데 디버그 모드 생각해서 크게 이슈라고 생각하지 않았다가 릴리즈 모드에서 성능이 너무 안 좋아서.... ㅠ 개선 방향성 - 모든 화면에 대한 build함수 호출을 줄이는 방향 - rebuild가 필요하더라도 최소한의 리소스를 사용하는 방향(캐싱) Android Native 앱을 프로파일링 했을 때 CPU점유율이 어느 정도 되는지 비교하고 비슷한 수준으로 맞추거나 더 빠르게 만드는 것을 목표로 하고 개선 작업을 진행했습니다. 테스트 내역(Native 수준으로 빨라질 수 있는가?) 더보기 .. 2022. 6. 12. [WebRTC] Real time communication with WebRTC 3 https://codelabs.developers.google.com/codelabs/webrtc-web/#5 6. Use RTCDataChannel to exchange data 대부분의 내용이 이전 섹션과 동일합니다. 결국에는 RTCPeerConnection을 만드는 과정에서 sendChannel과 receiveChannel에 대한 생성과 메시지를 받아서 뷰에 출력해주는 부분, 버튼 막는 처리 등의 전부입니다. start 버튼을 누르면 connection생성을 시작합니다. 로컬 커넥션에서 sendDataChannel을 만드는 부분이 추가가 되어 있습니다. 각 localConnection과 채널에 callback 처리를 해주고 있는데 채널에는 각 뷰에 대한 활성화처리, 로깅이 되어 있고 onicecan.. 2022. 6. 10. [WebRTC] Real time communication with WebRTC 2 https://codelabs.developers.google.com/codelabs/webrtc-web 5. Stream video with RTCPeerConnection In this step you'll find out how to: Abstract away browser differences with the WebRTC shim, adapter.js. Use the RTCPeerConnection API to stream video. Control media capture and streaming. WebRTC Shim과 adapter.js를 사용하여 브라우저간 차이를 추상화 하는 방법 비디오를 스트림하기 위한 RTCPeerConecttion API를 사용하는 방법 미디어 캡처와 스트리밍 관리 .. 2022. 6. 8. [WebRTC] Real time communication with WebRTC 1 https://codelabs.developers.google.com/codelabs/webrtc-web 1. 소개 WebRTC는 실시간 소통을 위한 오픈 소스 프로젝트로 Web과 Native App에서 사용할 수 있습니다. WebRTC는 다양한 JavaScript API를 가지고 있습니다. getUserMedia(): capture audio and video. // 오디오와 비디오를 캡처합니다. MediaRecorder: record audio and video. // 오디오와 비디오를 기록합니다. RTCPeerConnection: stream audio and video between users. // 유저간 오디오와 비디오를 전송합니다. RTCDataChannel: stream data betwe.. 2022. 6. 5. [Flutter] 화면 전환 애니메이션 추가(Screen, Dialog) MaterialPageRoute를 상속받아서 처리하는 방식으로 했다. 밑에 buldTransitions를 override해서 slide 애니메이션을 적용한다. (위 아래) my_page_route.dart import 'package:flutter/material.dart'; SlideTransition getSlideTransition(Animation animation, Widget child) { final tween = Tween(begin: const Offset(0.0, 1.0), end: Offset.zero); final offsetAnimation = animation.drive(tween); return SlideTransition( position: offsetAnimation, ch.. 2022. 6. 2. [Flutter] ScrollToWidget Flutter 개발을 하다보면 특정 위젯의 위치로 Scroll을 하고 싶은 순간이 있다. 이럴 때 다음과 같이 사용을 할 수 있는데 특정 키를 가진 widget을 보이도록 하는 것이다. Scrollable.ensureVisible(key.currentContext!, duration: const Duration(milliseconds: 200), curve: Curves.ease); 예를 들어 스크롤을 해서 내가 원하는 위젯이 중간에 있도록 하고 싶다면, 그 상단에 있는 위젯에 GlobalKey를 주고 해당 키를 이용하여 함수를 호출하면 된다. final scrollKey = GlobalKey(); Container( key: scrollKey, child: null ), 2022. 6. 1. [Flutter] List<Widget>을 ListView로 사용하는 방법 SmartRefresher(controller: notifier.refreshController, enablePullDown: true, enablePullUp: false, header: const ClassicHeader(), onRefresh: () { notifier.loadConf(context); }, child: ListView( children: notifier.confList, ) ), Android로 치면 RefreshLayout 부분을 개발을 하고 있었는데 주어진 형태는 List의 형태가 들어가길 원하고 있었다. pull to refresh라는 라이브러리를 사용하여 개발을 하고 있었고 child에 Column을 감싸고 children에 List의 형태를 주고 있는데 오류를 계속 뿜어내.. 2022. 5. 16. [Flutter] AES 암호화 encrypt 패키지를 사용하고 있습니다. AESKey를 넣어주면 16자리 키보다 작으면 늘리고 크면 16자리로 잘라서 사용합니다. (키를 16자리로 맞춰야 함) 그 외 empty값이 들어오면 죽어가지고 예외 처리 해주고 있습니다. import 'package:encrypt/encrypt.dart'; String encrypt(String strAesKey, String strValue) { if(strValue.isEmpty) { return ""; } if(strAesKey.length < 16) { strAesKey = strAesKey + ' ' * (16 - strAesKey.length); } else { strAesKey = strAesKey.substring(0, 16); } final e.. 2022. 5. 13. 이전 1 ··· 18 19 20 21 22 23 24 ··· 27 다음