mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: android toast style
This commit is contained in:
parent
8139065113
commit
85aba663d7
@ -1,5 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/mobile/presentation/home/mobile_home_page_header.dart';
|
||||
import 'package:appflowy/mobile/presentation/home/tab/mobile_space_tab.dart';
|
||||
@ -197,10 +195,10 @@ class _HomePageState extends State<_HomePage> {
|
||||
children: [
|
||||
// Header
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
padding: const EdgeInsets.only(
|
||||
left: HomeSpaceViewSizes.mHorizontalPadding,
|
||||
right: 8.0,
|
||||
top: Platform.isAndroid ? 8.0 : 0.0,
|
||||
|
||||
),
|
||||
child: MobileHomePageHeader(
|
||||
userProfile: widget.userProfile,
|
||||
|
@ -5,6 +5,7 @@ import 'package:appflowy/mobile/presentation/widgets/widgets.dart';
|
||||
import 'package:appflowy/shared/af_role_pb_extension.dart';
|
||||
import 'package:appflowy/workspace/presentation/settings/widgets/members/workspace_member_bloc.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
|
||||
import 'package:appflowy_editor/appflowy_editor.dart' show PlatformExtension;
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -72,10 +73,10 @@ class _MemberItem extends StatelessWidget {
|
||||
final canDelete = myRole.canDelete && member.email != userProfile.email;
|
||||
final textColor = member.role.isOwner ? Theme.of(context).hintColor : null;
|
||||
|
||||
Widget child = Container(
|
||||
height: 48,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Row(
|
||||
Widget child;
|
||||
|
||||
if (PlatformExtension.isDesktop) {
|
||||
child = Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: FlowyText.medium(
|
||||
@ -93,7 +94,33 @@ class _MemberItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
child = Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: FlowyText.medium(
|
||||
member.name,
|
||||
color: textColor,
|
||||
fontSize: 15.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
const HSpace(36.0),
|
||||
FlowyText.medium(
|
||||
member.role.description,
|
||||
color: textColor,
|
||||
fontSize: 15.0,
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
child = Container(
|
||||
height: 48,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: child,
|
||||
);
|
||||
|
||||
if (canDelete) {
|
||||
|
@ -1506,7 +1506,7 @@ class PopupMenuButtonState<T> extends State<PopupMenuButton<T>> {
|
||||
if (items.isNotEmpty) {
|
||||
var popUpAnimationStyle = widget.popUpAnimationStyle;
|
||||
if (popUpAnimationStyle == null &&
|
||||
Theme.of(context).platform == TargetPlatform.iOS) {
|
||||
defaultTargetPlatform == TargetPlatform.iOS) {
|
||||
popUpAnimationStyle = AnimationStyle(
|
||||
curve: Curves.easeInOut,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
|
@ -321,11 +321,14 @@ class _ConfirmPopupState extends State<ConfirmPopup> {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 20.0,
|
||||
horizontal: 20.0,
|
||||
),
|
||||
color: PlatformExtension.isDesktop
|
||||
? null
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -258,17 +258,32 @@ class FlowyButton extends StatelessWidget {
|
||||
child = IntrinsicWidth(child: child);
|
||||
}
|
||||
|
||||
final decoration = this.decoration ??
|
||||
var decoration = this.decoration;
|
||||
|
||||
if (decoration == null &&
|
||||
(showDefaultBoxDecorationOnMobile &&
|
||||
(Platform.isIOS || Platform.isAndroid)
|
||||
? BoxDecoration(
|
||||
border: Border.all(
|
||||
color: borderColor ?? Theme.of(context).colorScheme.outline,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: radius,
|
||||
)
|
||||
: null);
|
||||
(Platform.isIOS || Platform.isAndroid))) {
|
||||
decoration = BoxDecoration(
|
||||
color: backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||
);
|
||||
}
|
||||
|
||||
if (decoration == null && (Platform.isIOS || Platform.isAndroid)) {
|
||||
if (showDefaultBoxDecorationOnMobile) {
|
||||
decoration = BoxDecoration(
|
||||
border: Border.all(
|
||||
color: borderColor ?? Theme.of(context).colorScheme.outline,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: radius,
|
||||
);
|
||||
} else if (backgroundColor != null) {
|
||||
decoration = BoxDecoration(
|
||||
color: backgroundColor,
|
||||
borderRadius: radius,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return Container(
|
||||
decoration: decoration,
|
||||
|
Loading…
Reference in New Issue
Block a user