Skip to content

Instantly share code, notes, and snippets.

@rurickdev
rurickdev / clear-cache.js
Created January 20, 2023 20:38 — forked from deanhume/clear-cache.js
Clear Service Worker Cache
if ('serviceWorker' in navigator) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
}
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
SizedBox(
height: MediaQuery.of(context).size.width * 0.75,
child: DraggableScrollableSheet(
expand: false,
initialChildSize: 1.0,
minChildSize:0.5,
maxChildSize: 1.0,
builder: (BuildContext context, ScrollController scrollController) {
return Container(
color: Colors.blue,
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@rurickdev
rurickdev / pantheon_install.sh
Created October 1, 2020 23:31 — forked from cinco/pantheon_install.sh
archlinux install pantheon
#!/bin/bash
#remove gnome e gnome-shell
#pacman -Rcns gnome-shell gnome gnome-extra
#remove pacotes orfãos
#sudo pacman -Rs $(pacman -Qdtq)
#sudo pacman -S pantheon-session-git cerbere-git gala-git wingpanel-git pantheon-applications-menu-git plank pantheon-default-settings-git pantheon-dpms-helper-git elementary-icon-theme gtk-theme-elementary-git elementary-wallpapers-git wingpanel-indicator-power-git pantheon-print-git pantheon-polkit-agent-git elementary-icon-theme-git lightdm-pantheon-greeter-git ttf-dejavu ttf-droid ttf-freefont ttf-liberation pantheon-files-git pantheon-terminal-git pantheon-code-git pantheon-calculator-git pantheon-music-git pantheon-videos-git pantheon-calendar-git wingpanel-indicator-datetime-git pantheon-screenshot pantheon-photos-git pantheon-camera-git switchboard-git
aurman -S cerbere-git contractor-git elementary-icon-theme-git elementary-wallpapers-git file-roller gala-git geary granite-git gtk-theme-elementary-git lightdm lightdm-pantheon-greeter-git networkmanager pantheon-
@rurickdev
rurickdev / creating_vars.dart
Last active September 14, 2020 12:23
Null Safety Codes and examples
void main (){
// In null-safe Dart, none of these can ever be null.
var i = 42; // Inferred to be int.
String name = getFileName(); // getFileName() should return string, never null.
final b = Foo(); // Inferred to be Foo.
// Nullable var declaration just needs an [?] after the type.
int? aNullableInt = null;
var x; // Inferred nullable
@rurickdev
rurickdev / reformat_hdd.md
Last active October 26, 2020 15:50
Instrucciones para reparar un disco sin formato o sin tabla de particiones

Problema

Tenemos una computadora con un solo discoduro que no tiene tabla de particiones o no tiene formato y queremos recuperar el disco

Requisitos

Requeridos

  • Una USB booteable con Linux
@rurickdev
rurickdev / navigate_from_list.dart
Last active August 27, 2020 15:23
[Flutter] Navegacion desde una Lista
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@rurickdev
rurickdev / Medium_DarkTheme_example2.dart
Last active May 23, 2019 14:39
Flutter Ejemplo Tema Oscuro 2
MaterialApp(
title: 'Flutter Ejemplo Tema Oscuro',
//Tema Principal, se usa cuando no está activo el modo oscuro
theme: ThemeData(
//Se indica que el tema tiene un brillo luminoso/claro
brightness: Brightness.light,
primarySwatch: Colors.pink,
),
//Tema Oscuro, se usa cuando se activa el modo oscuro
darkTheme: ThemeData(