Flutter web으로 만든 웹 페이지를 Flutter App webview에 띄우고 웹 페이지에서 버튼을 눌렀을 때 네이티브 App에 특정 이벤트를 발생 시키려고 하는데 생각보다 잘 되지 않네요..... 여기저기 자료를 찾아보다가 살짝 방식이 다르다는걸 깨닫고 혹시 삽질 하는 사람이 있을까 봐 글을 남겨 놓아요 ㅎㅎ 먼저 Flutter web 프로젝트의 web 폴더에 script.js 파일을 생성해요. (이름은 뭐로 하든 상관없어요.) script.js function showAlert() { channelName.postMessage("Hello from JS"); } channelName 부분은 Flutter App에서 JavascriptChannel name 부분에 들어갈 이름을 적어주시면 돼요..
Flutter로 웹 페이지 추가 작업이 웹으로 프로젝트를 만들다가 혹시 몰라서 정리를 해두려 해요. 실행 명령어 Html 랜더링 모드로 실행 해요. flutter run --web-renderer html CanvasKit 랜더링 모드로 실행 해요 flutter run --web-renderer canvaskit 빌드 명령어 html 랜더링 모드로 빌드해요 flutter build web --web-renderer html canvaskit 랜더링 모드로 빌드해요 flutter build web --web-renderer canvaskit 응용 방법 canvaskit 랜더링 모드로 빌드 하고 base href를 /web/ 디렉터리로 설정해요. flutter build web --web-renderer ..
그려진 모든 원들은 서로 연결 될수 있게 만들어진 코드이다. 가작 작은원을 child Node라 할때 바로 위의 부모가 가지는 child node 의 개수에 따라 다양한 모양이 나온다. chil node 노드 개수에 따른 모양은 아래와 같다. 1. child node = 1 2. child node = 2 3. child node = 3 4. child node = 4 5. child node = 5 6. child node = 6 7. child node = 7 8. child node = 8 9. child node = 9 10. child node = 10 11. child node = 11 11. child node = 15 11. child node = 30 child node의 개수가 늘어날수..
그냥 아무 이유 없이 도형 그리기 구현 코드 import 'package:flutter/material.dart'; class CirclePyramidPainter extends CustomPainter { final int pyramidSize; final double baseRadius; CirclePyramidPainter({required this.pyramidSize, required this.baseRadius}); @override void paint(Canvas canvas, Size size) { final paint = Paint()..color = Colors.blue; for (int level = 0; level < pyramidSize; level++) { final levelO..
https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20FlashMint ERC 20 - OpenZeppelin Docs For an overview of ERC20 tokens and a walk through on how to create a token contract read our ERC20 guide. There are a few core contracts that implement the behavior specified in the EIP: IERC20: the interface all ERC20 implementations should conform to. I docs.openzeppelin.com transfer (토큰 전송) ..