File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,24 @@ class GFAlert extends StatefulWidget {
6161}
6262
6363class _GFAlertState extends State <GFAlert > with TickerProviderStateMixin {
64+ String title;
65+ String content;
66+ Widget child;
67+ Widget contentChild;
68+ Widget bottombar;
69+
70+
6471 AnimationController animationController;
6572 Animation <double > animation;
6673
6774 @override
6875 void initState () {
76+ content= widget.content;
77+ title = widget.title;
78+ child= widget.child;
79+ contentChild= widget.contentChild;
80+ bottombar= widget.bottombar;
81+
6982 animationController = AnimationController (
7083 duration: const Duration (milliseconds: 300 ),
7184 vsync: this ,
@@ -84,6 +97,18 @@ class _GFAlertState extends State<GFAlert> with TickerProviderStateMixin {
8497 super .dispose ();
8598 }
8699
100+
101+
102+ @override
103+ void didUpdateWidget (GFAlert oldWidget){
104+ content= widget.content;
105+ title = widget.title;
106+ child= widget.child;
107+ contentChild= widget.contentChild;
108+ bottombar= widget.bottombar;
109+ super .didUpdateWidget (oldWidget);
110+ }
111+
87112 @override
88113 Widget build (BuildContext context) => FadeTransition (
89114 opacity: animation,
Original file line number Diff line number Diff line change @@ -37,6 +37,20 @@ class GFFloatingWidget extends StatefulWidget {
3737}
3838
3939class _GFFloatingWidgetState extends State <GFFloatingWidget > {
40+
41+ Widget child;
42+
43+ @override
44+ void initState () {
45+ child= widget.child;
46+ super .initState ();
47+ }
48+
49+ @override
50+ void didUpdateWidget (GFFloatingWidget oldWidget){
51+ child= widget.child;
52+ super .didUpdateWidget (oldWidget);
53+ }
4054 @override
4155 Widget build (BuildContext context) => Stack (
4256 alignment: Alignment .center,
You can’t perform that action at this time.
0 commit comments