Skip to content

Instantly share code, notes, and snippets.

View talamaska's full-sized avatar

Zlati Pehlivanov talamaska

View GitHub Profile
@slightfoot
slightfoot / humpday_2024-06-26_1.dart
Created June 26, 2024 19:33
Search Box Overlays - by Simon Lightfoot - Humpday Q&A :: 26th June 2024 #Flutter #Dart https://www.youtube.com/watch?v=X0bin1qozYg
// MIT License
//
// Copyright (c) 2024 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:
@Luckey-Elijah
Luckey-Elijah / logout_button.dart
Last active July 12, 2024 19:38
A useful OverlayPortal widget wrapper for building based on the anchor/target's position.
import 'positioned_overlay_builder.dart';
import 'package:flutter/material.dart';
class LogoutButton extends StatelessWidget {
const LogoutButton({super.key});
@override
Widget build(BuildContext context) {
return PositionedOverlayBuilder(
anchorBuilder: (context, controller) {
@whiplashoo
whiplashoo / resources.md
Last active June 1, 2022 15:26
Resources from "Building a native-looking desktop app with Flutter for macOS and Windows" presentation from Flutter Global Summit '22
@rohan20
rohan20 / main.dart
Created December 31, 2021 13:35
Flutter close iOS number keyboard (has no "Done" button)
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@dahabit
dahabit / ios_clean.sh
Last active February 26, 2022 23:03
Shell file that clean any Pods or Flutter dependencies before build
#!/bin/sh
echo "========== Cleanup start =========="
rm -Rf ios/Pods
rm -Rf ios/.symlink
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
rm -rf ios/Podfile.lock
rm -rf ~/Library/Developer/Xcode/DerivedData/* -y
rm -rf pubspec.lock
flutter clean
@vincevargadev
vincevargadev / i-have-no-idea-what-i-am-doing.sh
Last active December 27, 2021 20:34
Fix all Flutter issues ever!
rm -f ios/Podfile ios/Podfile.lock pubspec.lock && rm -rf ios/Runner.xcworkspace/xcshareddata/ &&
flutter clean &&
flutter pub cache repair &&
rm -f ios/Podfile ios/Podfile.lock pubspec.lock &&
flutter pub get &&
flutter pub run build_runner clean
@lukepighetti
lukepighetti / implicitly_animated_builder.dart
Created May 17, 2020 20:08
ImplicitlyAnimatedBuilder
import 'package:flutter/material.dart';
/// An implicitly animated builder that tweens from 0.0 to 1.0 based on `isActive` property
class ImplicitlyAnimatedBuilder extends ImplicitlyAnimatedWidget {
ImplicitlyAnimatedBuilder({
Key key,
@required Curve curve,
@required Duration duration,
@required this.isActive,
@required this.builder,
@av
av / main.dart
Created January 13, 2020 18:44
Flutter: neu
import 'package:flutter/material.dart';
void main() => runApp(NeumorphicApp());
class NeumorphicApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Neumorphic App',
theme: ThemeData(
@slightfoot
slightfoot / transitions_fun.dart
Created January 8, 2020 21:31
Fun with Route Animations - by Simon Lightfoot - #HumpDayQandA - 8th Janurary 2020
// MIT License
//
// Copyright (c) 2019 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:
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';