Skip to content

Instantly share code, notes, and snippets.

// Note !!
// How Wrap_content ? let size match child height ?
// now not work help me fix it
//Ref : https://stackoverflow.com/questions/50713888/how-to-show-image-from-network-in-flutter-boxdecoration
// https://blog.csdn.net/qq_24531461/article/details/85541613
// Yes i do not want set height or Width or "Width & height "
class UrbanCongratulationsWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
class ItemBuildModify extends StatelessWidget {
final Color color;
ItemBuildModify(this.color );
@override
Widget build(BuildContext context) {
////TODO below fail !! if use Scaffold will get Height infinity error
return
// Scaffold(
@CMingTseng
CMingTseng / ItemSizeCheck.dart
Created December 2, 2021 03:26
ScrollViewItemChildSize.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class ItemSizeCheck extends StatelessWidget {
final Color color;
ItemSizeCheck(this.color );
@override
Widget build(BuildContext context) {
@CMingTseng
CMingTseng / ControllerDemoPage.dart
Created November 29, 2021 08:09
SingleChildScrollView item size
import 'package:flutter/material.dart';
class ControllerDemoPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: new Text(
"ControllerDemoPage",
),
@CMingTseng
CMingTseng / Android-Emulator-on-AWS-EC2.md
Created July 2, 2020 02:42 — forked from yazinsai/Android-Emulator-on-AWS-EC2.md
Installing and running Android Emulator on Amazon AWS EC2 (Ubuntu 16.04 / m5.xlarge)

Getting the Android Emulator running on EC2 📱

# @ your EC2 instance
sudo apt update
sudo apt install openjdk-8-jre unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d android-sdk
sudo mv android-sdk /opt/
export ANDROID_SDK_ROOT=/opt/android-sdk
[wsl2]
kernel=C:\\Users\\JAKA\\vmlinux
@CMingTseng
CMingTseng / tick_locs.py
Created August 17, 2019 14:00 — forked from virus-warnning/ticks_by_location.py
分點進出取資料研究
import os
import re
import requests
import sys
import json
from bs4 import BeautifulSoup
session = requests.Session()
resp = session.get('https://bsr.twse.com.tw/bshtm/bsMenu.aspx')
if resp.status_code == 200:
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
/**
* TODO: Add a class header comment!
*/
public class AspectRatioImageView extends ImageView {
@CMingTseng
CMingTseng / AspectRatioImageView.java
Created March 22, 2019 22:08 — forked from JakeWharton/AspectRatioImageView.java
ImageView that respects an aspect ratio applied to a specific measurement.
// Copyright 2012 Square, Inc.
package com.squareup.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
/** Maintains an aspect ratio based on either width or height. Disabled by default. */
public class AspectRatioImageView extends ImageView {
@CMingTseng
CMingTseng / Rx2ServiceBindingFactory.java
Created February 22, 2019 17:57 — forked from MisterRager/Rx2ServiceBindingFactory.java
Bind to an Android service using RxJava!
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import io.reactivex.Observable;