Skip to content

Instantly share code, notes, and snippets.

View aytunch's full-sized avatar
Working from anywhere with a plug

aytunc aytunch

Working from anywhere with a plug
View GitHub Profile
@kangabru
kangabru / magnifying_glass.dart
Last active August 17, 2020 08:45
Allows you to display a 'magnifying glass' widget which helps users see what's under their finger while they are drawing
import 'dart:math';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// The radius of the mag glass.
const double _RADIUS = 60.0;
/// The distance the mag glass will be offset from the touch point.
const double _OFFSET = _RADIUS * 1.5;
private fun launchIntents(context: Context) {
val whatsappIntent = getWhatsappIntent(context)
val telegramIntent = getTelegramIntent(context)
val intents = listOfNotNull(whatsappIntent, telegramIntent)
val globalIntent = Intent()
val chooserIntent = Intent.createChooser(globalIntent, "Send message")
.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toTypedArray())
@slightfoot
slightfoot / wizard_buttons.dart
Last active December 20, 2023 20:19
Wizard Buttons - by Simon Lightfoot - Humpday Q&A :: 20th December 2023 #HumpdayQandA #Flutter #Dart - https://www.youtube.com/live/kJWtSAFnJxk?si=nWEXHtV1NmT6jJCd&t=6509
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: