Skip to content

Instantly share code, notes, and snippets.

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

Ameer Amjed AmeerAmjed

🏠
Working from home
View GitHub Profile
@AmeerAmjed
AmeerAmjed / Pull2Refresh.kt
Created April 4, 2024 13:01 — forked from KlassenKonstantin/Pull2Refresh.kt
Fitbit style Pull 2 Refresh
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
P2RTheme {
// A surface container using the 'background' color from the theme
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
CompositionLocalProvider(
LocalOverscrollConfiguration provides null // Disable overscroll otherwise it consumes the drag before we get the chance
@AmeerAmjed
AmeerAmjed / color_picker.dart
Last active September 28, 2021 19:37 — forked from ffeu/color_picker.dart
Basic Material Color Picker for Flutter
/*
Basic ColorPicker for Flutter
FFeu (https://github.com/ffeu) 2018-04
onSelected callback function can be used to detect which color was selected
ColorPicker(
onSelected: (color) {
print(color);