Fixed Simple Problem, that occured after migrating to new version.
Still WIP need to fix more Problems
This commit is contained in:
@ -4,11 +4,11 @@ class HomeBottomNavBar extends StatelessWidget {
|
||||
final int currentIndex;
|
||||
final Function onTap;
|
||||
|
||||
HomeBottomNavBar({
|
||||
Key key,
|
||||
const HomeBottomNavBar({
|
||||
super.key,
|
||||
@required this.currentIndex,
|
||||
@required this.onTap,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -19,21 +19,21 @@ class HomeBottomNavBar extends StatelessWidget {
|
||||
currentIndex: currentIndex,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: new Icon(
|
||||
icon: Icon(
|
||||
Icons.alarm,
|
||||
color: appTheme.primaryColor,
|
||||
),
|
||||
label: "Active Progresses",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: new Icon(
|
||||
icon: Icon(
|
||||
Icons.alarm_off,
|
||||
color: appTheme.primaryColor,
|
||||
),
|
||||
label: "Inactive Progresses",
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: new Icon(
|
||||
icon: Icon(
|
||||
Icons.settings,
|
||||
color: appTheme.primaryColor,
|
||||
),
|
||||
|
@ -6,6 +6,8 @@ import 'package:time_progress_tracker/widgets/store_connectors/settings_store_co
|
||||
import 'package:time_progress_tracker/widgets/store_connectors/time_progress_list_store_connector.dart';
|
||||
|
||||
class HomeActiveProgressesTab extends StatelessWidget {
|
||||
const HomeActiveProgressesTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsStoreConnector(
|
||||
@ -14,14 +16,15 @@ class HomeActiveProgressesTab extends StatelessWidget {
|
||||
loadedBuilder: (context, tpListVm) {
|
||||
List<TimeProgress> activeTpList =
|
||||
selectActiveProgresses(tpListVm.tpList);
|
||||
if (activeTpList.length < 1)
|
||||
if (activeTpList.isEmpty) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Center(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
"You don't have any active time progress, that are tracked."),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return ProgressListView(
|
||||
timeProgressList: activeTpList,
|
||||
|
@ -6,6 +6,8 @@ import 'package:time_progress_tracker/widgets/store_connectors/settings_store_co
|
||||
import 'package:time_progress_tracker/widgets/store_connectors/time_progress_list_store_connector.dart';
|
||||
|
||||
class HomeInactiveProgressesTab extends StatelessWidget {
|
||||
const HomeInactiveProgressesTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsStoreConnector(
|
||||
@ -14,14 +16,15 @@ class HomeInactiveProgressesTab extends StatelessWidget {
|
||||
loadedBuilder: (context, tpListVm) {
|
||||
List<TimeProgress> inactiveTpList =
|
||||
selectInactiveProgresses(tpListVm.tpList);
|
||||
if (inactiveTpList.length < 1)
|
||||
if (inactiveTpList.isEmpty) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Center(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
"You don't have any currently inactive time progresses, that are tracked."),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return ProgressListView(
|
||||
timeProgressList: inactiveTpList,
|
||||
|
@ -5,12 +5,14 @@ import 'package:time_progress_tracker/widgets/home/tabs/settings/duration_settin
|
||||
import 'package:time_progress_tracker/widgets/store_connectors/settings_store_connector.dart';
|
||||
|
||||
class HomeSettingsTab extends StatelessWidget {
|
||||
const HomeSettingsTab({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsStoreConnector(
|
||||
loadedBuilder: (context, settingsVm) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
@ -28,7 +30,7 @@ class HomeSettingsTab extends StatelessWidget {
|
||||
updateDuration: settingsVm.updateDuration,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
@ -39,7 +41,7 @@ class HomeSettingsTab extends StatelessWidget {
|
||||
applicationLegalese:
|
||||
'\u00a9Andreas Fahrecker 2020-2021');
|
||||
},
|
||||
child: Text("About"),
|
||||
child: const Text("About"),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -5,7 +5,8 @@ class ColorSettingsWidget extends StatelessWidget {
|
||||
final Color doneColor, leftColor;
|
||||
final void Function(Color) updateDoneColor, updateLeftColor;
|
||||
|
||||
ColorSettingsWidget({
|
||||
const ColorSettingsWidget({
|
||||
super.key,
|
||||
@required this.doneColor,
|
||||
@required this.leftColor,
|
||||
@required this.updateDoneColor,
|
||||
@ -21,14 +22,14 @@ class ColorSettingsWidget extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Color Settings",
|
||||
style: appTheme.textTheme.headline6,
|
||||
style: appTheme.textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 5),
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
child: ColorPickerButton(
|
||||
title: "Done Color",
|
||||
dialogTitle: "Select Done Color",
|
||||
@ -39,7 +40,7 @@ class ColorSettingsWidget extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 5),
|
||||
padding: const EdgeInsets.only(left: 5),
|
||||
child: ColorPickerButton(
|
||||
title: "Left Color",
|
||||
dialogTitle: "Select Left Color",
|
||||
|
@ -5,7 +5,8 @@ class DurationSettingsWidget extends StatelessWidget {
|
||||
final Duration duration;
|
||||
final void Function(Duration) updateDuration;
|
||||
|
||||
DurationSettingsWidget({
|
||||
const DurationSettingsWidget({
|
||||
super.key,
|
||||
@required this.duration,
|
||||
@required this.updateDuration,
|
||||
});
|
||||
@ -14,15 +15,15 @@ class DurationSettingsWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
ThemeData appTheme = Theme.of(context);
|
||||
|
||||
int years = duration.inDays ~/ 365;
|
||||
int months = (duration.inDays - (365 * years)) ~/ 30;
|
||||
int days = duration.inDays - (365 * years) - (30 * months);
|
||||
//int years = duration.inDays ~/ 365;
|
||||
//int months = (duration.inDays - (365 * years)) ~/ 30;
|
||||
//int days = duration.inDays - (365 * years) - (30 * months);
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Duration Settings",
|
||||
style: appTheme.textTheme.headline6,
|
||||
style: appTheme.textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
|
Reference in New Issue
Block a user