Commit 90592f3e authored by Nguyễn Minh Nhật's avatar Nguyễn Minh Nhật

nmn update

parent f16c9d4e
...@@ -13,7 +13,7 @@ class BottomSheetWidget extends StatelessWidget { ...@@ -13,7 +13,7 @@ class BottomSheetWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 2.h, bottom: 10.h), padding: EdgeInsets.only(left: 10.w, right: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey.shade800, color: Colors.grey.shade800,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
...@@ -162,7 +162,9 @@ class BottomSheetWidget extends StatelessWidget { ...@@ -162,7 +162,9 @@ class BottomSheetWidget extends StatelessWidget {
SizedBox( SizedBox(
height: 12.h, height: 12.h,
), ),
ElevatedButton( SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () { onPressed: () {
Get.back(); Get.back();
}, },
...@@ -171,14 +173,14 @@ class BottomSheetWidget extends StatelessWidget { ...@@ -171,14 +173,14 @@ class BottomSheetWidget extends StatelessWidget {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
minimumSize: Size.fromHeight(40.h),
), ),
child: Text( child: Text(
'Done', 'Done',
style: TextStyleUtils.sizeText14Weight500()! style: TextStyleUtils.sizeText14Weight500()!
.copyWith(color: Colors.black87), .copyWith(color: Colors.black87),
), ),
) ),
)
], ],
), ),
); );
......
...@@ -35,7 +35,7 @@ class TeamsScreenController extends GetxController { ...@@ -35,7 +35,7 @@ class TeamsScreenController extends GetxController {
@override @override
void onInit() { void onInit() {
// TODO: implement onInit
super.onInit(); super.onInit();
getListTeam(''); getListTeam('');
getFavouriteTeams(); getFavouriteTeams();
...@@ -43,7 +43,7 @@ class TeamsScreenController extends GetxController { ...@@ -43,7 +43,7 @@ class TeamsScreenController extends GetxController {
controllerSearchScroll = ScrollController()..addListener(_loadMoreSearch); controllerSearchScroll = ScrollController()..addListener(_loadMoreSearch);
} }
/// todo: Method refresh
void onRefresh() async { void onRefresh() async {
getListTeam(''); getListTeam('');
getFavouriteTeams(); getFavouriteTeams();
...@@ -51,7 +51,7 @@ class TeamsScreenController extends GetxController { ...@@ -51,7 +51,7 @@ class TeamsScreenController extends GetxController {
} }
/// todo: Method get teams
void getListTeam(String? name) async{ void getListTeam(String? name) async{
await _teamRepo.getListTeam(0, 20, name).then((value) async { await _teamRepo.getListTeam(0, 20, name).then((value) async {
if(value.state == Status.SUCCESS) { if(value.state == Status.SUCCESS) {
...@@ -60,7 +60,7 @@ class TeamsScreenController extends GetxController { ...@@ -60,7 +60,7 @@ class TeamsScreenController extends GetxController {
}); });
} }
/// todo: Method add team to list favourite
void addFavourite(List<ItemTeams> favourites, List listNotifyMatch, List listNotifyNews, ItemTeams item) async { void addFavourite(List<ItemTeams> favourites, List listNotifyMatch, List listNotifyNews, ItemTeams item) async {
await _teamRepo.addTeamFollow(favourites, listNotifyMatch, listNotifyNews).then((value) { await _teamRepo.addTeamFollow(favourites, listNotifyMatch, listNotifyNews).then((value) {
if(value.state == Status.SUCCESS) { if(value.state == Status.SUCCESS) {
...@@ -72,7 +72,6 @@ class TeamsScreenController extends GetxController { ...@@ -72,7 +72,6 @@ class TeamsScreenController extends GetxController {
}); });
} }
/// todo: Method get list favourite team
void getFavouriteTeams() async{ void getFavouriteTeams() async{
await _teamRepo.getFavouriteTeams().then((value) { await _teamRepo.getFavouriteTeams().then((value) {
if(value.state == Status.SUCCESS) { if(value.state == Status.SUCCESS) {
...@@ -81,7 +80,6 @@ class TeamsScreenController extends GetxController { ...@@ -81,7 +80,6 @@ class TeamsScreenController extends GetxController {
}); });
} }
/// todo: delete favourite team
void deleteFavouriteTeam(String id) async{ void deleteFavouriteTeam(String id) async{
await _teamRepo.delFavouriteTeam(id).then((value) { await _teamRepo.delFavouriteTeam(id).then((value) {
if(value.state == Status.SUCCESS) { if(value.state == Status.SUCCESS) {
...@@ -93,7 +91,6 @@ class TeamsScreenController extends GetxController { ...@@ -93,7 +91,6 @@ class TeamsScreenController extends GetxController {
}); });
} }
/// todo: add team to favourite list
void addFavouriteTeam(BuildContext context, int index, SwitchController switchController) { void addFavouriteTeam(BuildContext context, int index, SwitchController switchController) {
teams[index].favourite = !teams[index].favourite; teams[index].favourite = !teams[index].favourite;
isFavourite.value = teams[index].favourite; isFavourite.value = teams[index].favourite;
...@@ -125,7 +122,6 @@ class TeamsScreenController extends GetxController { ...@@ -125,7 +122,6 @@ class TeamsScreenController extends GetxController {
update(); update();
} }
/// todo: load more
void _scrollTeams(){ void _scrollTeams(){
if(controllerEx.position.pixels == controllerEx.position.maxScrollExtent){ if(controllerEx.position.pixels == controllerEx.position.maxScrollExtent){
if(itemLoadMoreEx.isNotEmpty){ if(itemLoadMoreEx.isNotEmpty){
...@@ -146,7 +142,6 @@ class TeamsScreenController extends GetxController { ...@@ -146,7 +142,6 @@ class TeamsScreenController extends GetxController {
} }
} }
/// todo: load more search
void _loadMoreSearch(){ void _loadMoreSearch(){
if(controllerSearchScroll.position.pixels == controllerSearchScroll.position.maxScrollExtent){ if(controllerSearchScroll.position.pixels == controllerSearchScroll.position.maxScrollExtent){
if(itemLoadMoreSearch.isNotEmpty){ if(itemLoadMoreSearch.isNotEmpty){
......
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