This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following assertion was thrown resolving an image codec: | |
Unable to load asset: | |
When the exception was thrown, this was the stack: | |
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:225:7) | |
<asynchronous suspension> | |
#1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:668:31) | |
#2 AssetBundleImageProvider.load (package:flutter/src/painting/image_provider.dart:651:14) | |
#3 ImageProvider.resolveStreamForKey.<anonymous closure> (package:flutter/src/painting/image_provider.dart:504:13) | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python manage.py runserver | |
Watching for file changes with StatReloader | |
Exception in thread django-main-thread: | |
Traceback (most recent call last): | |
File "C:\Users\guilh\Development\Django\Sige\venv\lib\site-packages\django\db\backends\postgresql\base.py", line 25, in <module> | |
import psycopg2 as Database | |
File "C:\Users\guilh\Development\Django\Sige\venv\lib\site-packages\psycopg2\__init__.py", line 51, in <module> | |
from psycopg2._psycopg import ( # noqa | |
ImportError: DLL load failed while importing _psycopg: Não foi possível encontrar o módulo especificado. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of 'cubit.dart'; | |
abstract class UsuarioState extends Equatable { | |
const UsuarioState(); | |
} | |
class UsuarioInitial extends UsuarioState { | |
@override | |
List<Object> get props => []; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
child: BlocConsumer<UsuarioCubit, UsuarioState>( | |
listener: (context, state) { | |
if (state is UsuarioProcessState) { | |
FlutterToast(context).showToast( | |
child: Container( | |
color: Colors.blue[200], | |
width: double.infinity, | |
child: Column( | |
children: [ | |
LinearProgressIndicator(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BlocConsumer<UsuarioCubit, UsuarioState>( | |
listener: (context, state) { | |
if (state is UsuarioProcessState) { | |
FlutterToast(context).showToast( | |
child: Container( | |
color: Colors.blue[200], | |
width: double.infinity, | |
child: Column( | |
children: [ | |
LinearProgressIndicator(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
visualDensity: VisualDensity.adaptivePlatformDensity, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:bloc/bloc.dart'; | |
import 'package:cubit_example/apps/usuario/model.dart'; | |
import 'package:equatable/equatable.dart'; | |
import '../service.dart'; | |
part 'usuario_state.dart'; | |
class UsuarioCubit extends Cubit<UsuarioState> { | |
UsuarioService _service; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of 'usuario_cubit.dart'; | |
abstract class UsuarioState extends Equatable { | |
const UsuarioState(); | |
} | |
class UsuarioInitial extends UsuarioState { | |
@override | |
List<Object> get props => []; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cubit_example | |
description: A new Flutter project. | |
publish_to: "none" # Remove this line if you wish to publish to pub.dev | |
version: 1.0.0+1 | |
environment: | |
sdk: ">=2.7.0 <3.0.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2020. | |
* | |
* Desenvolvido por. | |
* Guilherme de Carvalho Carneiro | |
* [email protected] | |
* | |
* Twitter -> https://twitter.com/GCarneiro | |
* Linkedin -> https://www.linkedin.com/in/guilhermecarvalho | |
* GitHub -> https://github.com/guilhermecarvalhocarneiro |