Skip to content

Instantly share code, notes, and snippets.

View ChangJoo-Park's full-sized avatar
:octocat:
🌱

ChangJoo Park(박창주) ChangJoo-Park

:octocat:
🌱
View GitHub Profile
@ChangJoo-Park
ChangJoo-Park / empty_padding_icon_button.dart
Created August 28, 2023 00:28
IconButton에서 패딩 제거하기
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@ChangJoo-Park
ChangJoo-Park / outlined_toggle_button.dart
Created August 23, 2023 15:51
Custom icon with button
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@ChangJoo-Park
ChangJoo-Park / whatssub.dart
Last active July 23, 2021 04:55
왓섭 whatssub 온보딩 UI
import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@ChangJoo-Park
ChangJoo-Park / rescript-react-hashmode-router.res
Created May 21, 2021 01:29
Rescript react hashmode routing
@module("./logo.svg") external logo: string = "default"
%%raw(`import './App.css';`)
@react.component
let make = () => {
let url = RescriptReactRouter.useUrl()
switch url.hash {
| "" => <Home />
const { fetch } = useFetch(async () => {
const { data } = await usePrefetchStore("dashboard", "/api/dashboard");
// data를 필요한 변수에 바인딩
})
fetch()
const fetcher = (url) => fetch(url).then(response => response.json())
const store = {}
const defaultPrefetchOption = {
ttl: 1000 * 10,
resetCache: false,
}
/**
@ChangJoo-Park
ChangJoo-Park / app.ts
Last active February 6, 2021 15:39
Simple Deno API Server using standard library
import {
listenAndServe,
ServerRequest,
} from "https://deno.land/std/http/server.ts";
const options: Deno.ListenOptions = { port: 8000 };
class Router {
_get: { [k: string]: (req: ServerRequest) => void } = {};
@ChangJoo-Park
ChangJoo-Park / update_checker.dart
Created June 4, 2020 03:26
Flutter version checker from google play, app store
import 'dart:convert';
import 'dart:io';
import 'package:html/dom.dart';
import 'package:html/parser.dart';
import 'package:dio/dio.dart';
import 'package:pub_semver/pub_semver.dart';
/// 안드로이드 버전을 가져옵니다
///
/// 구글은 API를 제공하지 않습니다