mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: adjust mobile grid cell design (#4190)
This commit is contained in:
@ -77,32 +77,17 @@ class _MobileChecklistCellState extends GridCellState<MobileChecklistCell> {
|
||||
padding: widget.cellStyle.cellPadding ?? EdgeInsets.zero,
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: state.tasks.isEmpty
|
||||
? FlowyText(
|
||||
widget.cellStyle.placeholder,
|
||||
fontSize: 15,
|
||||
color: Theme.of(context).hintColor,
|
||||
)
|
||||
: ChecklistProgressBar(
|
||||
tasks: state.tasks,
|
||||
percent: state.percent,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
const HSpace(6),
|
||||
RotatedBox(
|
||||
quarterTurns: 3,
|
||||
child: Icon(
|
||||
Icons.chevron_left,
|
||||
child: state.tasks.isEmpty
|
||||
? FlowyText(
|
||||
widget.cellStyle.placeholder,
|
||||
fontSize: 15,
|
||||
color: Theme.of(context).hintColor,
|
||||
)
|
||||
: ChecklistProgressBar(
|
||||
tasks: state.tasks,
|
||||
percent: state.percent,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
const HSpace(2),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -51,6 +51,7 @@ class _NumberCellState extends GridEditableTextCell<MobileNumberCell> {
|
||||
controller: _controller,
|
||||
focusNode: focusNode,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 15),
|
||||
maxLines: 1,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@ -59,7 +60,6 @@ class _NumberCellState extends GridEditableTextCell<MobileNumberCell> {
|
||||
const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
|
||||
isCollapsed: true,
|
||||
),
|
||||
// close keyboard when tapping outside of the text field
|
||||
onTapOutside: (event) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
|
@ -57,6 +57,7 @@ class _MobileTextCellState extends GridEditableTextCell<MobileTextCell> {
|
||||
controller: _controller,
|
||||
focusNode: focusNode,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 15),
|
||||
maxLines: 1,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -42,6 +42,7 @@ class _TimestampCellState extends GridCellState<MobileTimestampCell> {
|
||||
child: FlowyText(
|
||||
state.dateStr,
|
||||
fontSize: 15,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -55,6 +55,7 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {
|
||||
return TextField(
|
||||
focusNode: _focusNode,
|
||||
keyboardType: TextInputType.url,
|
||||
maxLines: 1,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
@ -63,7 +64,6 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {
|
||||
const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
|
||||
isCollapsed: true,
|
||||
),
|
||||
// close keyboard when tapping outside of the text field
|
||||
onTapOutside: (event) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
onSubmitted: (value) =>
|
||||
@ -99,12 +99,18 @@ class _GridURLCellState extends GridCellState<MobileURLCell> {
|
||||
);
|
||||
},
|
||||
),
|
||||
child: Text(
|
||||
content,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
decoration: TextDecoration.underline,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
child: Text(
|
||||
content,
|
||||
maxLines: 1,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
decoration: TextDecoration.underline,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user