Skip to content

Commit 3adf880

Browse files
committed
adding comments to gfFloatingWidget
1 parent f10df4e commit 3adf880

2 files changed

Lines changed: 3 additions & 27 deletions

File tree

example/lib/main.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,15 @@ class _MyHomePageState extends State<MyHomePage> {
8888

8989
body:
9090
GFFloatingWidget(
91-
// horizontalPosition: screenHeight * 0.1,
91+
horizontalPosition: screenHeight * 0.1,
9292
// verticalPosition: screenWidth* 0.2,
9393
child: GFToast(
9494
backgroundColor: GFColor.warning,
9595

9696
button: GFButton(
9797
type: GFType.outline,
98-
text: 'CLICK',
98+
text: 'OK',
9999
onPressed: null,
100-
// position: GFPosition.end,
101100
),
102101
text: 'Marked as Favorite ',
103102
),

lib/components/toast/gf_floating_widget.dart

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class GFFloatingWidget extends StatefulWidget {
1111
this.horizontalPosition,
1212
this.verticalPosition,
1313
this.body
14-
1514
}) : super(key: key);
1615

1716

@@ -35,39 +34,17 @@ class _GFFloatingWidgetState extends State<GFFloatingWidget> {
3534
var screenHeight = MediaQuery.of(context).size.height;
3635
return Stack(
3736
children: <Widget>[
38-
// widget.child != null? widget.child : MyHomePage(),
39-
// Container(
40-
// height: screenHeight,
41-
// width: screenWidth,
42-
// color: Colors.orange,
43-
// ),
4437
Container(
45-
// height: screenHeight,
46-
// width: screenWidth,
4738
child: widget.body ?? Container(),
4839
),
4940
Positioned(
5041
top: widget.horizontalPosition != null ? widget.horizontalPosition : 0,
51-
left: widget.verticalPosition != null ? widget.verticalPosition : 0,
52-
53-
// top:20,
42+
left: widget.verticalPosition != null ? widget.verticalPosition : 0,
5443
child: Container(
55-
height: 60,
5644
width: MediaQuery.of(context).size.width,
5745
child: widget.child ?? Container(),
5846
)
5947
),
60-
61-
62-
// Positioned(
63-
// top:MediaQuery.of(context).size.height * 0.3,
64-
//// top:30,
65-
// child: GFToast(
66-
// text: 'hi',
67-
// )
68-
// )
69-
70-
7148
],
7249
);
7350
}

0 commit comments

Comments
 (0)