Skip to content

Instantly share code, notes, and snippets.

View tranductam2802's full-sized avatar
🔥
Fulltime Mobile Developer! Part-time Poker dealer

Trần Đức Tâm tranductam2802

🔥
Fulltime Mobile Developer! Part-time Poker dealer
View GitHub Profile
"Nice try."
@slightfoot
slightfoot / fling_physics.dart
Last active May 19, 2023 14:59
Fling PageScrollPhysics for Flutter
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// 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
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// https://syncview.firebaseapp.com
// https://gist.github.com/PlugFox/c683eed018a3a72c55255e4e58447e0d
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
//import 'package:url_launcher/url_launcher.dart'; // io
import 'dart:html' show window; // html
void main() => runApp(App());
@tranductam2802
tranductam2802 / ssh_client.py
Created September 6, 2019 05:30
Funny SSH client has written by Python for learning paramiko library
from termcolor import *
from sys import stdin
import colorama
import paramiko as ssh
import sys
import time
import os
HOST = ''
USER = ''
@kenreilly
kenreilly / section.dart
Created August 23, 2019 05:38
Flutter for Web example page section
import 'package:flutter_web/material.dart';
import 'section-def.dart';
class Content extends AnimatedWidget {
const Content({ Key key, this.listenable, this.children, this.opacity })
: super(key: key, listenable: listenable);
final ScrollController listenable;
final List<Widget> children;
@kenreilly
kenreilly / background.dart
Created August 23, 2019 05:33
Flutter for Web example background
import 'package:flutter_web/material.dart';
class Background extends AnimatedWidget {
Background({ Key key, @required this.image, @required this.listenable })
: super(key: key, listenable: listenable);
final AssetImage image;
final ScrollController listenable;
@zengde
zengde / CustomScrollPhysics.dart
Created August 20, 2019 08:31
flutter listview pageScrollPhysics
class CustomScrollPhysics extends ScrollPhysics {
final double itemDimension;
CustomScrollPhysics({this.itemDimension, ScrollPhysics parent})
: super(parent: parent);
@override
CustomScrollPhysics applyTo(ScrollPhysics ancestor) {
return CustomScrollPhysics(
itemDimension: itemDimension, parent: buildParent(ancestor));
@rolurq
rolurq / main.dart
Created August 16, 2019 22:18
Paged scrollable in flutter that doesn't center the edge elements
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@moses-nganga
moses-nganga / moses.dart
Created June 28, 2019 13:22
Code from Poa! Ops Mobile Solution
import 'dart:math';
import 'dart:ui';
import 'package:flutter/animation.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:intl/intl.dart';
import 'package:poa/src/models/surveys.dart';
import 'package:poa/src/repository/api_provider.dart';
@slightfoot
slightfoot / nested_scroll.dart
Last active April 16, 2020 18:05
Custom nested scroll thingy
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatelessWidget {
@override