Skip to content

Instantly share code, notes, and snippets.

View Rahiche's full-sized avatar
🏠
Working from home

Raouf Rahiche Rahiche

🏠
Working from home
View GitHub Profile
import 'dart:async';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
import 'dart:async';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
use std::io;
use rand::Rng;
// A simple struct to represent a person
struct Person {
name: String,
age: u32,
}
impl Person {
@Rahiche
Rahiche / blur_lyrics.dart
Created September 28, 2024 21:21
lyrics
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(const MusicPlayerApp());
}
class MusicPlayerApp extends StatelessWidget {
const MusicPlayerApp({Key? key}) : super(key: key);
@Rahiche
Rahiche / genie.frag
Created February 17, 2024 16:12
sample
// this file should be inside "shaders" folder
/*
MIT License
Copyright (c) 2023, Altaha Ansari
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
@Rahiche
Rahiche / gradual_blur_card.dart
Created December 16, 2023 23:46
Gradual blur cards using ImageFilter.compose
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@Rahiche
Rahiche / main.dart
Created October 21, 2023 23:18
iOS 17 Faded Gradual Blur
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_shaders/flutter_shaders.dart';
void main() {
runApp(BlurGallery());
}
class BlurGallery extends StatelessWidget {
@override
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Rahiche
Rahiche / menu_on_hover.dart
Created March 20, 2022 23:21
Create a menu relative to a widget that shows and hides smoothly
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Sample()));
}
class Sample extends StatefulWidget {
const Sample({Key? key}) : super(key: key);
@override
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@override