diff --git a/project/FrontEnd/collaborative_science_platform/lib/screens/home_page/widgets/select_buttons.dart b/project/FrontEnd/collaborative_science_platform/lib/screens/home_page/widgets/select_buttons.dart index 4c9ea42f..6226c023 100644 --- a/project/FrontEnd/collaborative_science_platform/lib/screens/home_page/widgets/select_buttons.dart +++ b/project/FrontEnd/collaborative_science_platform/lib/screens/home_page/widgets/select_buttons.dart @@ -21,27 +21,35 @@ class _SelectButtonsState extends State { @override Widget build(BuildContext context) { - return Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SelectButton( - index: 0, name: "Trending", selected: selectedIndex == 0, onPressed: selectOne), - const SizedBox(width: 10.0), - SelectButton(index: 1, name: "Latest", selected: selectedIndex == 1, onPressed: selectOne), - const SizedBox(width: 10.0), - SelectButton( - index: 2, name: "Most Read", selected: selectedIndex == 2, onPressed: selectOne), - const SizedBox(width: 10.0), - SelectButton(index: 3, name: "Random", selected: selectedIndex == 3, onPressed: selectOne), - // if (Provider.of(context).isSignedIn) - // Row( - // children: [ - // const SizedBox(width: 10.0), - // SelectButton( - // index: 4, name: "For You", selected: selectedIndex == 4, onPressed: selectOne), - // ], - // ), - ], + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SelectButton( + index: 0, name: "Trending", selected: selectedIndex == 0, onPressed: selectOne), + const SizedBox(width: 10.0), + SelectButton( + index: 1, name: "Latest", selected: selectedIndex == 1, onPressed: selectOne), + const SizedBox(width: 10.0), + SelectButton( + index: 2, name: "Most Read", selected: selectedIndex == 2, onPressed: selectOne), + const SizedBox(width: 10.0), + SelectButton( + index: 3, name: "Random", selected: selectedIndex == 3, onPressed: selectOne), + // if (Provider.of(context).isSignedIn) + // Row( + // children: [ + // const SizedBox(width: 10.0), + // SelectButton( + // index: 4, name: "For You", selected: selectedIndex == 4, onPressed: selectOne), + // ], + // ), + ], + ), + ), ); } }