Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Widget _category() {
- return new FutureBuilder(
- future: _fetchCategory(),
- builder: (context, snapshot) {
- if (snapshot.data != null) {
- return Container(
- height: 250,
- child: GridView.builder(
- gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
- crossAxisCount: 3),
- itemCount: snapshot.data.length,
- itemBuilder: (context, index) {
- return Container(
- padding: EdgeInsets.only(top: 30),
- child: Column(children: <Widget>[
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Column(
- children: <Widget>[
- Container(
- padding: EdgeInsets.all(15),
- child: Text(
- snapshot.data[index].text,
- style: TextStyle(color: Colors.black),
- ),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius:
- BorderRadius.all(Radius.circular(5)),
- boxShadow: [
- BoxShadow(
- color: Colors.black54,
- blurRadius: 5.0,
- offset: Offset(
- 1.0,
- 2.0,
- ),
- )
- ],
- ),
- ),
- ],
- ),
- ])
- ]));
- },
- ));
- }
- return new CircularProgressIndicator();
- },
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement