@@ -88,126 +88,126 @@ class _MyHomePageState extends State<MyHomePage>
8888 ),
8989 body:
9090
91- // ListView.builder(
92- // itemCount: imageList.length,
93- // itemBuilder: (context, index) => GFStickyHeaderBuilder(
94- // direction: Axis.horizontal,
95- // // enableHeaderOverlap: true,
96- // // stickyContentPosition: GFPosition.end,
97- // stickyContentBuilder:
98- // (BuildContext context, double stuckValue) {
99- // stuckValue = 1.0 - stuckValue.clamp(0.0, 1.0);
100- // return Container(
101- // height: 50,
102- // width: MediaQuery.of(context).size.width * 0.5,
103- // color: Color.lerp(Colors.teal[100], Colors.teal[600], stuckValue),
104- // padding: const EdgeInsets.symmetric(horizontal: 16),
105- // alignment: Alignment.centerLeft,
106- // child: Row(
107- // children: <Widget>[
108- // Expanded(
109- // child: Text(
110- // 'Image #$index',
111- // style: const TextStyle(color: Colors.white),
112- // ),
113- // ),
114- // Offstage(
115- // offstage: stuckValue <= 0.0,
116- // child: Opacity(
117- // opacity: stuckValue,
118- // child: IconButton(
119- // icon: const Icon(Icons.image, color: Colors.white),
120- // onPressed: () =>
121- // Scaffold.of(context).showSnackBar(SnackBar(content: Text('Favorite #$index'))),
122- // ),
123- // ),
124- // ),
125- // ],
126- // ),
127- // );
128- // },
129- // content: Container(
130- // // margin: EdgeInsets.all(8),
131- // height: 200,
132- // width: MediaQuery.of(context).size.width * 0.5,
133- // color: Colors.teal,
134- // child: Image.network(imageList[index],
135- // fit: BoxFit.cover, width: 100, height: 200),
136- // ),
137- // ))
138- // );
91+ // ListView.builder(
92+ // itemCount: imageList.length,
93+ // itemBuilder: (context, index) => GFStickyHeaderBuilder(
94+ // direction: Axis.horizontal,
95+ // // enableHeaderOverlap: true,
96+ // // stickyContentPosition: GFPosition.end,
97+ // stickyContentBuilder:
98+ // (BuildContext context, double stuckValue) {
99+ // stuckValue = 1.0 - stuckValue.clamp(0.0, 1.0);
100+ // return Container(
101+ // height: 50,
102+ // width: MediaQuery.of(context).size.width * 0.5,
103+ // color: Color.lerp(Colors.teal[100], Colors.teal[600], stuckValue),
104+ // padding: const EdgeInsets.symmetric(horizontal: 16),
105+ // alignment: Alignment.centerLeft,
106+ // child: Row(
107+ // children: <Widget>[
108+ // Expanded(
109+ // child: Text(
110+ // 'Image #$index',
111+ // style: const TextStyle(color: Colors.white),
112+ // ),
113+ // ),
114+ // Offstage(
115+ // offstage: stuckValue <= 0.0,
116+ // child: Opacity(
117+ // opacity: stuckValue,
118+ // child: IconButton(
119+ // icon: const Icon(Icons.image, color: Colors.white),
120+ // onPressed: () =>
121+ // Scaffold.of(context).showSnackBar(SnackBar(content: Text('Favorite #$index'))),
122+ // ),
123+ // ),
124+ // ),
125+ // ],
126+ // ),
127+ // );
128+ // },
129+ // content: Container(
130+ // // margin: EdgeInsets.all(8),
131+ // height: 200,
132+ // width: MediaQuery.of(context).size.width * 0.5,
133+ // color: Colors.teal,
134+ // child: Image.network(imageList[index],
135+ // fit: BoxFit.cover, width: 100, height: 200),
136+ // ),
137+ // ))
138+ // );
139139
140- // Center(
141- // // alignment: AlignmentDirectional.center,
142- // child: ListView.builder(
143- // itemCount: imageList.length,
144- // itemBuilder: (context, index) => GFStickyHeaderBuilder(
145- // direction: Axis.vertical,
146- // // enableHeaderOverlap: true,
147- // // stickyContentPosition: GFPosition.end,
148- // stickyContentBuilder:
149- // (BuildContext context, double stuckValue) {
150- // stuckValue = 1.0 - stuckValue.clamp(0.0, 1.0);
151- // return Center(
152- // child: Container(
153- // height: 50.0,
154- // width: 100,
155- // color:
156- // Colors.grey[900].withOpacity(0.6 + stuckValue * 0.4),
157- // padding: EdgeInsets.symmetric(horizontal: 16.0),
158- // alignment: Alignment.centerLeft,
159- // child: Text(
160- // 'Header #$index',
161- // style: const TextStyle(color: Colors.white),
162- // ),
163- // ),
164- // );
165- // },
166- // content: Container(
167- // // margin: EdgeInsets.all(8),
168- // height: 200,
169- // width: 200,
170- // color: Colors.teal,
171- // child: Image.network(imageList[index],
172- // fit: BoxFit.cover, width: 100, height: 200.0),
173- // ),
174- // ))),
175- // );
140+ // Center(
141+ // // alignment: AlignmentDirectional.center,
142+ // child: ListView.builder(
143+ // itemCount: imageList.length,
144+ // itemBuilder: (context, index) => GFStickyHeaderBuilder(
145+ // direction: Axis.vertical,
146+ // // enableHeaderOverlap: true,
147+ // // stickyContentPosition: GFPosition.end,
148+ // stickyContentBuilder:
149+ // (BuildContext context, double stuckValue) {
150+ // stuckValue = 1.0 - stuckValue.clamp(0.0, 1.0);
151+ // return Center(
152+ // child: Container(
153+ // height: 50.0,
154+ // width: 100,
155+ // color:
156+ // Colors.grey[900].withOpacity(0.6 + stuckValue * 0.4),
157+ // padding: EdgeInsets.symmetric(horizontal: 16.0),
158+ // alignment: Alignment.centerLeft,
159+ // child: Text(
160+ // 'Header #$index',
161+ // style: const TextStyle(color: Colors.white),
162+ // ),
163+ // ),
164+ // );
165+ // },
166+ // content: Container(
167+ // // margin: EdgeInsets.all(8),
168+ // height: 200,
169+ // width: 200,
170+ // color: Colors.teal,
171+ // child: Image.network(imageList[index],
172+ // fit: BoxFit.cover, width: 100, height: 200.0),
173+ // ),
174+ // ))),
175+ // );
176176
177- Container (
178- height: 600 ,
179- color: Colors .teal,
180- child: ListView .builder (
181- itemCount: imageList.length,
182- itemBuilder: (context, index) => GFStickyHeader (
183- enableHeaderOverlap: true ,
184- direction: Axis .vertical ,
185- stickyContentPosition: GFPosition .end,
186- stickyContent: Container (
187- // alignment: AlignmentDirectional.centerEnd,
188- child: Container (
189- alignment: AlignmentDirectional .center,
190- height: 50 ,
191- width: 100 ,
192- color: Colors .blueGrey[700 ],
193- padding: EdgeInsets .symmetric (horizontal: 16.0 ),
194- child: Text (
195- 'Image $index ' ,
196- style: const TextStyle (color: Colors .white),
197- ),
198- ),
199- ),
200- content: Container (
201- // height: 100,
202- width: 200 ,
203- child: Image .network (imageList[index],
204- fit : BoxFit .cover, height : 100 ,
205- ) ,
206- ) ,
207- )
208- ),
209- )
210- );
177+ Container (
178+ height: 600 ,
179+ color: Colors .teal,
180+ child: ListView .builder (
181+ itemCount: imageList.length,
182+ itemBuilder: (context, index) => GFStickyHeader (
183+ // enableHeaderOverlap: true,
184+ direction: Axis .horizontal ,
185+ stickyContentPosition: GFPosition .end,
186+ stickyContent: Container (
187+ // alignment: AlignmentDirectional.centerEnd,
188+ child: Container (
189+ alignment: AlignmentDirectional .center,
190+ height: 50 ,
191+ width: 100 ,
192+ color: Colors .blueGrey[700 ],
193+ padding: EdgeInsets .symmetric (horizontal: 16.0 ),
194+ child: Text (
195+ 'Image $index ' ,
196+ style: const TextStyle (color: Colors .white),
197+ ),
198+ ),
199+ ),
200+ content: Container (
201+ // height: 100,
202+ width: 200 ,
203+ child: Image .network (
204+ imageList[index] ,
205+ fit : BoxFit .cover ,
206+ height : 100 ,
207+ ),
208+ ),
209+ )),
210+ ) );
211211
212212// ListView(
213213// children: [
0 commit comments