Skip to content

Instantly share code, notes, and snippets.

View MeshkaniMohammad's full-sized avatar
🎯
Focusing

Mohammad Meshkani MeshkaniMohammad

🎯
Focusing
View GitHub Profile
import 'dart:convert';
import 'dart:math' as math;
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:image/image.dart' as image;
@slightfoot
slightfoot / hand_cursor.dart
Created May 14, 2020 00:24
Hand Cursor for Flutter Web - Simply wrap your buttons with it - by Simon Lightfoot - 14/05/2020
// MIT License
//
// Copyright (c) 2020 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:
@slightfoot
slightfoot / page_animation.dart
Last active May 16, 2020 12:16
PageView Page Animation / Transition Example - by Simon Lightfoot - 12/05/2020
// MIT License
//
// Copyright (c) 2020 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:
@slightfoot
slightfoot / fractional_flex.dart
Last active February 16, 2023 16:56
Fractional Flex Widget - by Simon Lightfoot - 08/05/2020
// MIT License
//
// Copyright (c) 2020 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:
@mahdi-malv
mahdi-malv / caster.py
Last active June 20, 2020 06:17
Download a course from caster.io using scrapy and youtube-dl
"""
Prerequisites:
1. Scrapy: python3 -m pip install scrapy
2. Youtube-dl: python3 -m pip install youtube-dl
(Use conda or miniconda for windows to install scrapy. Or use WSL and install python3 on it)
It's also possible to modify this to get other courses from caster.io or even other sites.
"""
from scrapy.spiders import Spider
from scrapy.crawler import CrawlerProcess
import youtube_dl
@hnvn
hnvn / single_top.dart
Created October 13, 2019 09:30 — forked from slightfoot/single_top.dart
Recreating Android Single-Top Activity behaviour with Flutter Route's - by Simon Lightfoot
// 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:
@slightfoot
slightfoot / dropdown_popup.dart
Last active August 30, 2021 06:33
Custom Dropdown Popup Menu Example - Custom Enum, Theming, Extending Existing API, Animations, Transitions, Routes, Custom shadows, borders and painting. Based on https://dribbble.com/shots/2369431-Daily-UI-027-Dropdown
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:vector_math/vector_math_64.dart' show radians;
void main() => runApp(ExampleApp());
class ExampleItem {
static const Pineapples = ExampleItem._('Pineapples');
static const Watermelons = ExampleItem._('Watermelons');
static const StarFruit = ExampleItem._('Star Fruit');
@slightfoot
slightfoot / input_password_toggle.dart
Created March 27, 2019 21:03
Input Password Toggle and Form Validation, Above Keyboard Widget, Form Focus, Progress Button, State Separation - 27th March 2019 #HumpDayQandA
import 'package:flutter/foundation.dart' show ValueListenable; // should be exported by widgets
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(Provider<LoginApi>(
value: LoginApiImpl(),
child: TestApp(),
));
}
@stefanJi
stefanJi / wave_card.dart
Last active February 26, 2022 08:33
flutter wave card example
import 'package:flutter/widgets.dart';
class WaveCard extends StatelessWidget {
WaveCard({Key key, padding: EdgeInsets}) : super(key: key);
@override
Widget build(BuildContext context) {
final painter = WavePainter(Color.fromRGBO(96, 204, 184, 0.2));
return CustomPaint(
painter: painter,
import 'package:flutter/material.dart';
class AnimatedIconExample extends StatefulWidget {
@override
_AnimatedIconExampleState createState() => _AnimatedIconExampleState();
}
class _AnimatedIconExampleState extends State<AnimatedIconExample>
with SingleTickerProviderStateMixin {
PageController pageController = PageController();