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