mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: use light haptic feedback (#5838)
* chore: use light haptic feedback * chore: optimize tabbar & side action animation
This commit is contained in:
parent
735a09b333
commit
81532d014e
@ -36,7 +36,7 @@ class _AnimatedGestureDetectorState extends State<AnimatedGestureDetector> {
|
|||||||
onTapUp: (details) {
|
onTapUp: (details) {
|
||||||
setState(() => scale = 1.0);
|
setState(() => scale = 1.0);
|
||||||
|
|
||||||
HapticFeedbackType.vibrate.call();
|
HapticFeedbackType.light.call();
|
||||||
|
|
||||||
widget.onTapUp();
|
widget.onTapUp();
|
||||||
},
|
},
|
||||||
|
@ -167,15 +167,16 @@ class _Pages extends StatelessWidget {
|
|||||||
onSelected: context.pushView,
|
onSelected: context.pushView,
|
||||||
endActionPane: (context) {
|
endActionPane: (context) {
|
||||||
final view = context.read<ViewBloc>().state.view;
|
final view = context.read<ViewBloc>().state.view;
|
||||||
return buildEndActionPane(
|
final actions = [
|
||||||
context,
|
|
||||||
[
|
|
||||||
MobilePaneActionType.more,
|
MobilePaneActionType.more,
|
||||||
if (view.layout == ViewLayoutPB.Document)
|
if (view.layout == ViewLayoutPB.Document)
|
||||||
MobilePaneActionType.add,
|
MobilePaneActionType.add,
|
||||||
],
|
];
|
||||||
|
return buildEndActionPane(
|
||||||
|
context,
|
||||||
|
actions,
|
||||||
spaceType: spaceType,
|
spaceType: spaceType,
|
||||||
spaceRatio: 4,
|
spaceRatio: actions.length == 1 ? 3 : 4,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -23,10 +23,12 @@ class MobileSpaceTabBar extends StatelessWidget {
|
|||||||
final labelStyle = baseStyle?.copyWith(
|
final labelStyle = baseStyle?.copyWith(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
|
height: 20 / 16,
|
||||||
);
|
);
|
||||||
final unselectedLabelStyle = baseStyle?.copyWith(
|
final unselectedLabelStyle = baseStyle?.copyWith(
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontSize: 15.0,
|
fontSize: 15.0,
|
||||||
|
height: 20 / 15,
|
||||||
);
|
);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
Loading…
Reference in New Issue
Block a user