Skip to content

Instantly share code, notes, and snippets.

View kauemurakami's full-sized avatar
🎯
Concentrando

Kauê Murakami kauemurakami

🎯
Concentrando
View GitHub Profile
/// @disparado chamado com a venda
preço para determinar quanto de royalties
// é devido e a quem.
/// @parâmetro _tokenId - o NFT
consultado por informações de royalties
/// @parâmetro _salePrice - a venda
preço do ativo NFT especificado por
_tokenId
/// @retentor do retorno - endereço de
quem deve receber o pagamento de royalties
@kauemurakami
kauemurakami / details_controller.dart
Last active April 4, 2023 22:05
Details Controller
import 'package:get/get.dart';
import 'package:getx_pattern/app/data/model/model.dart';
import 'package:getx_pattern/app/data/repository/posts_repository.dart';
import 'package:meta/meta.dart';
class DetailsController extends GetxController {
final MyRepository repository;
DetailsController({@required this.repository}) : assert(repository != null);
@kauemurakami
kauemurakami / datails_binding.dart
Created July 16, 2020 18:56
Details dependencies
import 'package:get/get.dart';
import 'package:getx_pattern/app/controller/details/details_controller.dart';
import 'package:getx_pattern/app/data/provider/api.dart';
import 'package:getx_pattern/app/data/repository/posts_repository.dart';
import 'package:http/http.dart' as http;
class DetailsBinding implements Bindings{
@override
void dependencies() {
Get.lazyPut<DetailsController>(() {
@kauemurakami
kauemurakami / home_binding.dart
Created July 16, 2020 18:55
Home dependencies
import 'package:getx_pattern/app/controller/home/home_controller.dart';
import 'package:getx_pattern/app/data/provider/api.dart';
import 'package:getx_pattern/app/data/repository/posts_repository.dart';
import 'package:http/http.dart' as http;
import 'package:get/get.dart';
class HomeBinding implements Bindings {
@override
void dependencies() {
Get.lazyPut<HomeController>(() {
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_pattern/app/controller/details/details_controller.dart';
import 'package:getx_pattern/app/controller/home/home_controller.dart';
import 'package:getx_pattern/app/ui/android/details/widgets/bottom_card_widget.dart';
import 'package:getx_pattern/app/ui/android/details/widgets/top_card_widget.dart';
import 'package:slimy_card/slimy_card.dart';
class DetailsPage extends GetView<DetailsController> {
@kauemurakami
kauemurakami / es_mx_translation.dart
Last active July 10, 2020 05:41
tradução de oi para o espanhol do México
final Map<String, String> esMx = {
'oi':'Holla'
};
@kauemurakami
kauemurakami / en_us_translation.dart
Created July 10, 2020 05:34
tradução para o inglês da palavra oi
final Map<String, String> enUs = {
'oi' : 'Hello'
};
@kauemurakami
kauemurakami / app_translations.dart
Created July 10, 2020 05:19
Classe que contém todas as nossas traduções de diferentes linguas
import 'package:getx_pattern/app/translations/en_US/en_us_translations.dart';
import 'package:getx_pattern/app/translations/es_MX/es_mx_translations.dart';
import 'package:getx_pattern/app/translations/pt_BR/pt_br_translations.dart';
abstract class AppTranslation {
static Map<String, Map<String, String>>
translations =
{
'pt_BR' : ptBR,
'en_US' : enUs,
@kauemurakami
kauemurakami / app_pages.dart
Last active July 16, 2020 19:06
pages navigation
import 'package:get/get.dart';
import 'package:getx_pattern/app/ui/android/details/details_page.dart';
import 'package:getx_pattern/app/ui/android/home/home_page.dart';
part './app_routes.dart';
class AppPages {
static final routes = [
GetPage(name: Routes.INITIAL, page:()=> HomePage(),),
GetPage(name: Routes.DETAILS, page:()=> DetailsPage(), binding: DetailsBinding()), //dependencias de details via rota
@kauemurakami
kauemurakami / main.dart
Last active July 16, 2020 18:32
Classe pirncipal
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_pattern/app/routes/app_pages.dart';
import 'package:getx_pattern/app/translations/app_translations.dart';
import 'app/ui/android/home/home_page.dart';
import 'app/ui/theme/app_theme.dart';
void main() {
runApp(