|
1
|
-import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
|
|
|
|
2
|
import 'package:doublefeel_flutter/app/modules/home/widgets/df_tab_bar.dart';
|
1
|
import 'package:doublefeel_flutter/app/modules/home/widgets/df_tab_bar.dart';
|
|
|
|
2
|
+import 'package:doublefeel_flutter/app/modules/hrv_report/models/hrv_report_models.dart';
|
|
3
|
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
|
3
|
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
|
|
4
|
import 'package:doublefeel_flutter/core/constants/intent_keys.dart';
|
4
|
import 'package:doublefeel_flutter/core/constants/intent_keys.dart';
|
|
5
|
import 'package:doublefeel_flutter/core/util/app_toast.dart';
|
5
|
import 'package:doublefeel_flutter/core/util/app_toast.dart';
|
|
@@ -17,7 +17,7 @@ import '../widgets/friend_health_card.dart'; |
|
@@ -17,7 +17,7 @@ import '../widgets/friend_health_card.dart'; |
|
17
|
class FriendsTab extends GetView<FriendsController> {
|
17
|
class FriendsTab extends GetView<FriendsController> {
|
|
18
|
const FriendsTab({super.key});
|
18
|
const FriendsTab({super.key});
|
|
19
|
|
19
|
|
|
20
|
- static const double _floatingAddButtonGap = 23;
|
20
|
+ static const double _floatingAddButtonGapAboveTabBar = 23;
|
|
21
|
|
21
|
|
|
22
|
@override
|
22
|
@override
|
|
23
|
Widget build(BuildContext context) {
|
23
|
Widget build(BuildContext context) {
|
|
@@ -225,13 +225,13 @@ class FriendsTab extends GetView<FriendsController> { |
|
@@ -225,13 +225,13 @@ class FriendsTab extends GetView<FriendsController> { |
|
225
|
}
|
225
|
}
|
|
226
|
|
226
|
|
|
227
|
double _floatingAddButtonBottom(BuildContext context) {
|
227
|
double _floatingAddButtonBottom(BuildContext context) {
|
|
228
|
- return _tabBarAvoidanceBottom(context) + _floatingAddButtonGap;
|
228
|
+ return _tabBarAvoidanceBottom(context) + _floatingAddButtonGapAboveTabBar;
|
|
229
|
}
|
229
|
}
|
|
230
|
|
230
|
|
|
231
|
double _tabBarAvoidanceBottom(BuildContext context) {
|
231
|
double _tabBarAvoidanceBottom(BuildContext context) {
|
|
232
|
- return MediaQuery.viewPaddingOf(context).bottom +
|
|
|
|
233
|
- DfTabBar.height +
|
|
|
|
234
|
- DfTabBar.bottomMargin;
|
232
|
+ final bottomInset =
|
|
|
|
233
|
+ Theme.of(context).platform == TargetPlatform.iOS ? 34.0 : 0.0;
|
|
|
|
234
|
+ return bottomInset + DfTabBar.height + DfTabBar.bottomMargin;
|
|
235
|
}
|
235
|
}
|
|
236
|
|
236
|
|
|
237
|
double _friendsListBottomPadding(
|
237
|
double _friendsListBottomPadding(
|
|
@@ -244,8 +244,10 @@ class FriendsTab extends GetView<FriendsController> { |
|
@@ -244,8 +244,10 @@ class FriendsTab extends GetView<FriendsController> { |
|
244
|
Future<void> _handleAddFriend() async {
|
244
|
Future<void> _handleAddFriend() async {
|
|
245
|
final Type type = FriendsTab;
|
245
|
final Type type = FriendsTab;
|
|
246
|
final String name = type.toString();
|
246
|
final String name = type.toString();
|
|
247
|
- await Get.toNamed(AppRoutes.bindPartner,
|
|
|
|
248
|
- arguments: {IntentKeys.keyFrom: name});
|
247
|
+ await Get.toNamed(
|
|
|
|
248
|
+ AppRoutes.bindPartner,
|
|
|
|
249
|
+ arguments: {IntentKeys.keyFrom: name},
|
|
|
|
250
|
+ );
|
|
249
|
await controller.loadFriends();
|
251
|
await controller.loadFriends();
|
|
250
|
}
|
252
|
}
|
|
251
|
|
253
|
|