Skip to content

Instantly share code, notes, and snippets.

Stefan Mitev mrmitew

Block or report user

Report or block mrmitew

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mrmitew / ticket_card.dart
Created Mar 21, 2019
Ticket card widget
View ticket_card.dart
class TicketClipper extends CustomClipper<Path> {
final double radius;
Path getClip(Size size) {
var path = new Path();
path.lineTo(0.0, size.height);
path.lineTo(size.width, size.height);
mrmitew / .gitconfig
Last active Mar 6, 2019
Compare the difference between two images in Git using ImageMagic.
View .gitconfig
[diff "image"]
command = /path/to/
View my_inherited_stateful_widget.dart
import 'package:flutter/material.dart';
class MyInherited extends StatefulWidget {
final Widget child;
MyInherited({Key key, this.child}) : super(key: key);
MyInheritedState createState() => new MyInheritedState();
mrmitew / built_value_live_template.dart
Last active Mar 1, 2019
Live template for IntelliJ/AS for built_value (Dart)
View built_value_live_template.dart
import 'package:built_value/built_value.dart';
part '$CLASS_NAME$.g.dart';
abstract class $CLASS_NAME$ implements Built<$CLASS_NAME$, $CLASS_NAME$Builder> {
factory $CLASS_NAME$([updates($CLASS_NAME$Builder b)]) = _$$$CLASS_NAME$;
mrmitew / stateful_inherited_widget_template.dart
Created Oct 23, 2018
Android Studio Live Template for creating a Stateful Inherited Widget
View stateful_inherited_widget_template.dart
class _$MY_INHERITED_WIDGET_NAME$Inherited extends InheritedWidget {
Key key,
@required Widget child,
}) : super(key: key, child: child);
final $MY_INHERITED_WIDGET_NAME$InheritedWidgetState data;
View CrossfadeTitle.dart
class CrossfadeTitle extends AnimatedWidget {
final Widget primaryTitle;
final Widget secondaryTitle;
const CrossfadeTitle({
Key key,
Listenable listenable,
}) : super(key: key, listenable: listenable);
View CutCornersBorder.dart
// Copyright 2018-present the Flutter authors. All Rights Reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
mrmitew / AccentColorOverride.dart
Created Oct 5, 2018
Override accent color of a given child by wrapping it into a AccentColorOverride widget
View AccentColorOverride.dart
class AccentColorOverride extends StatelessWidget {
const AccentColorOverride({Key key, this.color, this.child})
: super(key: key);
final Color color;
final Widget child;
Widget build(BuildContext context) {
return Theme(
mrmitew / RxDoOnNth.kt
Created Sep 24, 2018
Do something on Nth emission for a given RxJava2 Flowable
View RxDoOnNth.kt
import io.reactivex.Flowable
import io.reactivex.FlowableTransformer
import org.reactivestreams.Publisher
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
* @author Stefan Mitev
mrmitew / RxWriteByteStreamToFile.kt
Last active Sep 21, 2018
Extension function for RxJava's Flowable for writing bytes from a stream into a file
View RxWriteByteStreamToFile.kt
* Extension function for RxJava's Flowable for writing bytes from a stream into a file
* The [FileOutputStream] will be automatically flushed and then closed when the flowable
* terminates or is disposed.
* Example usage:
* getAudioStream()
* .observeOn(AndroidSchedulers.mainThread())
* .subscribeOn(Schedulers.computation())
You can’t perform that action at this time.