Skip to content

Instantly share code, notes, and snippets.

View RyanRamchandar's full-sized avatar

Ryan Ramchandar RyanRamchandar

View GitHub Profile
@RyanRamchandar
RyanRamchandar / log.profile
Created January 25, 2022 17:47
flutter profile
[ +127 ms] executing: sysctl hw.optional.arm64
[ +28 ms] Exit code 0 from: sysctl hw.optional.arm64
[ +2 ms] hw.optional.arm64: 1
[ +8 ms] executing: [/Users/ryan/Documents/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +15 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ ] executing: [/Users/ryan/Documents/flutter/] git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ +22 ms] Exit code 0 from: git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ ] 2.8.1
[ +11 ms] executing: [/Users/ryan/Documents/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
@RyanRamchandar
RyanRamchandar / log.release
Created January 25, 2022 17:44
flutter release
This file has been truncated, but you can view the full file.
Using `flutter run --release` or just `flutter run` runs without error. However, using `flutter run --profile` gives an error.
## Steps to Reproduce
1. Execute `flutter run --profile`. The following error is given
```shell
% flutter run --profile
Launching lib/main.dart on iPhone 12 Pro in profile mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: KPUPH2Q2AB
@RyanRamchandar
RyanRamchandar / create_symbol_img.dart
Created February 16, 2020 03:38
Flutter widget to Google Maps Marker icon
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:example_flutter/utils/widget_utils.dart';
void main() {
testWidgets('create image from widget', (WidgetTester tester) async {
final globalKey = GlobalKey();
@RyanRamchandar
RyanRamchandar / Example.java
Last active November 9, 2022 17:27
Cancel a running or queued Call with OkHttp3
// ...
Request request = new Request.Builder()
.url(url)
.tag(TAG)
.build();
// Cancel previous call(s) if they are running or queued
OkHttpUtils.cancelCallWithTag(client, TAG);
// New call
package com.website.app;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.website.app.models.Monument;
import java.io.IOException;
import java.util.ArrayList;
@RyanRamchandar
RyanRamchandar / gist:5703833
Last active December 18, 2015 01:28
Layout file and GridAdapter snippets.
//GridItem.xml
...
<ImageView
android:id="@+id/mapImageStarredGrid"
android:layout_width="match_parent"
android:layout_height="175dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
...