Skip to content

Instantly share code, notes, and snippets.

View yeoupooh's full-sized avatar

Thomas Jinwoo Min yeoupooh

View GitHub Profile
@yeoupooh
yeoupooh / main.dart
Last active February 1, 2024 07:16
rotation and scaling in flutter
// 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
@yeoupooh
yeoupooh / main.dart
Last active November 1, 2022 01:49
flutter flex layout example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@yeoupooh
yeoupooh / fenv.bat
Last active October 3, 2021 06:48
Simple Flutter environment changer script inspired by FVM (https://fvm.app/). DISCLAIMER: This is only for my own environment. You can use/modify this what whatever you want but at your own risk.
@echo off
@setlocal
@REM Uncomment to debug
@REM SET _EXEC=echo
@REM Check permission
net session >nul 2>&1
if %errorLevel% neq 0 (
echo ERROR: This script should be run by Administrators.
@yeoupooh
yeoupooh / form_example.dart
Created April 6, 2021 13:09
Form example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final appTitle = 'Flutter Form Demo';
return MaterialApp(
title: appTitle,
@yeoupooh
yeoupooh / listview_example.dart
Created April 4, 2021 02:09
ListView example
//
// ListView example
// Created by Thomas Min
//
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@yeoupooh
yeoupooh / card_widget_sample.dart
Last active April 4, 2021 01:43
Card widget sample
//
// Card widget sample
// https://material.io/components/cards/flutter#theming-a-card
//
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@startuml
autonumber
A -> B: step
activate B
B -> C: step
activate C
# PlantUML Editor
@yeoupooh
yeoupooh / regex.dt
Last active September 25, 2018 02:46
void main() {
var matcher = new RegExp('src="([^"]*)"');
var g = matcher.allMatches('abc class="videoclass" src="source" test>');
print(g.length);
g.forEach((m) {
print('0=${m[0]}, 1=${m[1]}');
});
}
@yeoupooh
yeoupooh / async_in_dart.dart
Last active September 13, 2018 23:38
Async example in dart
import 'dart:async';
Future doSomething() {
print('before future');
var future = new Future(() {
print('before done');
for (var i = 0; i < 1000; i++) {
// do something
}
print('done');