Flutter (29) 썸네일형 리스트형 Flutter - ios 기기 디버깅하며 생긴 오류 1. 애뮬레이터가 없어 Android studio에서 ios emulator가 안열림-> 공간부족이여서 공간 만든 뒤 상단 네비게이터에서 Device에서 추가해줘야함 2. 아이폰 개발자 모드로 설정 3. 앱의 개발자 추가 4. package명 변경 'example'은 안됨 5. Pod 에러- 프로젝트/ios 안에 Pod 파일 추가- Podfile.lock과 pod파일 제거 후 pod install 6. pod파일에서의 ios 버전이 9.00 에서 13으로 변경- Runner에서도 변경 7. open Runner.xcworkspace를 통해서 빌드함 8. 키체인 비밀번호 까먹어 제거 후 새로 생성 9. 아이폰에서 앱 신뢰하기로 변경 10. 맥에서 개발자를 확인할 수 없기 때문에 에러.. Flutter - Mac 개발환경구축 1. SDK 설치 https://docs.flutter.dev/get-started/install/macos/mobile-ios 2. 압축해제 mkdir developcd developunzip ~/Downloads/flutter.zip 3. 전역환경변수 설정 vi ~/.bash_profileexport PATH=${PATH}:~/develop/flutter/binsource ~/.bash_profile flutter --version으로 설치된지 확인하기 Flutter - Emulator의 Webview에 live Server 열기 import 'package:flutter/material.dart';import 'package:webview_flutter/webview_flutter.dart';void main() => runApp(MaterialApp(home: WebViewExample()));class WebViewExample extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: WebViewWidget( controller: WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) .. Flutter - Webview Https가 아닌 http도 열 수 있도록 설정하기 1.android/app/src/main/ 디렉토리 아래에 있는AndroisManifest.xml 파일에서 다음과 같이 수정해준다 android:usesCleartextTraffic="true" 서버 껐다가 다시 키면 됨 flutter) 이미지 사용 1.pubspec.yaml에서 사용할 이미지 디렉토리 설정 flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: assets: - images/ 2. Image 위젯으로 사진 가져오기 import "package:flutter/material.dart"; void main() { runApp(M.. flutter) Image asset > png 투명도 설정 색상에 마우스를 호버하면 색상을 마우스로 선택해 설정할 수 있다. 저 부분을 조정하여 투명도 설정을 할 수 있다 flutter) OutlinedButton을 label과 text로 사용하기 기존에는 일반 OutlinedButton을 사용했는데 아이콘과 함께 들어있는 버튼을 사용해보자 기존 코드 import 'package:flutter/material.dart'; class StartScreen extends StatelessWidget { const StartScreen({super.key}); @override Widget build(context) { return Column( mainAxisSize: MainAxisSize.min, children: [ Image.asset( "assets/images/quiz-logo.png", height: 500, ), const SizedBox( height: 30, ), Text( 'Learn Flutterthe fun way!', styl.. flutter) 기본적인 플러터 구조 숙지를 위한 단순반복연습 플러터의 기본 구조 1. import package:flutter/material.dart 2. main 으로 시작함 3. runApp 안에 있는 위젯을 빌드해줌 4. MaterialApp 을 깔아줌 (책상으로 생각하기) 5. MaterialApp 안에 home이 있다. home에 Scaffold 을 깔아줌 (책상의 홈에 파져있는 곳에 도화지를 깐다고 생각하기) 6. 도화지 위에 body영역에 원하는 위젯 넣기 (여기선 Text위젯만 넣는다.) import 'package:flutter/material.dart'; import 'package:practice/start_screen.dart'; void main() { runApp( const MaterialApp( home: Scaffold( body:.. 이전 1 2 3 4 다음