import 'package:flutter/material.dart'; buildScrolls(BuildContext context, Function navigation, Color couponsSurround, Color friendsSurround, Color recentlySurround, Color postsSurround) { return Container( height: 30, width: MediaQuery.of(context).size.width, child: ListView( scrollDirection: Axis.horizontal, children: [ Container( margin: EdgeInsets.symmetric(horizontal: 5.0), // padding: EdgeInsets.symmetric( // horizontal: 5.0, // ), width: 90, child: Material( color: postsSurround, elevation: 0, borderRadius: BorderRadius.circular(20.0), shadowColor: Theme.of(context).backgroundColor, child: InkWell( onTap: () => navigation(0), child: Padding( padding: const EdgeInsets.all(5.0), child: Center( child: Text( "Posts", style: TextStyle( fontSize: 15, // color: fTextColor1, ), ), ), ), ), ), ), Container( margin: EdgeInsets.symmetric(horizontal: 5.0), // padding: EdgeInsets.symmetric( // horizontal: 5.0, // ), width: 90, child: Material( color: friendsSurround, elevation: 0, borderRadius: BorderRadius.circular(20.0), shadowColor: Theme.of(context).backgroundColor, child: InkWell( onTap: () => navigation(1), child: Padding( padding: const EdgeInsets.all(5.0), child: Center( child: Text( "Friends", style: TextStyle( fontSize: 15, // color: fTextColor1, ), ), ), ), ), ), ), Container( margin: EdgeInsets.symmetric(horizontal: 5.0), // padding: EdgeInsets.symmetric( // horizontal: 5.0, // ), child: Material( color: recentlySurround, elevation: 0, borderRadius: BorderRadius.circular(20.0), shadowColor: Theme.of(context).backgroundColor, child: InkWell( onTap: () => navigation(2), child: Padding( padding: const EdgeInsets.all(5.0), child: Center( child: Text( "Recently Viewed", style: TextStyle( fontSize: 15, // color: fTextColor1, ), ), ), ), ), ), ), Container( margin: EdgeInsets.symmetric(horizontal: 5.0), // padding: EdgeInsets.symmetric( // horizontal: 5.0, // ), width: 90, child: Material( color: couponsSurround, elevation: 0, borderRadius: BorderRadius.circular(20.0), shadowColor: Theme.of(context).backgroundColor, child: InkWell( onTap: () => navigation(3), child: Padding( padding: const EdgeInsets.all(5.0), child: Center( child: Text( "Coupons", style: TextStyle( fontSize: 15, // color: fTextColor1, ), ), ), ), ), ), ), ], ), ); }