Skip to content

Commit

Permalink
fix: problems from vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
orl0pl committed Oct 28, 2024
1 parent 96a8d32 commit 8118a30
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 39 deletions.
2 changes: 1 addition & 1 deletion lib/screens/add_redesgin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class _AddScreenState extends State<AddScreen> {
),
Container(
padding: const EdgeInsets.all(16.0),
margin: EdgeInsets.only(top: 16),
margin: const EdgeInsets.only(top: 16),
decoration: BoxDecoration(
border: Border(
top: BorderSide(
Expand Down
1 change: 0 additions & 1 deletion lib/screens/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:android_package_manager/android_package_manager.dart';
import 'package:app_launcher/app_launcher.dart';

import 'package:flutter/material.dart';
import 'package:maximum/screens/error.dart';
import 'package:maximum/screens/notes.dart';
import 'package:maximum/screens/timeline.dart';
import 'package:maximum/widgets/main_screen/bottom.dart';
Expand Down
3 changes: 2 additions & 1 deletion lib/screens/notes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ class NotesScreenState extends State<NotesScreen> {
if (entryList![index].type ==
NotesListViewEntryType.label) {
return Container(
margin: EdgeInsets.only(bottom: 8, top: 16),
margin:
const EdgeInsets.only(bottom: 8, top: 16),
child: entryList![index].label!,
);
} else if (entryList![index].note != null) {
Expand Down
5 changes: 1 addition & 4 deletions lib/screens/settings/apperance.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import 'package:android_package_manager/android_package_manager.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:maximum/screens/settings/generic_pick_app.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:restart_app/restart_app.dart';

class ApperanceScreen extends StatefulWidget {
const ApperanceScreen({super.key});
Expand All @@ -25,7 +22,7 @@ class _ApperanceScreenState extends State<ApperanceScreen> {
var prefs = await SharedPreferences.getInstance();

setState(() {
showSecondsInClock = prefs?.getBool('showSecondsInClock') ?? false;
showSecondsInClock = prefs.getBool('showSecondsInClock') ?? false;
});

return;
Expand Down
21 changes: 10 additions & 11 deletions lib/screens/settings/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
import 'package:maximum/data/database_helper.dart';
import 'package:share_plus/share_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';

class DataScreen extends StatefulWidget {
Expand All @@ -20,22 +19,22 @@ class _DataScreenState extends State<DataScreen> {
@override
void initState() {
super.initState();
fetchPreferences();
// fetchPreferences();
}

void fetchPreferences() async {
var prefs = await SharedPreferences.getInstance();
// void fetchPreferences() async {
// var prefs = await SharedPreferences.getInstance();

setState(() {});
// setState(() {});

return;
}
// return;
// }

void savePreferences() async {
var prefs = await SharedPreferences.getInstance();
// void savePreferences() async {
// var prefs = await SharedPreferences.getInstance();

return;
}
// return;
// }

Future<bool> showImportWipeAlertDialog() async {
return await showDialog(
Expand Down
27 changes: 15 additions & 12 deletions lib/widgets/add_screen/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,27 @@ class _TaskAddingState extends State<TaskAdding> {
},
),
if (widget.taskDraft.isDateSet) ...[
SizedBox(width: 8),
const SizedBox(width: 8),
InputChip(
label: Text(l.repeat),
avatar: widget.taskDraft.repeat != null
? Icon(Icons.repeat)
: Icon(MdiIcons.repeatOff),
? const Icon(Icons.repeat)
: const Icon(MdiIcons.repeatOff),
showCheckmark: false,
selected: widget.taskDraft.repeat != null,
onSelected: (value) async {
if (value) {
Future.delayed(Duration.zero, () async {
RepeatData? newRepeat = await showDialog(
context: context,
builder: (context) =>
PickRepeatDialog(taskDraft: widget.taskDraft));
widget.taskDraft.replaceRepeat(newRepeat);
widget.updateDataForTask(widget.taskDraft);
});
if (context.mounted) {
Future.delayed(Duration.zero, () async {
RepeatData? newRepeat = await showDialog(
// ignore: use_build_context_synchronously
context: context,
builder: (context) => PickRepeatDialog(
taskDraft: widget.taskDraft));
widget.taskDraft.replaceRepeat(newRepeat);
widget.updateDataForTask(widget.taskDraft);
});
}
} else {
widget.taskDraft.replaceRepeat(null);
widget.updateDataForTask(widget.taskDraft);
Expand All @@ -221,7 +224,7 @@ class _TaskAddingState extends State<TaskAdding> {
label: widget.taskDraft.targetValue == 1
? Text(l.steps_count)
: Text(l.steps(widget.taskDraft.targetValue)),
avatar: Icon(MdiIcons.counter),
avatar: const Icon(MdiIcons.counter),
showCheckmark: false,
selected: widget.taskDraft.targetValue != 1,
onSelected: (value) async {
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/start_subscreen/topv2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _TopV2State extends State<TopV2> {
style: textTheme.displayLarge),
],
),
SizedBox(width: 16),
const SizedBox(width: 16),
// Flexible(
// flex: 1,
// fit: FlexFit.tight,
Expand Down Expand Up @@ -101,12 +101,12 @@ class _TopV2State extends State<TopV2> {
),
),
const SizedBox(height: 8),
SingleChildScrollView(
const SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
Alarm(),
const SizedBox(width: 8),
SizedBox(width: 8),
Weather(),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/start_subscreen/topv2/topchip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class _TopChipState extends State<TopChip> with TickerProviderStateMixin {
width: widget.icon != null && widget.title == null ? 36 : null,
padding: widget.title == null
? EdgeInsets.zero
: EdgeInsets.symmetric(horizontal: 6, vertical: 6),
: const EdgeInsets.symmetric(horizontal: 6, vertical: 6),
decoration: BoxDecoration(
color: colorScheme.secondary,
shape: widget.icon != null && widget.title == null
Expand Down
1 change: 0 additions & 1 deletion lib/widgets/start_subscreen/topv2/weather.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:async';
import 'dart:io';

import 'package:app_launcher/app_launcher.dart';
Expand Down
5 changes: 2 additions & 3 deletions lib/widgets/subscreens/apps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@ class AppsWidgetState extends State<AppsWidget> {
? const Center(child: CircularProgressIndicator())
: allMatches.isEmpty
? Center(
child: Text(l.nothing_found +
"\n" +
l.apps_internet_search_bang_hint(".g")),
child: Text(
"${l.nothing_found}\n${l.apps_internet_search_bang_hint(".g")}"),
)
: AnimatedOpacity(
opacity: doneSortingAndSearching ? 1.0 : 0.0,
Expand Down
1 change: 0 additions & 1 deletion lib/widgets/subscreens/start.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:maximum/data/models/task.dart';
import 'package:maximum/screens/timeline.dart';
import 'package:maximum/widgets/common/task_item.dart';
import 'package:maximum/widgets/start_subscreen/inspiration.dart';
import 'package:maximum/widgets/start_subscreen/top.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:maximum/widgets/start_subscreen/topv2.dart';
import 'package:shared_preferences/shared_preferences.dart';
Expand Down

0 comments on commit 8118a30

Please sign in to comment.