-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Migrate package to use NNBD and rxdart ^0.27.0 (#21)
* Migrate package to use NNBD * Update plugin_platform_interface dependency version * Bump version to 1.3.0-nullsafety.1 * Use channel beta for the Github Actions * Fix deprecations and warnings * Update to rxdart ^0.27.0, refactor implementation * Use Flutter channel `stable` for CI * Update lower Dart SDK constraint to `2.12`, remove old analysis options * Don't explicitly initialise to `null` * Fix tests * Update homepage * Update gitignore, exclude IDE files * Migrate example app to NNBD, update its pubspec * Add SubjectValueWrapper * Make the _persist callback operate on the original type * Reformat * Adapt type checks to null-safety * Documentation improvements * Use a list instead of prose in HydratedSubject doc comment Co-authored-by: solid-vovabeloded <[email protected]> * Improve HydratedSubject doc comment readability Co-authored-by: solid-vovabeloded <[email protected]> * Remove `late` modifier in tests, remove unnecessary null check * Set value wrapper when hydrating * Fix wrapper not being set * Fix value setter * Fix hydration type casts * Fix value removal for primitive types * Autoformat * Use dedicated matchers * Make widget members private in example app * Move subject_value_wrapper.dart to src/model * Move implementation into `src` * Add export file * Move variables declaration list to the top of class declaration * Extract type check function into a utility class * Use a typedef for function declaration * Remove TypeComparisonFunction typedef, fix util class naming Co-authored-by: Yurii Prykhodko <[email protected]> Co-authored-by: solid-vovabeloded <[email protected]>
- Loading branch information
1 parent
df38649
commit 047f01e
Showing
16 changed files
with
550 additions
and
408 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
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,10 +1,75 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.dart_tool/ | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
|
||
build/ | ||
ios/.generated/ | ||
ios/Flutter/Generated.xcconfig | ||
ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/ephemeral | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
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,65 +1,22 @@ | ||
name: hydrated_demo | ||
description: A demo showcasing the Hydrated package. | ||
publish_to: 'none' | ||
|
||
# The following defines the version and build number for your application. | ||
# A version number is three numbers separated by dots, like 1.2.43 | ||
# followed by an optional build number separated by a +. | ||
# Both the version and the builder number may be overridden in flutter | ||
# build by specifying --build-name and --build-number, respectively. | ||
# Read more about versioning at semver.org. | ||
version: 1.0.0+1 | ||
|
||
environment: | ||
sdk: ">=2.6.0 <3.0.0" | ||
sdk: ">=2.12.0 <3.0.0" | ||
|
||
dependencies: | ||
flutter: | ||
sdk: flutter | ||
|
||
# The following adds the Cupertino Icons font to your application. | ||
# Use with the CupertinoIcons class for iOS style icons. | ||
cupertino_icons: ^0.1.2 | ||
hydrated: | ||
path: ../ | ||
|
||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
|
||
# For information on the generic Dart part of this file, see the | ||
# following page: https://www.dartlang.org/tools/pub/pubspec | ||
|
||
# The following section is specific to Flutter. | ||
flutter: | ||
# The following line ensures that the Material Icons font is | ||
# included with your application, so that you can use the icons in | ||
# the material Icons class. | ||
uses-material-design: true | ||
# To add assets to your application, add an assets section, like this: | ||
# assets: | ||
# - images/a_dot_burr.jpeg | ||
# - images/a_dot_ham.jpeg | ||
# An image asset can refer to one or more resolution-specific "variants", see | ||
# https://flutter.io/assets-and-images/#resolution-aware. | ||
# For details regarding adding assets from package dependencies, see | ||
# https://flutter.io/assets-and-images/#from-packages | ||
# To add custom fonts to your application, add a fonts section here, | ||
# in this "flutter" section. Each entry in this list should have a | ||
# "family" key with the font family name, and a "fonts" key with a | ||
# list giving the asset and other descriptors for the font. For | ||
# example: | ||
# fonts: | ||
# - family: Schyler | ||
# fonts: | ||
# - asset: fonts/Schyler-Regular.ttf | ||
# - asset: fonts/Schyler-Italic.ttf | ||
# style: italic | ||
# - family: Trajan Pro | ||
# fonts: | ||
# - asset: fonts/TrajanPro.ttf | ||
# - asset: fonts/TrajanPro_Bold.ttf | ||
# weight: 700 | ||
# | ||
# For details regarding fonts from package dependencies, | ||
# see https://flutter.io/custom-fonts/#from-packages |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.