-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from xsoulspace/feature/dictionary-check
Feature/dictionary check
- Loading branch information
Showing
27 changed files
with
628 additions
and
289 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class AppConstraints { | ||
static final int mobileWidth = 350; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enum GameNotificationStatuses { warn, done, error } |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:word_by_word_game/constants/GameNotificationStatuses.dart'; | ||
import 'package:word_by_word_game/entities/LocalName.dart'; | ||
|
||
class GameNotification { | ||
final bool status; | ||
final GameNotificationStatuses status; | ||
final LocalName localName; | ||
GameNotification({@required this.status, @required this.localName}); | ||
final String newWord; | ||
GameNotification( | ||
{@required this.status, @required this.localName, this.newWord}); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:json_annotation/json_annotation.dart'; | ||
|
||
part 'LocalDictionaryModel.g.dart'; | ||
|
||
class LocalDictionaryModelConsts { | ||
static String storagename = 'localdictionary'; | ||
} | ||
|
||
@JsonSerializable(nullable: true) | ||
class LocalDictionaryModel extends ChangeNotifier { | ||
Set<String> _words; | ||
LocalDictionaryModel({Set<String> words}) { | ||
this._words = words ?? {}; | ||
} | ||
Set<String> get words => _words; | ||
void addWord(String value) { | ||
_words.add(value); | ||
notifyListeners(); | ||
} | ||
|
||
void reloadState({@required Set<String> words}) { | ||
_words.clear(); | ||
_words.addAll(words); | ||
} | ||
|
||
factory LocalDictionaryModel.fromJson(Map<String, dynamic> json) => | ||
_$LocalDictionaryModelFromJson(json); | ||
Map<String, dynamic> toJson() => _$LocalDictionaryModelToJson(this); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.