<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>kodeongee.log</title>
        <link>https://velog.io/</link>
        <description>개발공부중</description>
        <lastBuildDate>Sat, 13 May 2023 14:22:53 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>kodeongee.log</title>
            <url>https://velog.velcdn.com/images/soyeon-noh/profile/f1001b71-2fc1-4156-b4d8-e0d2937e3f43/image.png</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. kodeongee.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/soyeon-noh" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[[Dart 기초18] typedef]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8818-typedef</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8818-typedef</guid>
            <pubDate>Sat, 13 May 2023 14:22:53 GMT</pubDate>
            <description><![CDATA[<h2 id="typedef">typedef</h2>
<ul>
<li>다시한번 확인해보기</li>
<li>어떤상황에 사용되는지 찾아보기</li>
</ul>
<pre><code class="language-dart">void main() {
  Operation operation = add;

  int result = operation(10, 20, 30);

  print(result);

  operation = subtract;

  int result2 = operation(10, 20, 30);

  print(result2);

  // 보통 아래와 같이 사용한다.
  int result3 = calculate(30, 40, 50, add);

  print(result3);

  int result4 = calculate(40, 50, 60, subtract);

  print(result4);
}

// signature
// 시그니처에 부합된 형태의 함수를 갈아끼워서 사용가능.
typedef Operation = int Function(int x, int y, int z);

// 더하기
int add(int x, int y, int z) =&gt; x + y + z;

// 빼기
int subtract(int x, int y, int z) =&gt; x - y - z;

// 보통 아래와 같이 사용한다.
// 계산
int calculate(int x, int y, int z, Operation operation){
  return operation(x, y, z);
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초17] 함수]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8817-%ED%95%A8%EC%88%98</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8817-%ED%95%A8%EC%88%98</guid>
            <pubDate>Sat, 13 May 2023 14:22:30 GMT</pubDate>
            <description><![CDATA[<h2 id="함수">함수</h2>
<ul>
<li>positional parameter</li>
</ul>
<pre><code class="language-dart">void main() {
  addNumbers(10, 20, 40);

  addNumbers(20, 30, 40);

  addNumbers(30);

}

// 세개의 숫자 (x, y, z)를 더하고 짝수인지 홀수인지 알려주는 함수
// parameter / argument - 매개변수

// positional parameter - 순서가 중요한 파라미터
// optional parameter - 있어도 되고 없어도 되는 파라미터

// [] 대괄호를 파라미터에 넣어주면 옵션
// null이 들어갈 수도 있게 작성
// 그러나 null은 숫자연산이 불가능하므로 
// int? 파라미터를 넣는대신 초기값을 설정해주는 것으로 오류를 해결

void addNumbers(int x, [int y = 0, int z = 0]) {
// void addNumbers(int x, [int? y = 0, int? z = 0]) {  
  int sum = x + y + z;

  print(&#39;x : $x&#39;);
  print(&#39;y : $y&#39;);
  print(&#39;z : $z&#39;);

  if(sum % 2 == 0){
    print(&#39;짝수입니다.&#39;);
  } else {
    print(&#39;홀수입니다.&#39;);
  }
}</code></pre>
<ul>
<li>named parameter</li>
<li>파라미터에 중괄호를 넣어준다</li>
</ul>
<pre><code class="language-dart">void main() {
  addNumbers(x: 10, y: 20, z: 40);

  addNumbers(x: 30, y: 40);

}

// named parameter - 이름이 있는 파라미터 (순서가 중요하지 않다.)

void addNumbers({
  required int x,
  required int y,
  int z = 0, // optional parameter 
  // 없어도 되는 파라미터. 대신 기본값을 넣어줌
}){
  int sum = x + y + z;

  print(&#39;x : $x&#39;);
  print(&#39;y : $y&#39;);
  print(&#39;z : $z&#39;);

  if(sum % 2 == 0){
    print(&#39;짝수입니다.&#39;);
  } else {
    print(&#39;홀수입니다.&#39;);
  }
}</code></pre>
<h2 id="return-타입">return 타입</h2>
<ul>
<li>void : 아무것도 반환하지 않는다. (생략가능)</li>
<li>int 등 타입 : 해당 타입을 반환한다.</li>
</ul>
<pre><code class="language-dart">void main() {
  int result = addNumbers(x: 10, y: 20, z: 40);

  addNumbers(x: 30, y: 40);

  print(&#39;sum : $result&#39;);
}

int addNumbers({
  required int x,
  required int y,
  int z = 0,
}){
  int sum = x + y + z;

  print(&#39;x : $x&#39;);
  print(&#39;y : $y&#39;);
  print(&#39;z : $z&#39;);

  return sum;
}</code></pre>
<h2 id="화살표함수">화살표함수</h2>
<pre><code class="language-dart">void main() {
  int result = addNumbers(10, y: 20, z: 40);

  addNumbers(30, y: 40);

  print(&#39;sum : $result&#39;);
}

// 화살표함수 
// 바로다음에 오는 값이 반환값이다.
int addNumbers(int x,{
  required int y,
  int z = 0,
}) =&gt; x + y + z;</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초16] enum]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8816-enum</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8816-enum</guid>
            <pubDate>Sat, 13 May 2023 14:22:13 GMT</pubDate>
            <description><![CDATA[<h2 id="enum">enum</h2>
<ul>
<li>고정되어있는 몇 가지 변수를 하나의 타입으로 만들어서 사용</li>
</ul>
<pre><code class="language-dart">// enum
enum Status{
  approved, // 승인
  pending, // 대기
  rejected, //거절
}

// 타입이 몇가지밖에 없는지 알려주고
// 오타도 방지함
void main() {
  Status status = Status.approved;

  print(status);

  if(status == Status.approved){
    print(&#39;승인입니다.&#39;);
  } else if(status == Status.pending){
    print(&#39;대기입니다.&#39;);
  } else {
    print(&#39;거절입니다.&#39;);
  }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초15] while문]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8815-while%EB%AC%B8</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8815-while%EB%AC%B8</guid>
            <pubDate>Sat, 13 May 2023 14:21:49 GMT</pubDate>
            <description><![CDATA[<h2 id="while">while</h2>
<pre><code class="language-dart">void main() {
// while loop

  int total = 0;

  while (total &lt; 10) {
    total += 1;
  }

  print(total);

// do while 문
  total = 0;

  do {
    total += 1;
  } while (total &lt; 10);

  print(total);

// break를 사용한 경우
  total = 0;

  while (total &lt; 10) {
    total += 1;

    if (total == 5) {
      break;
    }
  }

  print(total);
}</code></pre>
<h3 id="출력결과">출력결과</h3>
<pre><code class="language-dart">10
10
5</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초14] while문]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8814-while%EB%AC%B8</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8814-while%EB%AC%B8</guid>
            <pubDate>Fri, 12 May 2023 14:35:22 GMT</pubDate>
            <description><![CDATA[<h2 id="while">while</h2>
<pre><code class="language-dart">void main() {
// while loop

  int total = 0;

  while (total &lt; 10) {
    total += 1;
  }

  print(total);

// do while 문
  total = 0;

  do {
    total += 1;
  } while (total &lt; 10);

  print(total);

// break를 사용한 경우
  total = 0;

  while (total &lt; 10) {
    total += 1;

    if (total == 5) {
      break;
    }
  }

  print(total);
}</code></pre>
<h3 id="출력결과">출력결과</h3>
<pre><code class="language-dart">10
10
5</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초14] for / for in 반복문]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8814-for-for-in-%EB%B0%98%EB%B3%B5%EB%AC%B8</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8814-for-for-in-%EB%B0%98%EB%B3%B5%EB%AC%B8</guid>
            <pubDate>Fri, 12 May 2023 14:35:00 GMT</pubDate>
            <description><![CDATA[<h2 id="for-loop">for loop</h2>
<pre><code class="language-dart">void main(){

  // for loop
  for(int i = 0; i &lt; 10; i++){
    print(i);
  }

  int total = 0;

  List&lt;int&gt; numbers = [1,2,3,4,5,6];

  for(int i = 0; i &lt; numbers.length; i++){
    total += numbers[i];
  }

  print(total);

}</code></pre>
<h3 id="출력결과">출력결과</h3>
<pre><code class="language-dart">0
1
2
3
4
5
6
7
8
9
21</code></pre>
<h2 id="for-in-loop">for-in loop</h2>
<ul>
<li>요소가 직접 number에 담김 (not index)</li>
</ul>
<pre><code class="language-dart">total = 0;

  for(int number in numbers){
    print(number);
    total += number;
  }

  print(total);</code></pre>
<h3 id="출력결과-1">출력결과</h3>
<pre><code class="language-dart">1
2
3
4
5
6
21</code></pre>
<h2 id="brack-사용">brack 사용</h2>
<pre><code class="language-dart">  total = 0;

  for (int i = 0; i &lt; 10; i++) {
    total += 1;
    if (total == 5) {
      break;
    }
  }

  print(total);</code></pre>
<h3 id="출력결과-2">출력결과</h3>
<pre><code class="language-dart">5</code></pre>
<h2 id="continue-사용">continue 사용</h2>
<pre><code class="language-dart">void main() {

  for(int i = 0; i &lt; 10; i++){
    if(i == 5){
      continue;
    }
    print(i);
  }
}</code></pre>
<h3 id="출력결과-3">출력결과</h3>
<pre><code class="language-dart"></code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초13] switch문]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8813-switch%EB%AC%B8</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8813-switch%EB%AC%B8</guid>
            <pubDate>Fri, 12 May 2023 14:34:31 GMT</pubDate>
            <description><![CDATA[<h2 id="switch-문">switch 문</h2>
<ul>
<li>break를 꼭 넣어줘야 한다.</li>
</ul>
<pre><code class="language-dart">void main(){

  //switch 문

  int number = 3;

  switch(number % 3){
    case 0:
      print(&#39;나머지가 0입니다.&#39;);
      break;

    case 1:
      print(&#39;나머지가 1입니다.&#39;);
      break;

    default:
      print(&#39;나머지가 2입니다.&#39;);
      break;
  }

}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초12] if문]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8812-if%EB%AC%B8</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8812-if%EB%AC%B8</guid>
            <pubDate>Fri, 12 May 2023 14:34:08 GMT</pubDate>
            <description><![CDATA[<h2 id="if---else">if - else</h2>
<pre><code class="language-dart">void main(){

  // if 문

  int number = 3;

  // number가 짝수면
  if(number % 2 == 0){
     print(&#39;값이 짝수입니다.&#39;);
  } else {
    print(&#39;값이 홀수입니다.&#39;);
  }

  // 조건 연동
  if(number % 3 == 0){
    print(&#39;나머지가 0입니다.&#39;);
  }else if(number % 3 == 1){
    print(&#39;나머지가 1입니다.&#39;);
  }else {
    print(&#39;나머지가 2입니다.&#39;);
  }
}</code></pre>
<h2 id="출력결과">출력결과</h2>
<pre><code class="language-dart">값이 홀수입니다.
나머지가 0입니다.</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초11] Set 타입]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8811-Set-%ED%83%80%EC%9E%85</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8811-Set-%ED%83%80%EC%9E%85</guid>
            <pubDate>Thu, 11 May 2023 15:00:20 GMT</pubDate>
            <description><![CDATA[<h2 id="set">Set</h2>
<ul>
<li>중복이 없다.</li>
</ul>
<pre><code class="language-dart">void main(){

  // Set
  // 중복값이 들어갈 수 없다.
  final Set&lt;String&gt; names = {
    &#39;Kodeongee&#39;,
    &#39;Flutter&#39;,
    &#39;Black Pink&#39;,
    &#39;Flutter&#39;
  };

  print(names);

  // 추가
  names.add(&#39;Jenny&#39;);

  print(names);

  // 삭제
  names.remove(&#39;Jenny&#39;);

  print(names);

  // 요소를 포함하고 있는지 검색
  print(names.contains(&#39;Flutter&#39;));

}</code></pre>
<h2 id="실행결과">실행결과</h2>
<pre><code class="language-dart">{Kodeongee, Flutter, Black Pink}
{Kodeongee, Flutter, Black Pink, Jenny}
{Kodeongee, Flutter, Black Pink}
true</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초10] Map 타입]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8810-Map-%ED%83%80%EC%9E%85</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%8810-Map-%ED%83%80%EC%9E%85</guid>
            <pubDate>Thu, 11 May 2023 14:59:19 GMT</pubDate>
            <description><![CDATA[<h2 id="map">Map</h2>
<ul>
<li><p>key : value 의 자료구조</p>
<pre><code class="language-dart">void main(){
// Map
// Key : Value 의 자료구조
// List와 마찬가지로 타입을 지정해줘야 한다.

Map&lt;String, String&gt; dictionary = {
  &#39;Harry Potter&#39; : &#39;해리포터&#39;,
  &#39;Ron Weasley&#39; : &#39;론 위즐리&#39;,
  &#39;Hermione Granger&#39; : &#39;헤르미온느 그레인저&#39;,
};

print(dictionary);

Map&lt;String, bool&gt; isHarryPotter = {
  &#39;Harry Potter&#39; : true,
  &#39;Ron Weasley&#39; : true,
  &#39;Ironman&#39; : false,
};

print(isHarryPotter);

</code></pre>
</li>
</ul>
<p>  // Map의 key값으로 value 가져오기
  print(isHarryPotter[&#39;Ironman&#39;]);
}</p>
<pre><code>
## Map에 값 추가, 수정하기

- addAll() 사용
- 직접 넣기

```dart
// Map에 key:value 추가하기 1 - addAll 함수 사용
  isHarryPotter.addAll({
    &#39;Spiderman&#39; : false,
  });

  print(isHarryPotter);


  // Map에 key:value 추가하기 2 - 직접 key, value 작성
  isHarryPotter[&#39;Hulk&#39;] = false;

  print(isHarryPotter);

  // 기존에 있던 key값을 통해 value를 수정할 수 있다.
  isHarryPotter[&#39;Spideman&#39;] = true;

  print(isHarryPotter);</code></pre><h2 id="map에-값-삭제하기">Map에 값 삭제하기</h2>
<pre><code class="language-dart"> Map&lt;String, bool&gt; isHarryPotter = {
    &#39;Harry Potter&#39; : true,
    &#39;Ron Weasley&#39; : true,
    &#39;Ironman&#39; : false,
  };


  print(isHarryPotter);

  // Map의 key-value 쌍 삭제하기
  isHarryPotter.remove(&#39;Harry Potter&#39;);

  print(isHarryPotter);</code></pre>
<h2 id="map-의-key와-value값들-가져오기">Map 의 key와 value값들 가져오기</h2>
<pre><code class="language-dart">  // key, value 값들 가져오기
  print(isHarryPotter.keys);
  print(isHarryPotter.values);</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초9] List 타입]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%889-List-%ED%83%80%EC%9E%85</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%889-List-%ED%83%80%EC%9E%85</guid>
            <pubDate>Wed, 10 May 2023 12:10:51 GMT</pubDate>
            <description><![CDATA[<h3 id="list">List</h3>
<p>배열 구조를 List라고 한다.</p>
<pre><code class="language-dart">void main(){
  // List
  // 리스트

  // 타입을 지정해줘야한다.
  List&lt;String&gt; blackPink = [&#39;제니&#39;, &#39;지수&#39;, &#39;로제&#39;, &#39;리사&#39;];
  List&lt;int&gt; numbers = [1, 2, 3, 4, 5, 6];


  print(blackPink);
  print(numbers);

  // index
  // 순서
  // 0 부터 시작
  // List옆에 대괄호를 열고 순서를 적어준다.
  print(blackPink[1]);
  print(blackPink[0]);

  // List 길이 확인
  print(blackPink.length);

  // List에 값 추가
  blackPink.add(&#39;코덩이&#39;);

  print(blackPink);

  // List에 값 제거
  blackPink.remove(&#39;코덩이&#39;);

  print(blackPink);

  // 값의 index 구하기
  print(blackPink.indexOf(&#39;로제&#39;));

}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초8] 논리연산자]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%888-%EB%85%BC%EB%A6%AC%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%888-%EB%85%BC%EB%A6%AC%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Wed, 10 May 2023 12:05:42 GMT</pubDate>
            <description><![CDATA[<h2 id="논리연산자">논리연산자</h2>
<pre><code class="language-dart">void main(){
  // &amp;&amp; - and 조건
  bool result = 12 &gt; 10 &amp;&amp; 1 &gt; 0;

  print(result);

  bool result2 = 12 &gt; 10 &amp;&amp; 0 &gt; 1;

  print(result2);

  // || - or 조건
  bool result3 = 12 &gt; 10 || 1 &gt; 0;

  print(result3);

  bool result4 = 12 &gt; 10 || 0 &gt; 1;

  print(result4);

  bool result5 = 12 &lt; 10 || 0 &gt; 1;

  print(result5);


}</code></pre>
<h3 id="출력결과">출력결과</h3>
<blockquote>
<p>true
false
true
true
false</p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초7] 타입 비교연산자]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%886-%ED%83%80%EC%9E%85-%EB%B9%84%EA%B5%90%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%886-%ED%83%80%EC%9E%85-%EB%B9%84%EA%B5%90%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Wed, 10 May 2023 12:02:29 GMT</pubDate>
            <description><![CDATA[<h3 id="타입-비교연산자-is">타입 비교연산자 is</h3>
<pre><code class="language-dart">void main(){
  int number1 = 1;

  print(number1 is int);
  print(number1 is String);

  print(number1 is! int);
  print(number1 is! String);
}</code></pre>
<h3 id="출력-결과">출력 결과</h3>
<blockquote>
<p>true
false
false
true</p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초6] 비교연산자]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%886-%EB%B9%84%EA%B5%90%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%886-%EB%B9%84%EA%B5%90%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Wed, 10 May 2023 12:01:05 GMT</pubDate>
            <description><![CDATA[<h3 id="비교연산자">비교연산자</h3>
<pre><code class="language-dart">void main(){
  int number1 = 1;
  int number2 = 2;

  print(number1 &gt; number2);
  print(number1 &lt; number2);
  print(number1 &gt;= number2);
  print(number1 &lt;= number2);
  print(number1 == number2);
  print(number1 != number2);
}</code></pre>
<h3 id="출력결과">출력결과</h3>
<blockquote>
<p>false
ture
false
true
false
true</p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초5] ??= (null조건 대입)]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%885-operator-%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%885-operator-%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Wed, 10 May 2023 11:51:07 GMT</pubDate>
            <description><![CDATA[<h2 id="">??=</h2>
<p>변수가 null인 경우 오른쪽 값을 대입해라.</p>
<pre><code class="language-dart">void main(){
  // null

  double? number = 4.0;

  print(number);

  number = 2.0;

  print(number);

  number = null;

  print(number);

  // number가 null일 때 오른쪽 값으로 바꿔라
  number ??= 3.0;

  print(number);
}</code></pre>
<blockquote>
<h3 id="결과">결과</h3>
<p>4.0
2.0
null
3.0</p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초4] operator 연산자]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%884-operator-%EC%97%B0%EC%82%B0%EC%9E%90</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%884-operator-%EC%97%B0%EC%82%B0%EC%9E%90</guid>
            <pubDate>Sun, 07 May 2023 06:40:24 GMT</pubDate>
            <description><![CDATA[<h2 id="사칙연산--나머지연산">사칙연산 + 나머지연산</h2>
<pre><code class="language-dart">void main(){
  int number = 2;

  print(number);
  print(number + 2);
  print(number - 2);
  print(number * 2);
  print(number / 2);

  print(&#39;----------------&#39;);
  print(number % 2);
  print(number % 3);

  print(number);
  print(&#39;----------------&#39;);

  number ++;

  print(number);

  number --;

  print(number);
}</code></pre>
<h2 id="재저장">재저장</h2>
<pre><code class="language-dart">void main(){
  double number = 4.0;

  print(number);

  number += 1;

  print(number);

  number -= 1;

  print(number);

  number *= 2;

  print(number);

  number /= 2;

  print(number);
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초3] final, const 변경불가]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%883-final-const-%EB%B3%80%EA%B2%BD%EB%B6%88%EA%B0%80</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%883-final-const-%EB%B3%80%EA%B2%BD%EB%B6%88%EA%B0%80</guid>
            <pubDate>Sun, 07 May 2023 06:38:31 GMT</pubDate>
            <description><![CDATA[<h2 id="final과-const">final과 const</h2>
<ul>
<li>final과 const 모두 한번 변수에 선언한 값을 재변경할 수 없음</li>
<li>둘다 타입생략 가능</li>
</ul>
<pre><code class="language-dart">void main(){
  final String name = &#39;코덩이&#39;;

  print(name);

  const String name2 = &#39;블랙핑크&#39;;

  print(name2);

  // final과 const 모두 한번 선언한 값을 변경할 수 없음
//   name = &#39;블랙핑크&#39;;
//   name2 = &#39;코덩이&#39;;

  // final과 const는 var기능을 해준다.
  // 타입을 생략해도 된다.
  final name3 = &#39;코덩이&#39;;
  const name4 = &#39;블랙핑크&#39;;
}</code></pre>
<h2 id="datetime">DateTime</h2>
<ul>
<li>현재시간을 변수에 저장할 수 있게 해준다.</li>
</ul>
<pre><code class="language-dart">  DateTime now1 = DateTime.now();
  print(now1);
  DateTime now2 = DateTime.now();

  // 코드가 실행될 순간의 시간을 알려준다.
  // now1와 now2는 엄밀히 말하면 다른 시간이다.
  // 너무빨리 실행되어서 같은 시간이 나오지만 
  // 둘의 실행시간엔 차이가 있다.</code></pre>
<h2 id="final과-const의-차이점">final과 const의 차이점</h2>
<ul>
<li>const는 빌드타임에 값을 알고 있어야 한다.</li>
<li>= 코드를 작성하는 순간에 값을 알고 있어야 한다.</li>
</ul>
<pre><code class="language-dart">  // final은 빌드타임에 값을 알고 있지 않아도 된다.
  final DateTime now3 = DateTime.now();

  // const는 빌드타임에 값을 알고 있어야 한다.
  // 코드를 작성하는 순간에 값을 알고 있어야 한다. 
//   const DateTime now2 = DateTime.now();

</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초2] nullable]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%882-nullable</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%882-nullable</guid>
            <pubDate>Sun, 07 May 2023 06:35:26 GMT</pubDate>
            <description><![CDATA[<h3 id="non-nullable과-nullable">non-nullable과 nullable</h3>
<pre><code class="language-dart">void main(){
  // null - 아무런 값도 있지 않다.

  // non-nullable - null이 될 수 없다.  
  String name = &#39;코덩이&#39;;

  print(name);

//   name = null;


  // nullable - null이 될 수 있다.
  // 타입 뒤에 물음표를 작성한다.
  String? name2 = &#39;블랙핑크&#39;;

  name2 = null;

  print(name2);

  // name2는 절대 null이 아니다
  // 변수 뒤에 느낌표를 작성한다.
  print(name2!);

}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Dart 기초1] 변수타입]]></title>
            <link>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%881-%EB%B3%80%EC%88%98%ED%83%80%EC%9E%85</link>
            <guid>https://velog.io/@soyeon-noh/Dart-%EA%B8%B0%EC%B4%881-%EB%B3%80%EC%88%98%ED%83%80%EC%9E%85</guid>
            <pubDate>Sun, 07 May 2023 06:34:22 GMT</pubDate>
            <description><![CDATA[<h2 id="var">var</h2>
<pre><code class="language-dart">void main() {

  // 변수
  // variable

  // 자동으로 오른쪽 값을 유추한다.
  // var라는 타입은 없다.

  // Map&lt;String, Map&lt;int, List&lt;double&gt;&gt;&gt; 과 같아 복잡한 타입이 아닌 경우엔 
  // var사용은 지양하자.
  var name1 = &#39;코덩이&#39;;
  var name2 = &#39;레드벨벳&#39;;

  name1 = &#39;레드벨벳&#39;;
  print(name1);

  // 변수의 값이 실행이 되는 순간에 어떤 값인지 알려줌
  print(name1.runtimeType);
</code></pre>
<h2 id="int">int</h2>
<pre><code class="language-dart">  // 정수
  // integer
  int number1 = 2;
  int number2 = 4;

  print(number1 + number2);
  print(number1 - number2);
  print(number1 / number2);
  print(number1 * number2);</code></pre>
<h2 id="double">double</h2>
<pre><code class="language-dart">  // 실수
  // double
  double number3 = 2.5;
  double number4 = 0.5;</code></pre>
<h2 id="bool">bool</h2>
<pre><code class="language-dart">  // 맞다 / 틀리다
  // Boolean
  bool isTrue = true;
  bool isFalse = false;

  print(isTrue);
  print(isFalse);</code></pre>
<h2 id="string">String</h2>
<pre><code class="language-dart">  // 글자
  // String
  String name3 = &#39;코덩이&#39;;
  String name4 = &#39;레드벨벳&#39;;

  print(name3);
  print(name4);

  // String은 덧셈 가능
  print(name3 + name4);
  // 변수 하나만 있을 땐 괄호 없어도 됨
  // 함수를 사용할 경우 괄호 필수
  print(&#39;$name3는 천재&#39;);
  print(&#39;${name4.runtimeType}도 천재&#39;);</code></pre>
<h2 id="dynamic">dynamic</h2>
<pre><code class="language-dart"> //dynamic
  dynamic name5 = &#39;코덩이&#39;;
  dynamic number5 = 1;
  print(name5);
  print(number5);

  // var와 dynamic 의 공통점
  // 자동으로 오른쪽 값의 속성을 유추.
  // runtimeType도 같다
  var name6 = &#39;블랙핑크&#39;;
  print(name6.runtimeType);
  print(name5.runtimeType);

  // var와 dynamic 의 차이점
  // var는 다른 타입으로 바꿀 수 없다.
//   name6 = 2;
  // dynamic은 다른 타입으로 바꿀 수 있다.
  name5 = 5;
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[전장가자 리뉴얼]]></title>
            <link>https://velog.io/@soyeon-noh/%EC%A0%84%EC%9E%A5%EA%B0%80%EC%9E%90-%EB%A6%AC%EB%89%B4%EC%96%BC-%EA%B3%84%ED%9A%8D</link>
            <guid>https://velog.io/@soyeon-noh/%EC%A0%84%EC%9E%A5%EA%B0%80%EC%9E%90-%EB%A6%AC%EB%89%B4%EC%96%BC-%EA%B3%84%ED%9A%8D</guid>
            <pubDate>Sun, 07 May 2023 06:09:09 GMT</pubDate>
            <description><![CDATA[<h1 id="계획">계획</h1>
<p>7월 4일부터 시작해서 2주 정도 걸려 완성한 어플인 ‘전장가자’는 8월 11일 구글 스토어에 올라갔다. 고맙게도 현재까지 500명 이상의 유저들이 사용해주고 계신다.</p>
<p><img src="https://velog.velcdn.com/images/soyeon-noh/post/0238f668-6026-4993-a31c-b57270a2369d/image.png" alt=""></p>
<p><img src="https://velog.velcdn.com/images/soyeon-noh/post/3761bb23-fb97-4d45-8b09-836c1bb64710/image.jpg" alt=""></p>
<p>  Flutter의 F도 몰랐을 때 쉽게 생각하고 3일을 목표로 잡아 시작한 프로젝트는 예상 계획의 4배가 걸렸다. 제대로된 공부를 하고 만든 게 아니라서 저 작은 어플 안에 아주 엉망진창인 코드가 가득했다! 새로운 기능이 필요하다는 사용자들의 요구도 존재했지만 취업이 급한 나머지 몇달동안 방치해뒀다. (…)</p>
<p>  몇군데 넣었던 백엔드 면접을 다 떨어지고 나서 한동안 멘탈관리에 힘썼었다. 그러다 최근 가장 즐겁게 했던 일이 뭔가 생각해보니 이 어플을 만들 때였었다. 제주도에 놀러가서까지 코드생각에 노트북을 켰던 그 순간들이 떠올랐다.</p>
<p>  다시 지금으로 돌아와서, 나는 플러터로 취직 하기로 마음먹었다. 새롭게 강의를 결제하고 언어부터 공부하는데 너무 즐거웠다. 아직 기초를 공부하고 있지만 이전보다 멋진 코드를 작성할 수 있을 것 같아서 내 첫 어플인 ‘전장가자’를 리뉴얼해보려고 한다.</p>
<ul>
<li>목표기간 : 3주</li>
<li>목표<ul>
<li>ios도 서비스</li>
<li>광고 넣기</li>
<li>디자인 변경</li>
<li>네비게이션바 추가</li>
<li>캘린더 기능 추가</li>
<li>실시간 전장 매칭 정보 기능 추가</li>
</ul>
</li>
</ul>
<h3 id="ios-광고">ios, 광고</h3>
<p>가장 많은 요구가 ios도 가능하게 해달라는 거였다… 1년에 약 16만원을 지불해야해서 곤란했었는데 이번에 코딩커미션을 열어 어느정도 돈이 모이면 ios로도 배포해볼 생각이다. 혹시 부족할 경우를 대비해 광고도 넣어보기로 했다.</p>
<h3 id="네비게이션바">네비게이션바</h3>
<p>  네비게이션에 대한 공부도 해놓은 상태라 네비게이션바 추가는 문제 없을 것 같다. 캘린더 기능은 공부를 조금 더 해봐야할 것 같지만 CURD가 있는 게 아니니 어렵지는 않을 것 같다. </p>
<h3 id="실시간-전장-매칭-정보">실시간 전장 매칭 정보</h3>
<p>  문제는 실시간 전장 매칭 정보 기능이다. 가벼운 backend가 필요할 것 같은데 firebase로 해결이 될 것 같기도 하다. 아직 flutter에 DB연동을 해본 적이 없어 걱정이지만 웹에서 프론트와 백 전부를 해보았으니 어떻게든 되지 않을까 생각하고 있다. 그래도 어느정도 공부를 겸해야해서 기간을 넉넉하게 3주로 잡았다.</p>
<hr>
<h1 id="중간-결과">중간 결과</h1>
<ul>
<li>목표 달성도<ul>
<li>ios도 서비스  ❌</li>
<li>광고 넣기 ❌</li>
<li>디자인 변경 ⭕</li>
<li>네비게이션바 추가 ⭕</li>
<li>캘린더 기능 추가 ❌</li>
<li>실시간 전장 매칭 정보 기능 추가 ⭕</li>
</ul>
</li>
</ul>
<p><img src="https://velog.velcdn.com/images/soyeon-noh/post/493a0e69-45e7-412c-87ed-4111202e09fa/image.jpg" alt=""></p>
<p>캘린더 기능을 제외하고 앱 내적으로 업데이트를 완료했다. 새 버전도 구글 스토어에 업로드되어 사용자들에게 적용되어있는 상태다.</p>
<h3 id="디자인">디자인</h3>
<p>친구에게 아이콘을 부탁해 적용했더니 훨씬 직관적이고 알아보기 쉬워졌다. </p>
<h3 id="네비게이션바-1">네비게이션바</h3>
<p>기존 햄버거버튼에서 네비게이션바로 바꾸니 사용자가 터치해야하는 횟수가 줄고 앱 전체적인 시스템이 한번에 보여서 만족스럽다.</p>
<h3 id="실시간-전장-매칭-정보-1">실시간 전장 매칭 정보</h3>
<p>실시간 전장 매칭 정보는 Stream과 firebase를 이용하여 데이터베이스의 매칭 유저 수를 실시간으로 전달하였다. </p>
<p>하지만 매칭버튼을 누른 후 어플을 껐다 켰을 경우 또 다시 매칭이 되는 문제가 발생하였다. 각 사용자별로 한번씩만 누를 수 있게 하기 위해 로그인 기능이 떠올랐지만 이렇게 간단한 기능의 어플에서 불편한 로그인을 추가할 필요는 없다고 생각한다. 이건 앞으로 해결해야할 문제로 남겨두기로 했다.</p>
<p>또한 24시간마다 0으로 갱신되어야 하는 문제가 발생하였는데 데이터베이스 구조를 단순화하기위해 숫자 하나만을 데이터베이스에 저장하여 발생한 문제였다. 이는 데이터구조를 변경하여 날짜와 숫자를 모두 저장하여 날짜가 변경된 경우 초기화하는 코드를 작성하여 해결했다. </p>
]]></description>
        </item>
    </channel>
</rss>