mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: show member count on mobile (#4991)
* feat: show member count on mobile * fix: favorite section not sync after switching workspace * fix: favorite page will throw an error * fix: flutter analyze
This commit is contained in:
@ -36,26 +36,31 @@ class FlowyOptionTile extends StatelessWidget {
|
||||
this.content,
|
||||
this.backgroundColor,
|
||||
this.fontFamily,
|
||||
this.height,
|
||||
});
|
||||
|
||||
factory FlowyOptionTile.text({
|
||||
required String text,
|
||||
String? text,
|
||||
Widget? content,
|
||||
Color? textColor,
|
||||
bool showTopBorder = true,
|
||||
bool showBottomBorder = true,
|
||||
Widget? leftIcon,
|
||||
Widget? trailing,
|
||||
VoidCallback? onTap,
|
||||
double? height,
|
||||
}) {
|
||||
return FlowyOptionTile._(
|
||||
type: FlowyOptionTileType.text,
|
||||
text: text,
|
||||
content: content,
|
||||
textColor: textColor,
|
||||
onTap: onTap,
|
||||
showTopBorder: showTopBorder,
|
||||
showBottomBorder: showBottomBorder,
|
||||
leading: leftIcon,
|
||||
trailing: trailing,
|
||||
height: height,
|
||||
);
|
||||
}
|
||||
|
||||
@ -174,6 +179,8 @@ class FlowyOptionTile extends StatelessWidget {
|
||||
final Color? backgroundColor;
|
||||
final String? fontFamily;
|
||||
|
||||
final double? height;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final leadingWidget = _buildLeading();
|
||||
@ -182,16 +189,19 @@ class FlowyOptionTile extends StatelessWidget {
|
||||
color: backgroundColor,
|
||||
showTopBorder: showTopBorder,
|
||||
showBottomBorder: showBottomBorder,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Row(
|
||||
children: [
|
||||
if (leadingWidget != null) leadingWidget,
|
||||
if (content != null) content!,
|
||||
if (content == null) _buildText(),
|
||||
if (content == null) _buildTextField(),
|
||||
if (trailing != null) trailing!,
|
||||
],
|
||||
child: SizedBox(
|
||||
height: height,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Row(
|
||||
children: [
|
||||
if (leadingWidget != null) leadingWidget,
|
||||
if (content != null) content!,
|
||||
if (content == null) _buildText(),
|
||||
if (content == null) _buildTextField(),
|
||||
if (trailing != null) trailing!,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user