Skip to content

Instantly share code, notes, and snippets.

View felipecastrosales's full-sized avatar
🏆
Trabalhe, sirva, seja forte e não encha o saco!

Felipe Sales felipecastrosales

🏆
Trabalhe, sirva, seja forte e não encha o saco!
View GitHub Profile
// Player
// Objetivo: Tocar musicas em mais de uma fonte (Spotify e Dezer)
// Construir as classes baseado no principio SOLID e CLEAN para esse player
// 1) search music by artist
// 2) search music by id
// 3) play music
// 4) pause music
<p align="center">
<img src="assets\images\logo.png" width="100" alt="Logo App Filmes"/>
</p>
<h1 align="center">World Cup</h1>
---
<h2>Tópicos 📋</h2>
import 'package:flutter/material.dart';
import 'package:context_ext/context_ext.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
@felipecastrosales
felipecastrosales / theme_extension_2.dart
Created August 29, 2022 19:42
Theme Extension Updated
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
void main() {
timeDilation = 5.0;
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@felipecastrosales
felipecastrosales / theme_extension.dart
Created August 29, 2022 17:06
Theme Extension POC
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
void main() {
timeDilation = 5.0;
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@felipecastrosales
felipecastrosales / auth_service.dart
Created August 29, 2022 12:36
auth_service.dart
class AuthService extends GetxService {
final _isLogged = RxnBool();
final _getStorage = GetStorage();
void logout() async {
_getStorage.write(ConstantsAPI.auth, null);
snackBar(
MessageModel.success(
title: 'Oba! Logout com sucesso.',
message: 'O logout foi realizado com sucesso.',
@felipecastrosales
felipecastrosales / navigator-in-same-screen-simple.dart
Created August 25, 2022 01:58
navigator-in-same-screen-simple.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@felipecastrosales
felipecastrosales / navigator-in-same-screen.dart
Created August 25, 2022 01:45
navigator-in-same-screen.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
/*
MIT License
Copyright (c) 2020 Mariano Zorrilla
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
@felipecastrosales
felipecastrosales / particle.dart
Created August 19, 2022 16:46
particle with error
import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
void main() {
runApp(MyApp());