chore: code cleanup according to unintroduced lints (#4488)

* chore: remove redundant arguments

* chore: remove unused constructor params

* chore: reorganize constructors

* chore: remove unnecessary awaits in returns

* chore: remove unnecessary paranthesis

* chore: add lints

* chore: clean up after merge

* chore: add sort constructors first

* chore: organize constructors in blocs

* chore: use sizedbox.shrink over empty container
This commit is contained in:
Mathias Mogensen
2024-01-25 16:37:36 +01:00
committed by GitHub
parent 747abba87f
commit acc03b8cc4
447 changed files with 3333 additions and 3412 deletions

View File

@ -45,7 +45,6 @@ class FlowyMobileStateContainer extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 32),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
emoji ??

View File

@ -47,7 +47,6 @@ class FlowyOptionTile extends StatelessWidget {
type: FlowyOptionTileType.text,
text: text,
textColor: textColor,
controller: null,
onTap: onTap,
showTopBorder: showTopBorder,
showBottomBorder: showBottomBorder,
@ -61,7 +60,6 @@ class FlowyOptionTile extends StatelessWidget {
void Function(String value)? onTextChanged,
void Function(String value)? onTextSubmitted,
EdgeInsets textFieldPadding = const EdgeInsets.symmetric(
horizontal: 0.0,
vertical: 16.0,
),
bool showTopBorder = true,
@ -75,8 +73,6 @@ class FlowyOptionTile extends StatelessWidget {
type: FlowyOptionTileType.textField,
controller: controller,
textFieldPadding: textFieldPadding,
text: null,
onTap: null,
showTopBorder: showTopBorder,
showBottomBorder: showBottomBorder,
leading: leftIcon,
@ -126,7 +122,6 @@ class FlowyOptionTile extends StatelessWidget {
return FlowyOptionTile._(
type: FlowyOptionTileType.toggle,
text: text,
controller: null,
onTap: onTap ?? () => onValueChanged(!isSelected),
onValueChanged: onValueChanged,
showTopBorder: showTopBorder,
@ -172,7 +167,6 @@ class FlowyOptionTile extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if (leadingWidget != null) leadingWidget,
_buildText(),