Skip to content

Instantly share code, notes, and snippets.

@fabiomsr
Created September 11, 2016 19:40
Show Gist options
  • Save fabiomsr/f2b9e0ac0d5accb0d95a31ea835bbc00 to your computer and use it in GitHub Desktop.
Save fabiomsr/f2b9e0ac0d5accb0d95a31ea835bbc00 to your computer and use it in GitHub Desktop.
Contact data interface
import 'dart:async';
class Contact {
final String fullName;
final String email;
const Contact({this.fullName, this.email});
}
abstract class ContactRepository {
Future<List<Contact>> fetch();
}
class FetchDataException implements Exception {
String _message;
FetchDataException(this._message);
String toString() {
return "Exception: $_message";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment