Skip to content

Instantly share code, notes, and snippets.

View dickermoshe's full-sized avatar

Moshe Dicker dickermoshe

  • Lakewood, NJ
View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@dickermoshe
dickermoshe / main.dart
Created January 10, 2024 17:39
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@dickermoshe
dickermoshe / when_extension.dart
Created November 14, 2023 06:04
An extension for `AsyncSnapshot` with the `when` method from Riverpod's `AsyncValue` : Simplily use of `FutureBuilder`
import 'package:flutter/material.dart';
extension When<T> on AsyncSnapshot<T> {
R when<R>({
required R Function(T data) data,
required R Function(Object error, StackTrace stackTrace) error,
required R Function() loading,
}) {
switch (connectionState) {
case ConnectionState.none:
@dickermoshe
dickermoshe / main.dart
Created June 12, 2023 23:08
Flutter Large App Bar Bug
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@dickermoshe
dickermoshe / main.dart
Last active April 9, 2023 15:19
Flutter RTL bug
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@dickermoshe
dickermoshe / Wipe_Gmail_Account.py
Created December 20, 2021 05:33
This small python script will Permanently wipe emails based on a search phrase that is used on the Gmail website
import imaplib
# account credentials and other configs
# replace with you Gmail username and password
username = "replace with your Gmail username"
password = "replace with your Gmail password"
# Search query to delete
# Make sure to leave the single and double quotes
# Example >>> gmail_search = '"from:me"'
gmail_search = '"replace with your Search Phrase"'