@@ -139,6 +139,7 @@ class AppStateX<T extends StatefulWidget> extends _AppState<T>
139139 Map <Type , Action <Intent >>? actions,
140140 String ? restorationScopeId,
141141 ScrollBehavior ? scrollBehavior,
142+ AnimationStyle ? themeAnimationStyle,
142143 super .errorHandler,
143144 super .errorScreen,
144145 super .errorReport,
@@ -187,6 +188,7 @@ class AppStateX<T extends StatefulWidget> extends _AppState<T>
187188 super .inActions,
188189 super .inRestorationScopeId,
189190 super .inScrollBehavior,
191+ super .inThemeAnimationStyle,
190192 }) : super (controller: controller ?? AppStateXController ()) {
191193 //
192194 _key = key;
@@ -272,6 +274,7 @@ class AppStateX<T extends StatefulWidget> extends _AppState<T>
272274 _actions = actions;
273275 _restorationScopeId = restorationScopeId;
274276 _scrollBehavior = scrollBehavior;
277+ _themeAnimationStyle = themeAnimationStyle;
275278 }
276279
277280 /// The 'App State Objects' [Key]
@@ -625,6 +628,8 @@ class AppStateX<T extends StatefulWidget> extends _AppState<T>
625628 actions: _actions ?? onActions (),
626629 restorationScopeId: _restorationScopeId ?? onRestorationScopeId (),
627630 scrollBehavior: _scrollBehavior ?? onScrollBehavior (),
631+ themeAnimationStyle:
632+ _themeAnimationStyle ?? onThemeAnimationStyle (),
628633 // Let the parameters run before the home parameter.
629634 home: _home ?? onHome (),
630635 );
@@ -682,6 +687,8 @@ class AppStateX<T extends StatefulWidget> extends _AppState<T>
682687 actions: _actions ?? onActions (),
683688 restorationScopeId: _restorationScopeId ?? onRestorationScopeId (),
684689 scrollBehavior: _scrollBehavior ?? onScrollBehavior (),
690+ themeAnimationStyle:
691+ _themeAnimationStyle ?? onThemeAnimationStyle (),
685692 );
686693 }
687694 }
@@ -912,6 +919,7 @@ abstract class _AppState<T extends StatefulWidget> extends s.AppStateX<T> {
912919 this .inActions,
913920 this .inRestorationScopeId,
914921 this .inScrollBehavior,
922+ this .inThemeAnimationStyle,
915923// }) : _statesRouteObserver = StatesRouteObserver(),
916924 }) : super (controller: controller) {
917925 // Listen to the device's connectivity.
@@ -1121,6 +1129,7 @@ abstract class _AppState<T extends StatefulWidget> extends s.AppStateX<T> {
11211129 Map <Type , Action <Intent >>? _actions;
11221130 String ? _restorationScopeId;
11231131 ScrollBehavior ? _scrollBehavior;
1132+ AnimationStyle ? _themeAnimationStyle;
11241133
11251134 /// Used to complete asynchronous operations
11261135 Future <bool > onInitAsync () async => await inInitAsync? .call () ?? true ;
@@ -1375,6 +1384,9 @@ abstract class _AppState<T extends StatefulWidget> extends s.AppStateX<T> {
13751384 /// Returns the App's [ScrollBehavior] if any.
13761385 ScrollBehavior ? onScrollBehavior () => inScrollBehavior? .call ();
13771386
1387+ /// Used to override the theme animation curve and duration.
1388+ AnimationStyle ? onThemeAnimationStyle () => inThemeAnimationStyle? .call ();
1389+
13781390 /// Perform asynchronous operations
13791391 final Future <bool > Function ()? inInitAsync;
13801392
@@ -1499,6 +1511,9 @@ abstract class _AppState<T extends StatefulWidget> extends s.AppStateX<T> {
14991511 /// Returns the App's [ScrollBehavior] if any.
15001512 final ScrollBehavior ? Function ()? inScrollBehavior;
15011513
1514+ /// Used to override the theme animation curve and duration.
1515+ final AnimationStyle ? Function ()? inThemeAnimationStyle;
1516+
15021517 /// Returns the App's 'Async Error Handler' if any.
15031518 final void Function (Object error)? inAsyncError;
15041519
@@ -2017,6 +2032,7 @@ class AppState<T extends StatefulWidget> extends AppStateX<T> {
20172032 super .actions,
20182033 super .restorationScopeId,
20192034 super .scrollBehavior,
2035+ super .themeAnimationStyle,
20202036 super .errorHandler,
20212037 super .errorScreen,
20222038 super .errorReport,
@@ -2065,5 +2081,6 @@ class AppState<T extends StatefulWidget> extends AppStateX<T> {
20652081 super .inActions,
20662082 super .inRestorationScopeId,
20672083 super .inScrollBehavior,
2084+ super .inThemeAnimationStyle,
20682085 });
20692086}
0 commit comments