|
|
|
import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
|
|
|
|
import 'package:doublefeel_flutter/app/modules/home/widgets/df_tab_bar.dart';
|
|
|
|
import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
|
|
|
|
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
|
|
|
|
import 'package:doublefeel_flutter/core/constants/intent_keys.dart';
|
|
|
|
import 'package:doublefeel_flutter/core/util/app_toast.dart';
|
|
...
|
...
|
@@ -17,7 +17,7 @@ import '../widgets/friend_health_card.dart'; |
|
|
|
class FriendsTab extends GetView<FriendsController> {
|
|
|
|
const FriendsTab({super.key});
|
|
|
|
|
|
|
|
static const double _floatingAddButtonGap = 23;
|
|
|
|
static const double _floatingAddButtonGapAboveTabBar = 23;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
...
|
...
|
@@ -225,13 +225,13 @@ class FriendsTab extends GetView<FriendsController> { |
|
|
|
}
|
|
|
|
|
|
|
|
double _floatingAddButtonBottom(BuildContext context) {
|
|
|
|
return _tabBarAvoidanceBottom(context) + _floatingAddButtonGap;
|
|
|
|
return _tabBarAvoidanceBottom(context) + _floatingAddButtonGapAboveTabBar;
|
|
|
|
}
|
|
|
|
|
|
|
|
double _tabBarAvoidanceBottom(BuildContext context) {
|
|
|
|
return MediaQuery.viewPaddingOf(context).bottom +
|
|
|
|
DfTabBar.height +
|
|
|
|
DfTabBar.bottomMargin;
|
|
|
|
final bottomInset =
|
|
|
|
Theme.of(context).platform == TargetPlatform.iOS ? 34.0 : 0.0;
|
|
|
|
return bottomInset + DfTabBar.height + DfTabBar.bottomMargin;
|
|
|
|
}
|
|
|
|
|
|
|
|
double _friendsListBottomPadding(
|
|
...
|
...
|
@@ -244,8 +244,10 @@ class FriendsTab extends GetView<FriendsController> { |
|
|
|
Future<void> _handleAddFriend() async {
|
|
|
|
final Type type = FriendsTab;
|
|
|
|
final String name = type.toString();
|
|
|
|
await Get.toNamed(AppRoutes.bindPartner,
|
|
|
|
arguments: {IntentKeys.keyFrom: name});
|
|
|
|
await Get.toNamed(
|
|
|
|
AppRoutes.bindPartner,
|
|
|
|
arguments: {IntentKeys.keyFrom: name},
|
|
|
|
);
|
|
|
|
await controller.loadFriends();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|