1+ import 'package:flutter/material.dart' ;
2+ import './stories.dart' ;
3+
4+ class PostWrapper extends StatelessWidget {
5+ // PostWrapper.ScrollNotification();
6+ // MediaQuery.of(context).Size
7+ @override
8+ // void disallowGlow ()
9+ Widget build (BuildContext context) {
10+ final Size screenSize = MediaQuery .of (context).size;
11+ print (screenSize);
12+ return new Container (
13+ color: Colors .transparent,
14+ // height: screenSize.height - 150.0,
15+ constraints: new BoxConstraints (maxHeight: screenSize.height - 120.0 ),
16+ child: new ListView .builder (
17+ itemCount: 20 ,
18+ padding: new EdgeInsets .all (0.0 ),
19+ scrollDirection: Axis .vertical,
20+ // itemExtent: 130.0,
21+ itemBuilder: (context,index) {
22+ print (MediaQuery .of (context).size);
23+ if (index == 0 ) {
24+ return new MyStories ();
25+ } else {
26+ return new Post ();
27+ }
28+ },
29+ )
30+ );
31+ }
32+ }
33+
34+ class Post extends StatelessWidget {
35+ @override
36+ Widget build (BuildContext context) => new Container (
37+ child: new Column (
38+ children: < Widget > [
39+ new Row (
40+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
41+ children: < Widget > [
42+ new Container (
43+ margin: new EdgeInsets .only (top: 5.0 ,left: 5.0 ),
44+ child: new Row (
45+ children: < Widget > [
46+ new PostIcon (),
47+ new Container (
48+ padding: new EdgeInsets .only (left: 5.0 ),
49+ child: new Text ('data' ,style: new TextStyle (fontSize: 12.0 ),),
50+ )
51+ ],
52+ ),
53+ ),
54+ new IconButton (
55+ icon: new Icon (Icons .more_vert),
56+ )
57+ ],
58+ )
59+ ],
60+ ),
61+ );
62+ }
63+
64+ class PostIcon extends StatelessWidget {
65+ @override
66+ Widget build (BuildContext context) => new Stack (
67+ children: < Widget > [
68+ new Container (
69+ height: 34.0 ,
70+ width: 34.0 ,
71+ decoration: new BoxDecoration (
72+ borderRadius: new BorderRadius .circular (50.5 ),
73+ gradient: new LinearGradient (
74+ colors: [
75+ const Color (0xFFfdf497 ),
76+ const Color (0xFFfd5949 ),
77+ const Color (0xFFd6249f ),
78+ const Color (0xFF285AEB ),
79+ ],
80+ begin: Alignment .bottomLeft,
81+ end: Alignment .topRight,
82+ stops: [0.05 ,0.30 ,0.60 , 1.0 ],
83+ tileMode: TileMode .clamp
84+ ),
85+ ),
86+ ),
87+ new Container (
88+ height: 30.0 ,
89+ width: 30.0 ,
90+ margin: new EdgeInsets .only (top: 2.0 ,left: 2.0 ),
91+ decoration: new BoxDecoration (
92+ borderRadius: new BorderRadius .circular (50.5 ),
93+ border: new Border .all (
94+ width: 2.0 ,
95+ color: Colors .white
96+ )
97+ ),
98+ child: new CircleAvatar (
99+ radius: 50.5 ,
100+ backgroundImage: new NetworkImage ('https://instagram.fbom1-2.fna.fbcdn.net/vp/c3e31ba6c731d53a586571c7bf69b687/5B14A9B9/t51.2885-19/s150x150/25025729_167768233981692_3323823934234689536_n.jpg' ),
101+ ),
102+ ),
103+
104+ ],
105+ );
106+ }
0 commit comments