Skip to content

Instantly share code, notes, and snippets.

View CosimoSguanci's full-sized avatar
🚀
Focusing

Cosimo Sguanci CosimoSguanci

🚀
Focusing
  • Milano (Italy)
View GitHub Profile
@BbsonLin
BbsonLin / main.dart
Last active October 31, 2023 08:54
Flutter showDialog with return value
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@PlugFox
PlugFox / dottedBorder.dart
Last active February 15, 2021 07:22
Flutter Web simple file upload
import 'package:flutter_web/material.dart';
import 'dart:math' as math;
class DottedBorder extends StatelessWidget {
final Color color;
final double strokeWidth;
final double gap;
final Widget child;
final EdgeInsets padding;
@steveliles
steveliles / Foreground.java
Last active January 22, 2024 18:06
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;