-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat/v2.0.0 #85
feat/v2.0.0 #85
Conversation
Note that SignalBuilder
|_ Container
|_ Column
|_ SizedBox
|_ SignalBuilder
|_ Text <- signal watched here will rebuild both SignalBuilders |
Thanks for reporting 🙏, need to investigate further to fix this |
@jinyus can't reproduce the issue, this is the code I used to test import 'package:flutter/material.dart';
import 'package:flutter_solidart/flutter_solidart.dart';
final a = Signal(0);
final b = Signal(100);
class TestPage extends StatelessWidget {
const TestPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SignalBuilder(
builder: (_, __) {
print('build a');
return Column(
children: [
Text(a().toString()),
const Second(),
],
);
},
),
floatingActionButton: Column(
mainAxisSize: MainAxisSize.min,
children: [
TextButton(
onPressed: () => a.value++,
child: const Text('add to A'),
),
TextButton(
onPressed: () => b.value++,
child: const Text('add to B'),
),
],
),
);
}
}
class Second extends StatelessWidget {
const Second({super.key});
@override
Widget build(BuildContext context) {
return SignalBuilder(
builder: (_, __) {
print('build b');
return Text(b().toString());
},
);
}
} Can you share your code please? |
I'm no longer seeing this bug. I will have to investigate further. Consider this a non-issue for now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #85 +/- ##
=======================================
Coverage ? 100.00%
=======================================
Files ? 21
Lines ? 1166
Branches ? 0
=======================================
Hits ? 1166
Misses ? 0
Partials ? 0
|
CHORE: Improved
Solid
widget performance by more than 3000% in finding ancestor providers.During my performance tests, before I was able to observe up to
71
signals (provided through Solid) per second, now this numbers increased to2159
signals per second.FEAT: The
SignalBuilder
widget now automatically tracks theSignal
s used in thebuilder
function allowing you to react to any number of signals at the same time.Before:
Now:
BREAKING CHANGE: Removed
DualSignalBuilder
andTripleSignalBuilder
in favor ofSignalBuilder
.BREAKING CHANGE the
context.observe
methods (due to the performance improvements of theSolid
widget) now needs the type of signalBefore:
Now:
BREAKING CHANGE: Removed
ResourceBuilder
in favor ofSignalBuilder
FEAT: Add
batch
function to execute a callback that will not side-effect until its top-most batch is completed. See docs hereThe PR has still some problems:
TODOs