Skip to content

Commit

Permalink
format and add more information to pubsec
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentCatD committed Aug 30, 2022
1 parent 9f33ecf commit 9ec4295
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions lib/inherited_rxdart.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library inherited_rxdart;

export 'package:rxdart/rxdart.dart';

export 'src/exception.dart'
show
RxBlocMustBeOfSpecificTypeException,
Expand Down
1 change: 0 additions & 1 deletion lib/src/rx_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ abstract class RxSingleStateBloc extends RxBlocBase<RxSingleStateBloc> {
abstract class RxSilentBloc<S> extends RxBlocBase<S> {
RxSilentBloc(S initialState) : super(BehaviorSubject<S>.seeded(initialState));


@override
@nonVirtual
bool get shouldSkipFirstBuild => true;
Expand Down
17 changes: 7 additions & 10 deletions lib/src/rx_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class _RxSelectorBaseState<B extends RxBlocBase, S, T>
@override
void didChangeDependencies() {
super.didChangeDependencies();
_state = context
.watch<B>()
.state;
_state = context.watch<B>().state;
_value = widget.stateRebuildSelector(_state);
}

Expand All @@ -55,20 +53,19 @@ class RxSelector<B extends RxSilentBloc<S>, S, T>
required StateRebuildSelector<S, T> stateRebuildSelector,
required RxBlocWidgetBuilder<S> builder,
}) : super(
key: key,
stateRebuildSelector: stateRebuildSelector,
builder: builder);
key: key,
stateRebuildSelector: stateRebuildSelector,
builder: builder);
}


class RxSingleStateSelector<B extends RxSingleStateBloc, T>
extends _RxSelectorBase<B, B, T> {
const RxSingleStateSelector({
Key? key,
required StateRebuildSelector<B, T> stateRebuildSelector,
required RxBlocWidgetBuilder<B> builder,
}) : super(
key: key,
stateRebuildSelector: stateRebuildSelector,
builder: builder);
key: key,
stateRebuildSelector: stateRebuildSelector,
builder: builder);
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: inherited_rxdart
description: A package that combine power of inherited widget and rxdart
description: "Inherited RxDart is a state management library that combine the power of InheritedWidget and RxDart, a simple and elegant state management solution for apps of any scale"
version: 0.0.1
homepage: https://github.com/SilentCatD/inherited_rxdart
issue_tracker: https://github.com/SilentCatD/inherited_rxdart/issues
Expand Down
1 change: 0 additions & 1 deletion test/inherited_rx_dart_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

void main() {
// test('adds one to input values', () {
// final calculator = Calculator();
Expand Down

0 comments on commit 9ec4295

Please sign in to comment.