Skip to content

Instantly share code, notes, and snippets.

View IhwanID's full-sized avatar

Ihwan IhwanID

View GitHub Profile
@ans-4175
ans-4175 / rfc-template.md
Last active December 1, 2022 17:05 — forked from michaelcurry/rfc-template.md
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)

Related components/issues: (if any)

@codekeyz
codekeyz / .gitlab-cli.yml
Last active March 21, 2020 20:10
Gitlab CI for Flutter Android (Rev 1)
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.2"
ANDROID_SDK_TOOLS: "4333796"
FLUTTER_VERSION: "https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.2.1-stable.tar.xz"
before_script:
- apt-get --quiet update --yes
@mshafer
mshafer / ContentView.swift
Last active May 3, 2023 13:37
Slide-over card (like in Maps or Stocks) using SwiftUI
import SwiftUI
struct ContentView : View {
var body: some View {
ZStack(alignment: Alignment.top) {
MapView()
SlideOverCard {
VStack {
CoverImage(imageName: "maitlandbay")
Text("Maitland Bay")
@stinger
stinger / CombineFetcher.swift
Last active January 28, 2023 18:07
Combine - fetching data using URLSession publishers
import Foundation
import Combine
enum APIError: Error, LocalizedError {
case unknown, apiError(reason: String)
var errorDescription: String? {
switch self {
case .unknown:
return "Unknown error"
# A functional, but probably terrible, example of GitLab CI for Flutter
image: jangrewe/gitlab-ci-android
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.3"
ANDROID_SDK_TOOLS: "26.1.1"
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Builder takes three parameters 1. [BuildContext] which is our context
// 2. [Object] it is the object and 3. it is optional [Widget] child
return Consumer(
builder: (context, Counter counter, _) => Scaffold(
appBar: AppBar(
title: Text("Provider Demo"),
@felangel
felangel / main.dart
Last active December 30, 2023 10:52
[flutter_bloc_recipes] Navigation: Routes
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
runApp(
BlocProvider(
builder: (context) => MyBloc(),
child: MyApp(),
@felangel
felangel / main.dart
Last active September 13, 2021 21:33
[flutter_bloc_recipes] Show SnackBar
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:meta/meta.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active May 1, 2024 21:12
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"