Skip to content

Commit

Permalink
4.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Drawner committed Nov 26, 2023
1 parent 0117fcb commit d4b0e74
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 33 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

## 4.8.3
November 26, 2023
- Allow additional controllers to call their initState() if added in a previous initState() call
while (cnt < controllerList.length) {
- Container() to SizedBox() in splash_screen.dart

## 4.8.2
October 25, 2023
- didUpdateController() in didUpdateWidget() in special cases
Expand Down
6 changes: 3 additions & 3 deletions example/lib/src/view/app/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class SplashScreen extends StatelessWidget {
const SplashScreen({super.key});

@override
Widget build(BuildContext context) => OverflowBox(
Widget build(BuildContext context) => const OverflowBox(
minWidth: 0,
minHeight: 0,
maxWidth: double.infinity,
maxHeight: double.infinity,
child: Container(
child: SizedBox(
width: 100,
height: 100,
child: const Image(image: AssetImage('assets/images/meow.gif')),
child: Image(image: AssetImage('assets/images/meow.gif')),
),
);
}
21 changes: 9 additions & 12 deletions lib/state_extended.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,18 @@ abstract class StateX<T extends StatefulWidget> extends State<StatefulWidget>
/// Place in the[didUpdateWidget] function in the special case
/// the StatefulWidget supplies the controller:
/// e.g. didUpdateController(oldWidget.controller, widget.controller);
bool didUpdateController(
StateXController? oldController,
StateXController? newController,
) {
bool update =
oldController != null && newController != null && _controller != null;
bool didUpdateController({
StateXController? oldCon,
StateXController? newCon,
}) {
bool update = oldCon != null && newCon != null && _controller != null;
// Test if supplied the parameters and there's a 'first' controller, _controller
if (update) {
// Don't bother if it's the same controller instance.
update = _controller!.identifier != oldController.identifier;
update = _controller!.identifier != oldCon.identifier;

if (update) {
_controller = newController;
_controller = newCon;
}
}
return update;
Expand Down Expand Up @@ -264,10 +263,8 @@ abstract class StateX<T extends StatefulWidget> extends State<StatefulWidget>
int cnt = 0;
StateXController con;

// While loop so additional controllers can be added in a previous initState()
final list = controllerList.length;

while (cnt < list) {
// Loop the active list itself the so additional controllers can be added in a previous initState()
while (cnt < controllerList.length) {
con = controllerList[cnt];
// Add this to the _StateSets Map
con._addStateToSetter(this);
Expand Down
34 changes: 17 additions & 17 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
example:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -154,10 +154,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: transitive
description:
Expand All @@ -170,10 +170,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.2"
process:
dependency: transitive
description:
Expand All @@ -199,18 +199,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand Down Expand Up @@ -239,10 +239,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -271,18 +271,18 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev"
source: hosted
version: "11.7.1"
version: "11.10.0"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
webdriver:
dependency: transitive
description:
Expand All @@ -292,5 +292,5 @@ packages:
source: hosted
version: "3.0.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=1.17.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: state_extended
description: This class extends the capabilities of Flutter's State class and includes a controller.
version: 4.8.2
version: 4.8.3
homepage: https://www.andrioussolutions.com
repository: https://github.com/AndriousSolutions/state_extended

Expand Down

0 comments on commit d4b0e74

Please sign in to comment.