Skip to content

Commit

Permalink
chore: dart format
Browse files Browse the repository at this point in the history
  • Loading branch information
Benimautner committed Jun 2, 2024
1 parent 9446e5f commit 19ece39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
7 changes: 6 additions & 1 deletion lib/components/AddDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ class AddDialog extends StatefulWidget {
final void Function(String title, DateTime? dueDate)? onAddTask;
final InputDecoration? decoration;
final String? prefilledTitle;
const AddDialog({Key? key, this.onAdd, this.decoration, this.onAddTask, this.prefilledTitle})
const AddDialog(
{Key? key,
this.onAdd,
this.decoration,
this.onAddTask,
this.prefilledTitle})
: super(key: key);

@override
Expand Down
15 changes: 7 additions & 8 deletions lib/pages/landing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class LandingPageState extends State<LandingPage> {
);
}


void handleMethod(List<String> method) {
switch (method[0]) {
case "open_add_task":
Expand All @@ -61,12 +60,13 @@ class LandingPageState extends State<LandingPage> {
void scheduleIntent() async {
try {
// This is needed when app is already open and quicktile is clicked
List<String>? method = (await platform.invokeMethod("isQuickTile", "")).map<String>((val) => val.toString()).toList();
List<String>? method = (await platform.invokeMethod("isQuickTile", ""))
.map<String>((val) => val.toString())
.toList();

if(method != null) {
if (method != null) {
handleMethod(method);
}

} catch (e) {
log(e.toString());
}
Expand All @@ -80,11 +80,10 @@ class LandingPageState extends State<LandingPage> {
void initState() {
super.initState();

Future.delayed(Duration.zero,() {
Future.delayed(Duration.zero, () {
_updateDefaultList().then((_) {
scheduleIntent();
}
);
});
});
}

Expand Down Expand Up @@ -183,7 +182,7 @@ class LandingPageState extends State<LandingPage> {
showDialog(
context: context,
builder: (_) => AddDialog(
prefilledTitle: prefilledTitle,
prefilledTitle: prefilledTitle,
onAddTask: (title, dueDate) => _addTask(title, dueDate, context),
decoration: new InputDecoration(
labelText: 'Task Name', hintText: 'eg. Milk')));
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/project/project_task_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ class _ListPageState extends State<ListPage> {
displayDoneTasks: displayDoneTasks);
}

Future<void> _addItemDialog(BuildContext context, [Bucket? bucket, String? taskName]) {
Future<void> _addItemDialog(BuildContext context,
[Bucket? bucket, String? taskName]) {
return showDialog(
context: context,
builder: (_) => AddDialog(
Expand Down

0 comments on commit 19ece39

Please sign in to comment.