Skip to content

Instantly share code, notes, and snippets.

View anki247's full-sized avatar

Anki Batsukh anki247

  • https://seriouscode.io
View GitHub Profile
@MariaMelnik
MariaMelnik / main.dart
Created October 31, 2018 20:21
Flutter: show snackbar once after navigation
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@chrishaensel
chrishaensel / swipe.js
Created February 13, 2018 12:40
Simple swipe gesture recognizer in vanilla javascript
var swiper = {
touchStartX: 0,
touchEndX: 0,
minSwipePixels: 30,
detectionZone: undefined,
swiperCallback: function() {},
init: function (detectionZone, callback) {
swiper.swiperCallback = callback
@EddyVerbruggen
EddyVerbruggen / label-max-lines.directive.ts
Last active November 22, 2023 06:13 — forked from m-abs/label-max-lines.directive.ts
Directive for NativeScript-angular, adding the property maxLines to Label
// Usage: <Label maxLines="3" .. />
import { Directive, ElementRef, Input, OnInit, OnChanges } from '@angular/core';
import { Label } from 'tns-core-modules/ui/label';
declare const android, NSLineBreakMode: any;
@Directive({
selector: 'Label[maxLines]',
})