Skip to content

Instantly share code, notes, and snippets.

☕️
coding

Felix Angelov felangel

☕️
coding
Block or report user

Report or block felangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felangel
felangel / post_event.dart
Last active Jan 7, 2019
[flutter_infinite_list] post_event
View post_event.dart
import 'package:equatable/equatable.dart';
abstract class PostEvent extends Equatable {}
class Fetch extends PostEvent {
@override
String toString() => 'Fetch';
}
@felangel
felangel / post.dart
Last active Jan 7, 2019
[flutter_infinite_list] Post Model
View post.dart
import 'package:equatable/equatable.dart';
class Post extends Equatable {
final int id;
final String title;
final String body;
Post({this.id, this.title, this.body}) : super([id, title, body]);
@override
@felangel
felangel / login_state.dart
Last active Jan 7, 2019
[flutter_login_unit_tests] LoginState
View login_state.dart
import 'package:meta/meta.dart';
import 'package:equatable/equatable.dart';
class LoginState extends Equatable {
final bool isLoading;
final bool isLoginButtonEnabled;
final String error;
final String token;
LoginState({
@felangel
felangel / authentication_state.dart
Last active Jan 7, 2019
[flutter_login_unit_tests] AuthenticationState
View authentication_state.dart
import 'package:meta/meta.dart';
import 'package:equatable/equatable.dart';
abstract class AuthenticationState extends Equatable {
AuthenticationState([Iterable props]) : super(props);
}
class AuthenticationUninitialized extends AuthenticationState {
@override
String toString() => 'AuthenticationUninitialized';
@felangel
felangel / person.dart
Created Jan 7, 2019
[intro_equatable] Person
View person.dart
class Person {
final String name;
final int age;
const Person({this.name, this.age});
}
@felangel
felangel / main.dart
Created Jan 7, 2019
[intro_equatable] Person Instantiation
View main.dart
void main() {
final Person bob = Person(name: "Bob", age: 40);
}
@felangel
felangel / main.dart
Created Jan 7, 2019
[intro_equatable] Person Comparison I
View main.dart
void main() {
final Person bob = Person(name: "Bob", age: 40);
print(bob == Person(name: "Bob", age: 40)); // false
}
@felangel
felangel / person.dart
Created Jan 7, 2019
[intro_equatable] Person override == and hashcode
View person.dart
class Person {
final String name;
final int age;
const Person({this.name, this.age});
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Person &&
@felangel
felangel / person.dart
Created Jan 7, 2019
[intro_equatable] Person extends Equatable
View person.dart
import "package:equatable/equatable.dart";
class Person extends Equatable {
final String name;
final int age;
Person({this.name, this.age}) : super([name, age]);
}
@felangel
felangel / pubspec.yaml
Created Jan 21, 2019
[github_search] Common Pubspec.yaml
View pubspec.yaml
name: common_github_search
description: Shared Code between AngularDart and Flutter
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
meta: ^1.1.7
bloc: ^0.8.0
You can’t perform that action at this time.