<commit_before>library nv.models;

import 'package:meta/meta.dart';
import 'package:observe/observe.dart';

class AppModel extends ChangeNotifierBase {
  static const _SEARCH_TERM = const Symbol('searchTerm');

  String _searchTerm = '';

  String get searchTerm => _searchTerm;

  void set searchTerm(String value) {
    _searchTerm = value;
    _notifyChange(_SEARCH_TERM);
  }

  void _notifyChange(Symbol prop) {
    notifyChange(new PropertyChangeRecord(prop));
  }
}

class Note {
  final String title;
  final Content content;

  Note(this.title, this.content) {
    assert(title != null);
    assert(content != null);
  }

  // TODO: hashcode and ==

  @override
  String toString() => 'Note: $title';
}

abstract class Content {

}

class TextContent {
  final String value;

  TextContent(this.value) {
    assert(value != null);
  }

}<commit_msg>AppModel added notes, fixed inheritance for TextContent<commit_after>library nv.models;

import 'package:meta/meta.dart';
import 'package:observe/observe.dart';

class AppModel extends ChangeNotifierBase {
  static const _SEARCH_TERM = const Symbol('searchTerm');

  String _searchTerm = '';

  String get searchTerm => _searchTerm;

  void set searchTerm(String value) {
    _searchTerm = value;
    _notifyChange(_SEARCH_TERM);
  }

  final ObservableList<Note> notes = new ObservableList<Note>();

  void _notifyChange(Symbol prop) {
    notifyChange(new PropertyChangeRecord(prop));
  }
}

class Note {
  final String title;
  final Content content;

  Note(this.title, this.content) {
    assert(title != null);
    assert(content != null);
  }

  // TODO: hashcode and ==

  @override
  String toString() => 'Note: $title';
}

abstract class Content {

}

class TextContent extends Content {
  final String value;

  TextContent(this.value) {
    assert(value != null);
  }
}
{'fraction_non_alphanumeric': 0.11473626971179988, 'fraction_numerical': 0.0, 'mean_word_length': 4.013623978201635, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '190817', 'n_tokens_mistral': 585, 'n_tokens_neox': 567, 'n_words': 145}