Skip to content

Instantly share code, notes, and snippets.

@Roaa94
Roaa94 / reorderable_list_view_example.dart
Last active December 29, 2021 23:41
ReorderableListViewExample
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Starter',
debugShowCheckedModeBanner: false,
@passsy
passsy / main.dart
Created December 2, 2021 13:59
Example of a stacked card list in flutter using Slivers
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(Kata());
}
class Kata extends StatelessWidget {
@override
@opastorello
opastorello / gist:05f02f902339ebc27ea7f20c1838b066
Created November 4, 2021 06:43
Cracking Sublime Text Build (4121)
# Cracking Sublime Text ( Build 4121 ) Tutorial Analysis
---
Two main changes to be made for best experience. This can be done with script.
### License Key
While it is possible to deduce the format of the license key, there is available ones online to show. Analyse and see that it is still that same format. The main part is the verification of the hash values from the license key that we want to always be "correct". This is also the key that this tutorial will use.
```
@xsahil03x
xsahil03x / counter_button.dart
Created August 30, 2021 19:23
Simple counter button
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:rxdart/rxdart.dart';
typedef CounterEdit = Future<bool> Function(int);
/// Returns true if the [valueBeforeZero] is handled by user.
typedef OnValueZero = Future<bool> Function(int valueBeforeZero);
@rydmike
rydmike / main.dart
Last active August 31, 2021 12:44
Flutter Rounded Border Solutions to Tweet: https://twitter.com/RydMike/status/1431999590547476483
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@gaetschwartz
gaetschwartz / main.dart
Created August 29, 2021 15:44
Expandable Dialog
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@maheshj01
maheshj01 / torch.md
Last active September 14, 2021 05:49
Torch Effect flutter
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
@rydmike
rydmike / platform_is.dart
Last active February 4, 2025 14:40
Flutter Universal Platform Check - That Works on Web too
import 'universal_platform_web.dart'
if (dart.library.io) 'universal_platform_vm.dart';
/// A universal platform checker.
///
/// Can be used to check active physical Flutter platform on all platforms.
///
/// To check what host platform the app is running on use:
///
/// * PlatformIs.android
@eduardoflorence
eduardoflorence / main.dart
Created March 23, 2021 19:12
GetX - Sample BottomNavigationBar
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: '/home',
defaultTransition: Transition.fade,
getPages: [
GetPage(
@roipeker
roipeker / api_errors.dart
Last active February 27, 2021 21:02
Dart generic api response.
/*
* Copyright (c) 2020. roipeker™ [Rodrigo López Peker]
* All rights reserved.
*/
import 'api_response.dart';
// ignore: avoid_classes_with_only_static_members
abstract class ApiErrors {
static const defaultError = 'No se puede procesar la data';