Design-loving front-end engineer
Ryong
Design-loving front-end engineer
์ „์ฒด ๋ฐฉ๋ฌธ์ž
์˜ค๋Š˜
์–ด์ œ
    • Framework
    • React
      • Concept
      • Library
      • Hook
      • Component
      • Test
    • NodeJS
    • Android
      • Concept
      • Code
      • Sunflower
      • Etc
    • Flutter
      • Concept
      • Package
    • Web
    • Web
    • CSS
    • Language
    • JavaScript
    • TypeScript
    • Kotlin
    • Dart
    • Algorithm
    • Data Structure
    • Programmers
    • Management
    • Git
    • Editor
    • VSCode
    • Knowledge
    • Voice
Design-loving front-end engineer

Ryong

Dart

[ Dart ] ์—๋Ÿฌ, ์˜ˆ์™ธ ์ƒํ™ฉ ์ œ์–ดํ•˜๊ธฐ

2022. 2. 4. 08:46

assert

๐Ÿ’ฌ  ๊ฐœ๋ฐœ ๋ชจ๋“œ์˜ debug ์ค‘์ผ ๋•Œ์—๋งŒ ์˜ํ–ฅ์„ ๋ฏธ์น˜๋ฉฐ, ๋ฐฐํฌ ์ฝ”๋“œ์—์„œ๋Š” ํ”„๋กœ๊ทธ๋žจ์— ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š์Œ

๐Ÿ’ฌ  ์กฐ๊ฑด์ด ๊ฑฐ์ง“์ธ ๊ฒฝ์šฐ ์‹คํ–‰์ด ์ค‘๋‹จ๋œ๋‹ค.

assert(condition, optionalMessage);

โ—ป๏ธ  condition : boolean์ด ๋‚˜์˜ฌ ์ˆ˜ ์žˆ๋Š” ์กฐ๊ฑด์„ ๋„ฃ์œผ๋ฉฐ, false์ด๋ฉด ํ”„๋กœ๊ทธ๋žจ์ด ์ค‘๋‹จ๋œ๋‹ค.

โ—ป๏ธ  optionalMessage : ํ”„๋กœ๊ทธ๋žจ ์ค‘๋‹จ ์‹œ ๋‚˜์˜ฌ ๋ฉ”์‹œ์ง€๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

assert(urlString.startsWith('https'),
    'URL ($urlString) should start with "https".');

 

...

https://m.blog.naver.com/mingdyuo/221803704762

 

[flutter, dart] ์—๋Ÿฌ, ์˜ˆ์™ธ์ƒํ™ฉ ์ œ์–ดํ•˜๊ธฐ : assert, throw, catch, finally

๋‚ด์šฉ ์ถœ์ฒ˜ : [FLUTTER] DART ์–ธ์–ด ๊ธฐ์ดˆ๊ณผ์ • - 2 / A Tour of the Dart Language A tour of...

blog.naver.com

 

์ €์ž‘์žํ‘œ์‹œ

'Dart' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[ Flutter ] Null Safety  (0) 2022.01.01
[ Dart ] ๊ธฐํƒ€ ์œ ์šฉํ•œ ๊ธฐ๋ฒ•  (0) 2021.12.21
[ Dart ] ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ  (0) 2021.12.21
[ Dart ] ์ปฌ๋ ‰์…˜  (0) 2021.12.21
[ Dart ] ๊ฐ์ฒด ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ  (0) 2021.12.21
    'Dart' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
    • [ Flutter ] Null Safety
    • [ Dart ] ๊ธฐํƒ€ ์œ ์šฉํ•œ ๊ธฐ๋ฒ•
    • [ Dart ] ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ
    • [ Dart ] ์ปฌ๋ ‰์…˜
    Design-loving front-end engineer
    Design-loving front-end engineer
    ๋””์ž์ธ์— ๊ด€์‹ฌ์ด ๋งŽ์€ ๋ชจ๋ฐ”์ผ ์•ฑ ์—”์ง€๋‹ˆ์–ด Ryong์ž…๋‹ˆ๋‹ค.

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”