Skip to content

Instantly share code, notes, and snippets.

View rodrigolmacedo's full-sized avatar
😆
Let's code.

Rodrigo rodrigolmacedo

😆
Let's code.
  • Recife, Brasil
  • 03:02 (UTC -03:00)
View GitHub Profile
@rodrigolmacedo
rodrigolmacedo / gist:90ecf5db2c87e14f7a13af2bf9f2ce2e
Last active August 29, 2021 03:04
diagrama_classe_livraria_mermaid
classDiagram
class Usuario{
+id
+email
+senha
+nome
}
class Produto{
+id
+nome
@rodrigolmacedo
rodrigolmacedo / dio_test.dart
Created October 8, 2020 18:24 — forked from hjJunior/dio_test.dart
An example how to use mockito and Dio to tests your calls to API
class DioAdapterMock extends Mock implements HttpClientAdapter {}
const dioHttpHeadersForResponseBody = {
Headers.contentTypeHeader: [Headers.jsonContentType],
};
void main() {
group('UserRemoteDataSource', () {
final Dio dio = Dio();
List<ReactionDisposer> _disposers;
@override
void initState() {
super.initState();
_disposers ??= [
[ {
"filetypeFilter" : {
"enabled" : false,
"audioFilesEnabled" : false,
"matchType" : "IS",
"useRegex" : false,
"hashEnabled" : false,
"videoFilesEnabled" : false,
"docFilesEnabled" : false,
"archivesEnabled" : false,
@rodrigolmacedo
rodrigolmacedo / carouselWithIndicator
Last active February 18, 2020 17:15
carousel indicator
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
final List<String> imgList = [
'https://images.unsplash.com/photo-1520342868574-5fa3804e551c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6ff92caffcdd63681a35134a6770ed3b&auto=format&fit=crop&w=1951&q=80',
'https://images.unsplash.com/photo-1522205408450-add114ad53fe?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=368f45b0888aeb0b7b08e3a1084d3ede&auto=format&fit=crop&w=1950&q=80',
'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=94a1e718d89ca60a6337a6008341ca50&auto=format&fit=crop&w=1950&q=80',
'https://images.unsplash.com/photo-1523205771623-e0faa4d2813d?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=89719a0d55dd05e2deae4120227e6efc&auto=format&fit=crop&w=1953&q=80',
'https://images.unsplash.com/photo-1508704019882-f9cf40e475b4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=8c6e5e3aba713b17aa1fe71ab4f0ae5b&auto=format&fit=crop&w=1352&q=80',
'https://images.unsp
class View {
constructor(elemento) {
this._elemento = elemento;
}
template() {
throw new Error('O metodo template deve ser implementado');
}
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override