본문 바로가기
반응형

전체 글70

[Flutter] A RenderFlex overflowed by pixels on the bottom 에러 해결 [문제점] Flutter에서 textfield, button을 이용해서 페이지를 만드는 도중 키보드가 버튼의 위를 덮으니 아래와 같은 오류가 생겼다. ======== Exception caught by rendering library ===================================================== The following assertion was thrown during layout: A RenderFlex overflowed by 60 pixels on the bottom. [해결 방법] 문제는 위에서도 말했듯이 키보드가 interaction하는 부분까지 올라와서 오류가 난 것이다. 해결방법은 크게 2가지가 있다. 스크롤 가능하게 하여서 해당 버튼을 키보드 위로 올리기 .. 2022. 2. 2.
[NextJS] npm run build errno -4048, ELIFECYCLE 오류 해결 [문제점] npm run build를 하면 아래와 같은 오류가 나면서 빌드가 정상적으로 되지 않았다. Error: EPERM: operation not permitted, open 'C:\Users\***\.next\trace' Emitted 'error' event on WriteStream instance at: at internal/fs/streams.js:335:14 at FSReqCallback.oncomplete (fs.js:180:23) { errno: -4048, code: 'EPERM', syscall: 'open', path: 'C:\\Users\\***\\.next\\trace' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! music-.. 2022. 2. 1.
[Flutter] ListView.builder Exception caught by rendering library 오류 [문제점] 플러터에서 ListView.builder를 사용하려고 하는데 다음 오류가 나오면서 위젯이 제대로 나오지 않았다. Exception caught by rendering library 이때의 코드는 아래와 같았다. class ListViewExample extends StatelessWidget { const ListViewExample({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Column( children: [ ListView.builder( itemBuilder: (context, index) { return Text(index.toString()); }, itemCount: 5, ).. 2022. 1. 6.
[Flutter] DropdownButton A value of type 'Object?' can't be assigned to a variable of type 'String'. 오류 [문제점] 플러터에 DropdownButton을 구글검색으로 나온 것과 같이 구현하는데 오류가 발생하였다. 오류가 난 코드는 아래와 같다. class DropdownEaxampleState extends State { final List _valueList = ['month', 'two weeks', 'week']; String _selectedValue = 'week'; @override Widget build(BuildContext context) { return DropdownButton( value: _selectedValue, items: _valueList.map((value) { return DropdownMenuItem( value: value, child: Text(value), ); }.. 2022. 1. 5.
[Flutter] Bottom Navigation Bar Item label 없애기 flutter에서 bottomNavigationBar을 사용하면 각각의 아이템에서 icon과 label은 필수적으로 들어가야 한다. 다음과 같이 2개의 아이템을 넣었다고 하자. import 'package:flutter/material.dart'; class MainNavigator extends StatefulWidget { const MainNavigator({Key? key}) : super(key: key); @override _MainNavigatorState createState() => _MainNavigatorState(); } class _MainNavigatorState extends State { @override Widget build(BuildContext context) { re.. 2022. 1. 4.
[Flutter] Name source files using lowercase_with_underscores`. React Native에서는 파일명을 mainPage와 같은 식으로 짓다가 똑같이 flutter에서 했는데 Name source files using `lowercase_with_underscores`.의 경고가 나왔다. 실행이 되지 않는 오류는 아니지만 해결방법을 찾아보니 2가지가 나왔다. 1. ignore: file_names 파일의 첫줄에 다음과 같은 줄을 추가하면 파일 이름을 무시하게 되고 경고가 사라진다 // ignore: file_names 2. 파일이름 수정 플러터에서는 react와 다르게 lowercase with under를 추천한다. 따라서 mainPage가 아니라 소문자로 하고 사이에 언더바를 넣은 main_page.dart 로 파일이름을 바꾸면 경고가 없어진다. 2022. 1. 3.
[Flutter] Container 배경 이미지 넣기 flutter 에서 배경에 이미지를 넣는 방법은 크게 2가지가 있다. Stack을 사용해서 아래에 이미지를 넣을 수도 있고, Container에 decoration을 사용해서 이미지를 넣을 수도 있습니다. 이번 글에서는 decoration을 사용해서 이미지를 넣어보겠습니다. import 'package:flutter/material.dart'; class Page extends StatelessWidget { const Page({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( body: Container( decoration: BoxDecoration( image: Decoration.. 2022. 1. 3.
[Flutter] Error: ADB exited with exit code 1 Performing Streamed Install Error: ADB exited with exit code 1 Performing Streamed Install flutter 개발을 하다가 위와 같은 오류를 만나면 에뮬레이터의 공간이 부족해서 나타난 오류입니다. 에뮬레이터에서 불필요한 앱을 삭제하고 재실행 시키면 다시 작동이 됩니다. 2022. 1. 2.
[Flutter] flutter 프로젝트 android simulator로 실행하기 flutter 프로젝트를 시작하는 명령어는 flutter run이다. 그러나 이를 실행하면 아래와 같은 식으로 Chrome과 Edge중에 선택하라는 것만 나오고 android simulator는 선택지에 없다. Multiple devices found: Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.110 Edge (web) • edge • web-javascript • Microsoft Edge 96.0.1054.62 [1]: Chrome (chrome) [2]: Edge (edge) Please choose one (To quit, press "q/Q"): 이런 이유는 안드로이느 에뮬레이터가 실행되어 있지 않기 때문이다. 따라서 실.. 2022. 1. 1.
반응형