Adjust create button
This commit is contained in:
parent
c6264789c4
commit
3b909c1fa5
|
|
@ -100,10 +100,10 @@ class ListScaffold extends StatelessWidget {
|
||||||
|
|
||||||
double leadingWidth = 0;
|
double leadingWidth = 0;
|
||||||
if (entityType == EntityType.settings) {
|
if (entityType == EntityType.settings) {
|
||||||
leadingWidth = isDesktop(context) ? 0 : 40;
|
leadingWidth = isDesktop(context) ? 0 : kMinInteractiveDimension;
|
||||||
} else {
|
} else {
|
||||||
leadingWidth = (isDesktop(context) ? 90 : 10) +
|
leadingWidth = (isDesktop(context) ? 100 : 10) +
|
||||||
kMinInteractiveDimension *
|
(kMinInteractiveDimension - 4) *
|
||||||
(appBarLeadingActions.length +
|
(appBarLeadingActions.length +
|
||||||
(onCheckboxPressed == null || isMobile(context) ? 1 : 2));
|
(onCheckboxPressed == null || isMobile(context) ? 1 : 2));
|
||||||
}
|
}
|
||||||
|
|
@ -120,6 +120,7 @@ class ListScaffold extends StatelessWidget {
|
||||||
? null
|
? null
|
||||||
: () => onCheckboxPressed(),
|
: () => onCheckboxPressed(),
|
||||||
),
|
),
|
||||||
|
if (appBarLeadingActions.isNotEmpty) SizedBox(width: 4),
|
||||||
...appBarLeadingActions,
|
...appBarLeadingActions,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ class ReportsScreen extends StatelessWidget {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
leadingWidth: isMobile(context) ? 40 : 0,
|
leadingWidth: isMobile(context) ? kMinInteractiveDimension : 0,
|
||||||
leading: leading,
|
leading: leading,
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
|
||||||
|
|
@ -86,20 +86,17 @@ class TaskScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
appBarLeadingActions: [
|
appBarLeadingActions: [
|
||||||
Expanded(
|
IconButton(
|
||||||
child: IconButton(
|
icon: Icon(
|
||||||
icon: Icon(
|
state.prefState.showKanban ? Icons.view_list : MdiIcons.trello),
|
||||||
state.prefState.showKanban ? Icons.view_list : MdiIcons.trello),
|
onPressed: () {
|
||||||
onPressed: () {
|
if (isDesktop(context) && !state.prefState.showKanban) {
|
||||||
if (isDesktop(context) && !state.prefState.showKanban) {
|
store.dispatch(ViewTask(taskId: ''));
|
||||||
store.dispatch(ViewTask(taskId: ''));
|
}
|
||||||
}
|
store.dispatch(
|
||||||
|
UpdateUserPreferences(showKanban: !state.prefState.showKanban),
|
||||||
store.dispatch(
|
);
|
||||||
UpdateUserPreferences(showKanban: !state.prefState.showKanban),
|
},
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
body:
|
body:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue