Skip to content

Instantly share code, notes, and snippets.

View soft2now's full-sized avatar
🐶

Soft2now soft2now

🐶
View GitHub Profile
@soft2now
soft2now / Patron Bloc
Created May 15, 2020 11:12
Patron Bloc for use to any project
import 'dart:async';
class LoginBloc{
final _emailController = StreamController<String>.broadcast();
final _passwordController = StreamController<String>.broadcast();
//Recuperar datos de los stream
Stream<String> get emailStram => _emailController.stream;
@soft2now
soft2now / InheritedWidget Example
Last active December 3, 2021 13:02
InheritedWidget for flutter, for use to any project, copy and paste, put name.
import 'package:flutter/material.dart';
import 'login_bloc.dart';
class Provider extends InheritedWidget {
Provider({Key key, this.child}) : super(key: key, child: child);
final Widget child;