Skip to content

Instantly share code, notes, and snippets.

View omeraydindev's full-sized avatar
🎵
İsmin bir şarkı ve ben hep seni söylerim :)

Ömer omeraydindev

🎵
İsmin bir şarkı ve ben hep seni söylerim :)
View GitHub Profile
@omeraydindev
omeraydindev / FastAdapter.java
Last active May 29, 2022 16:55
Easy-to-use generic helper class to help reduce RecyclerView adapter boilerplate by wrapping an adapter internally. This can be useful for when you just need a basic, easy, fast adapter solution without the usual boilerplate that we've grown used to with RecyclerView adapters. Supports drag-drop reordering out of the box. See below for an example.
/*
* This is free and unencumbered software released into the public domain.
* For more information, please refer to <http://unlicense.org/>
*/
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
@omeraydindev
omeraydindev / dio_headerfixed_adapter.dart
Last active November 4, 2022 14:31
A HttpClientAdapter subclass copied exactly from dio's io_adapter.dart (dio 4.0.4) to fix the "bug" where Dio lowercases all header names before sending a request. Search ***changed*** to see the changed parts of the code.
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'package:dio/dio.dart';
typedef OnHttpClientCreate = HttpClient? Function(HttpClient client);
/**
* Copied verbatim from dio's io_adapter.dart and