Skip to content

Instantly share code, notes, and snippets.

View AndrewDongminYoo's full-sized avatar
๐Ÿˆ
My cat is interfering

Dongmin,Yu AndrewDongminYoo

๐Ÿˆ
My cat is interfering
View GitHub Profile
@AndrewDongminYoo
AndrewDongminYoo / sass_compiler.dart
Created September 9, 2025 10:16
Recursively compiles all '*.module.scss' files under directory into sibling '*.module.css' files.
import 'dart:io';
import 'package:path/path.dart' as p;
import 'package:sass/sass.dart' as sass;
/// Recursively compiles all `*.module.scss` files under directory into sibling `*.module.css` files.
void main(List<String> arguments) {
final src = arguments[0];
final srcDir = Directory('$src');
if (!srcDir.existsSync()) {
@AndrewDongminYoo
AndrewDongminYoo / README.md
Created August 1, 2025 01:33
The Overlay Tooltip widget is a set of widgets for implementing an โ€œOnboardingโ€ or โ€œGuided Tourโ€ feature that walks users through a feature by displaying help (tooltips) sequentially over specific UI elements in your app.

๐Ÿ’ฌ Overlay Tooltip ์œ„์ ฏ

์•ฑ์˜ ํŠน์ • UI ์š”์†Œ ์œ„์— ์ˆœ์ฐจ์ ์œผ๋กœ ๋„์›€๋ง(ํˆดํŒ)์„ ํ‘œ์‹œํ•˜์—ฌ ์‚ฌ์šฉ์ž์—๊ฒŒ ๊ธฐ๋Šฅ์„ ์•ˆ๋‚ดํ•˜๋Š” '์˜จ๋ณด๋”ฉ(Onboarding)' ๋˜๋Š” '๊ฐ€์ด๋“œ ํˆฌ์–ด(Guided Tour)' ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•œ ์œ„์ ฏ ์„ธํŠธ์ž…๋‹ˆ๋‹ค.

โœจ ์ฃผ์š” ๊ธฐ๋Šฅ

  • ์ˆœ์ฐจ์  ํˆดํŒ ํ‘œ์‹œ: displayIndex๋ฅผ ํ†ตํ•ด ์ง€์ •๋œ ์ˆœ์„œ๋Œ€๋กœ ํˆดํŒ์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
  • ๋™์  ์œ„์น˜ ๊ณ„์‚ฐ: GlobalKey๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋Œ€์ƒ ์œ„์ ฏ์˜ ์œ„์น˜๋ฅผ ๋™์ ์œผ๋กœ ์ฐพ์•„ ํˆดํŒ์„ ์ •ํ™•ํ•˜๊ฒŒ ๋ฐฐ์น˜ํ•ฉ๋‹ˆ๋‹ค.
  • ์ปค์Šคํ„ฐ๋งˆ์ด์ง•: ์˜ค๋ฒ„๋ ˆ์ด ์ƒ‰์ƒ, ์• ๋‹ˆ๋ฉ”์ด์…˜, ํˆดํŒ ์œ„์น˜ ๋“ฑ ๋‹ค์–‘ํ•œ ์˜ต์…˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ํ๋ฆ„ ์ œ์–ด: TooltipController๋ฅผ ํ†ตํ•ด ํˆดํŒ ํ‘œ์‹œ๋ฅผ ์‹œ์ž‘, ์ค‘์ง€, ์ด๋™ํ•˜๋Š” ๋“ฑ ์™„๋ฒฝํ•˜๊ฒŒ ์ œ์–ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
@AndrewDongminYoo
AndrewDongminYoo / keyboard_visibility.dart
Created May 31, 2025 08:54
A subscriber class for managing keyboard visibility events.
// ๐ŸŽฏ Dart imports:
import 'dart:async';
// ๐Ÿฆ Flutter imports:
import 'package:flutter/services.dart';
/// A subscriber class for managing keyboard visibility events.
///
/// This class allows registering callbacks for keyboard visibility changes,
/// including when the keyboard is shown, hidden, or its visibility state changes.
@AndrewDongminYoo
AndrewDongminYoo / email_validation_strategy.dart
Created April 12, 2025 11:15
Dart class that uses a strategy pattern to check the validity of an email
/// Written with โ€œpowerfulโ€ inspiration from the https://pub.dev/packages/email_validator.
/// An abstract strategy for validating objects of type [T].
///
/// Implementations of this class define specific validation rules
/// for a given type, allowing flexible and reusable validation logic.
abstract class ValidationStrategy<T, E extends Exception> {
/// Validates the given [value] of type [T].
///
/// If the validation fails, an exception of type [E] is thrown.
@AndrewDongminYoo
AndrewDongminYoo / device_info.dart
Created March 21, 2025 13:40
ํ˜„์žฌ ํ”Œ๋žซํผ์„ ๊ฐ์ง€ํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
// ๐Ÿฆ Flutter imports:
import 'package:flutter/foundation.dart';
// ๐Ÿ“ฆ Package imports:
import 'package:device_info_plus/device_info_plus.dart';
// ๐ŸŒŽ Project imports:
import 'platform_utils.dart';
/// ํ˜„์žฌ ํ”Œ๋žซํผ์„ ๊ฐ์ง€ํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
@AndrewDongminYoo
AndrewDongminYoo / platform_utils.dart
Created March 21, 2025 13:38
ํ˜„์žฌ ํ”Œ๋žซํผ์„ ๊ฐ์ง€ํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
// ๐Ÿฆ Flutter imports:
import 'package:flutter/foundation.dart';
/// ํ˜„์žฌ ํ”Œ๋žซํผ์„ ๊ฐ์ง€ํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
sealed class PlatformUtil {
static TargetPlatform get current => defaultTargetPlatform;
/// ์›น ํ”Œ๋žซํผ์ธ์ง€ ์—ฌ๋ถ€๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
static bool get isWeb =>
kIsWeb && !isIOS && !isAndroid && !isWindows && !isMacOS && !isLinux;
@AndrewDongminYoo
AndrewDongminYoo / .sh
Created March 21, 2025 13:35
Execute Fastlane
# ์ฐธ๊ณ ๋กœ ๊ด„ํ˜ธ ์•ˆ์—์„œ cd ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋‹ค์‹œ cd ..์œผ๋กœ ๋‚˜์˜ฌ ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.
(cd android && fastlane release)
# ๋‹ค๋ฅธ Bash์—์„œ
(cd ios && fastlane release)
@AndrewDongminYoo
AndrewDongminYoo / Fastfile
Created March 21, 2025 13:32
android์šฉ Fastfile
File: android/fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
@AndrewDongminYoo
AndrewDongminYoo / Fastfile
Last active March 21, 2025 13:33
iOS์šฉ Fastfile
File: ios/fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
@AndrewDongminYoo
AndrewDongminYoo / Fastfile
Created March 21, 2025 13:28
Fastlane์œผ๋กœ iOS์™€ Android ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ๋ณ‘๋ ฌย ์‹คํ–‰ํ•˜๊ธฐ
# ์ด lane์€ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ์— ์œ„์น˜ํ•œ Fastfile์—์„œ Android์™€ iOS ์•ฑ์„ ๋™์‹œ์— (๋ณ‘๋ ฌ๋กœ) ๋นŒ๋“œ ๋ฐ ๋ฆด๋ฆฌ์ฆˆํ•ฉ๋‹ˆ๋‹ค.
# ๊ฐ ํ”Œ๋žซํผ์˜ ๋ฆด๋ฆฌ์ฆˆ ๊ณผ์ •์„ ๋ณ„๋„์˜ ์Šค๋ ˆ๋“œ๋กœ ์‹คํ–‰ํ•˜์—ฌ, ๋‘ ์ž‘์—…์ด ๋™์‹œ์— ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.
#
# ๋™์ž‘ ๋ฐฉ์‹:
# 1. ๊ณตํ†ต build_number๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. (์˜ต์…˜์ด ์—†์œผ๋ฉด ํ˜„์žฌ ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜์˜ ๋ฒˆํ˜ธ ์‚ฌ์šฉ)
# 2. ์ƒˆ๋กœ์šด ์Šค๋ ˆ๋“œ๋ฅผ ์ƒ์„ฑํ•˜์—ฌ Android ๋””๋ ‰ํ† ๋ฆฌ(๋ฃจํŠธ ๊ธฐ์ค€ ../android)์—์„œ fastlane release lane์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
# 3. ๋˜ ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ๋ฅผ ์ƒ์„ฑํ•˜์—ฌ iOS ๋””๋ ‰ํ† ๋ฆฌ(๋ฃจํŠธ ๊ธฐ์ค€ ../ios)์—์„œ fastlane release lane์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
# 4. ๋‘ ์Šค๋ ˆ๋“œ๊ฐ€ ๋ชจ๋‘ ์ข…๋ฃŒ๋  ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค.
#
# ์ฐธ๊ณ : ์ด ์Šคํฌ๋ฆฝํŠธ๋Š” ๊ฐ๊ฐ์˜ ํ”Œ๋žซํผ ๋””๋ ‰ํ† ๋ฆฌ์—์„œ ๊ฐœ๋ณ„ ์‹คํ–‰ํ•  ๋•Œ์™€ ๋™์ผํ•˜๊ฒŒ ๋™์ž‘ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.