Commit b60f94e8 authored by 何碧荣's avatar 何碧荣

发现页

parent ccf6761f
......@@ -4,6 +4,7 @@ import 'package:gmalpha_flutter/FindModel/page/FindModel.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/common.dart';
import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
class FindPage extends StatefulWidget {
FindModel _findModel;
......@@ -21,7 +22,7 @@ class _FindPageState extends BasePage<FindPage> {
FindModel _findModel;
static int count = 8;
static int page = 1;
ScrollController _scrollController = new ScrollController();
_FindPageState(this._findModel);
@override
......@@ -29,12 +30,35 @@ class _FindPageState extends BasePage<FindPage> {
ScreenUtil.instance = ScreenUtil(width: 375.0, height: 667.0)
..init(context);
return Scaffold(
appBar: AppBar(
centerTitle: false,
leading: messageTitle('发现'),
elevation: 0,
backgroundColor: ALColors.ColorFFFFFF,
),
appBar: AppBar(
centerTitle: false,
leading: messageTitle('发现'),
elevation: 0,
backgroundColor: ALColors.ColorFFFFFF,
),
body: new Padding(
padding: const EdgeInsets.only(top: 0.0),
child: listItemInfo(),
));
}
Widget listItemInfo() {
return new StaggeredGridView.countBuilder(
controller: _scrollController,
crossAxisCount: 4,
itemCount: 20,
itemBuilder: (BuildContext context, int index) => new Container(
color: Colors.green,
child: new Center(
child: new CircleAvatar(
backgroundColor: Colors.white,
child: new Text('$index'),
),
)),
staggeredTileBuilder: (int index) =>
new StaggeredTile.count(2, index.isEven ? 2 : 1),
mainAxisSpacing: 4.0,
crossAxisSpacing: 4.0,
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment