Fixed Remaining Problems
This commit is contained in:
@ -7,11 +7,12 @@ class ColorPickerButton extends StatelessWidget {
|
||||
final Color selectedColor;
|
||||
final void Function(Color) onColorPicked;
|
||||
|
||||
const ColorPickerButton({super.key,
|
||||
@required this.title,
|
||||
@required this.dialogTitle,
|
||||
@required this.selectedColor,
|
||||
@required this.onColorPicked,
|
||||
const ColorPickerButton({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.dialogTitle,
|
||||
required this.selectedColor,
|
||||
required this.onColorPicked,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -35,9 +36,9 @@ class ColorPickerButton extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
primary: useBrightBackground(selectedColor)
|
||||
? appTheme.primaryTextTheme.labelLarge.color
|
||||
: appTheme.textTheme.labelLarge.color,
|
||||
foregroundColor: useBrightBackground(selectedColor)
|
||||
? appTheme.primaryTextTheme.labelLarge?.color
|
||||
: appTheme.textTheme.labelLarge?.color,
|
||||
backgroundColor: selectedColor,
|
||||
),
|
||||
child: Text(title),
|
||||
|
@ -3,12 +3,13 @@ import 'package:flutter/material.dart';
|
||||
class DatePickerBtn extends StatelessWidget {
|
||||
final String leadingString;
|
||||
final DateTime pickedDate;
|
||||
final void Function(DateTime) onDatePicked;
|
||||
final void Function(DateTime?) onDatePicked;
|
||||
|
||||
const DatePickerBtn({super.key,
|
||||
@required this.leadingString,
|
||||
@required this.pickedDate,
|
||||
@required this.onDatePicked,
|
||||
const DatePickerBtn({
|
||||
super.key,
|
||||
required this.leadingString,
|
||||
required this.pickedDate,
|
||||
required this.onDatePicked,
|
||||
});
|
||||
|
||||
void _onButtonPressed(BuildContext context) async {
|
||||
@ -26,8 +27,8 @@ class DatePickerBtn extends StatelessWidget {
|
||||
return TextButton(
|
||||
onPressed: () => _onButtonPressed(context),
|
||||
style: TextButton.styleFrom(
|
||||
primary: appTheme.primaryTextTheme.labelLarge.color,
|
||||
backgroundColor: appTheme.accentColor,
|
||||
foregroundColor: appTheme.primaryTextTheme.labelLarge?.color,
|
||||
backgroundColor: appTheme.colorScheme.secondary,
|
||||
),
|
||||
child: Text(
|
||||
"$leadingString ${pickedDate.toLocal().toString().split(" ")[0]}"),
|
||||
|
@ -7,8 +7,8 @@ class SelectDurationBtn extends StatelessWidget {
|
||||
|
||||
const SelectDurationBtn({
|
||||
super.key,
|
||||
@required this.duration,
|
||||
@required this.updateDuration,
|
||||
required this.duration,
|
||||
required this.updateDuration,
|
||||
});
|
||||
|
||||
void _onPickerConfirm(Picker picker, List<int> values) {
|
||||
@ -26,7 +26,7 @@ class SelectDurationBtn extends StatelessWidget {
|
||||
]),
|
||||
hideHeader: false,
|
||||
title: const Text("Default Duration"),
|
||||
selectedTextStyle: TextStyle(color: appTheme.accentColor),
|
||||
selectedTextStyle: TextStyle(color: appTheme.colorScheme.secondary),
|
||||
onConfirm: _onPickerConfirm)
|
||||
.showModal(context);
|
||||
|
||||
@ -40,8 +40,8 @@ class SelectDurationBtn extends StatelessWidget {
|
||||
return TextButton(
|
||||
onPressed: () => _onButtonPressed(context, appTheme),
|
||||
style: TextButton.styleFrom(
|
||||
primary: appTheme.primaryTextTheme.labelLarge.color,
|
||||
backgroundColor: appTheme.accentColor,
|
||||
foregroundColor: appTheme.primaryTextTheme.labelLarge?.color,
|
||||
backgroundColor: appTheme.colorScheme.secondary,
|
||||
),
|
||||
child: Text("$years Years $months Months $days Days"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user