Skip to content

Instantly share code, notes, and snippets.

View piecubed's full-sized avatar
Drinking coffee

piesquared piecubed

Drinking coffee
View GitHub Profile
@smkhalsa
smkhalsa / fade_on_scroll.dart
Last active January 8, 2025 09:27
A Widget that automatically fades its child based on scroll position
import 'package:flutter/material.dart';
class FadeOnScroll extends StatefulWidget {
final ScrollController scrollController;
final double zeroOpacityOffset;
final double fullOpacityOffset;
final Widget child;
FadeOnScroll(
{Key key,