Skip to content

Instantly share code, notes, and snippets.

View Pranav2918's full-sized avatar
πŸ’™
Fluttering

PranavDave Pranav2918

πŸ’™
Fluttering
View GitHub Profile
@Pranav2918
Pranav2918 / custom_toast.dart
Created February 19, 2026 05:34
Replace boring snackbar with custom toast!!
import 'package:flutter/material.dart';
class CustomToast {
static void show(
BuildContext context, {
required String message,
Duration duration = const Duration(seconds: 2),
}) {
final overlay = Overlay.of(context);
late OverlayEntry overlayEntry;
@Pranav2918
Pranav2918 / extensions.dart
Created August 25, 2025 05:12
Flutter useful extension πŸ’«
import 'package:flutter/material.dart';
/// ----------------------------
/// πŸ”Ή Spacing Extensions
/// ----------------------------
extension SpaceExtension on num {
SizedBox get h => SizedBox(height: toDouble());
SizedBox get w => SizedBox(width: toDouble());
}