Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to package:hive_flutter #698

Merged
merged 5 commits into from Jun 18, 2021
Merged

Updates to package:hive_flutter #698

merged 5 commits into from Jun 18, 2021

Conversation

baumths
Copy link

@baumths baumths commented Jun 17, 2021

Closes #691 exporting Color and TimeOfDay adapters:

  • The adapters are being exporter from a different file adapters.dart to avoid naming conflicts for users that define their own Color & TimeOfDay adapters.
  • import 'package:hive_flutter/adapters.dart';

Improves pub score by conditionally importing packages that depend on dart:io (path & path_provider).

  • Adds tag Web to the package at pub.dev.

Tried fixing #688 for null safety badge on pub.dev

flutter pub global run pana outputs error:

✗ Support sound null safety (0 / 20)
[x] 0/20 points: Null safety support has one or more issues

Tag detection failed.

Broken import dart:indexed_db

For more information

Try running dart pub outdated --mode=null-safety.
Be sure to read the migration guide.

  • See: Allow using dart:indexed_db in flutter apps flutter/flutter#44937.
  • flutter pub outdated --mode=null-safety outputs:

    Showing dependencies that are currently not opted in to null-safety.
    [✗] indicates versions without null safety support.
    [✓] indicates versions opting in to null safety.

    All your dependencies declare support for null-safety.

@themisir feel free to request changes.

mbaumgartenbr added 4 commits June 17, 2021 10:31
Exporting in a diferent file so users that have created their own
Color and TimeOfDay adapters don't get naming conflicts.
Improves pub score by conditionally importing path and path_provider
I forgot Mockito depends on build_runner
Copy link
Contributor

@themisir themisir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

hive_flutter/lib/src/adapters/time_adapter.dart Outdated Show resolved Hide resolved
@baumths
Copy link
Author

baumths commented Jun 18, 2021

@themisir I have fixed the TimeAdapter issue, have a look now (had to fix the tests too) now I think it is good to go.

Copy link
Contributor

@themisir themisir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about that?

hive_flutter/lib/src/adapters/time_adapter.dart Outdated Show resolved Hide resolved
hive_flutter/lib/src/adapters/time_adapter.dart Outdated Show resolved Hide resolved
- The old TimeAdapter was stack overflowing.
- Renamed TimeAdapter to TimeOfDayAdapter for consistency.
- CRUD works now for both color and timeOfDay adapters.

Update hive_flutter/lib/src/adapters/time_adapter.dart

Co-authored-by: Misir Jafarov <misir.ceferov@gmail.com>

- @themisir reduced read/write operation to  1.
@baumths
Copy link
Author

baumths commented Jun 18, 2021

@themisir done.

@themisir themisir merged commit f370eaa into isar:master Jun 18, 2021
@themisir themisir linked an issue Jun 20, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hive_flutter] Flutter adapters aren't exported [hive_flutter] Null-safety support
2 participants