Improved non dynamic theme

This commit is contained in:
Juan Gilsanz Polo 2023-01-25 20:51:23 +01:00
parent 386af8e809
commit 1f0f158251
40 changed files with 118 additions and 277 deletions

View file

@ -68,7 +68,7 @@ class _AddServerModalState extends State<AddServerModal> {
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).primaryColor
color: Theme.of(context).colorScheme.primary
),
),
);
@ -494,17 +494,17 @@ class _AddServerModalState extends State<AddServerModal> {
right: 24
),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor.withOpacity(0.05),
color: Theme.of(context).colorScheme.primary.withOpacity(0.05),
borderRadius: BorderRadius.circular(30),
border: Border.all(
color: Theme.of(context).primaryColor
color: Theme.of(context).colorScheme.primary
)
),
child: Text(
"${connectionType.name}://${ipDomainController.text}${portController.text != '' ? ':${portController.text}' : ""}${pathController.text}",
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).primaryColor,
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.w500
),
),
@ -612,7 +612,7 @@ class _AddServerModalState extends State<AddServerModal> {
onChanged: widget.server == null
? (value) => setState(() => defaultServer = value)
: null,
activeColor: Theme.of(context).primaryColor,
activeColor: Theme.of(context).colorScheme.primary,
)
],
),
@ -638,7 +638,7 @@ class _AddServerModalState extends State<AddServerModal> {
Switch(
value: homeAssistant,
onChanged: (value) => setState(() => homeAssistant = value),
activeColor: Theme.of(context).primaryColor,
activeColor: Theme.of(context).colorScheme.primary,
)
],
),

View file

@ -25,7 +25,7 @@ class CustomRadio extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: value == groupValue
? Theme.of(context).primaryColor
? Theme.of(context).colorScheme.primary
: Theme.of(context).brightness == Brightness.dark
? const Color.fromRGBO(184, 184, 184, 1)
: const Color.fromRGBO(104, 104, 104, 1)
@ -47,7 +47,7 @@ class CustomRadio extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: value == groupValue
? Theme.of(context).primaryColor
? Theme.of(context).colorScheme.primary
: backgroundColor
),
),

View file

@ -31,10 +31,10 @@ class CustomRadioToggle extends StatelessWidget {
),
decoration: BoxDecoration(
color: groupSelected == value
? Theme.of(context).primaryColor
: Theme.of(context).primaryColor.withOpacity(0.05),
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.primary.withOpacity(0.05),
border: Border.all(
color: Theme.of(context).primaryColor
color: Theme.of(context).colorScheme.primary
),
borderRadius: BorderRadius.circular(30)
),
@ -48,7 +48,7 @@ class CustomRadioToggle extends StatelessWidget {
fontWeight: FontWeight.w500,
color: groupSelected == value
? Colors.white
: Theme.of(context).primaryColor
: Theme.of(context).colorScheme.primary
),
)
],

View file

@ -68,7 +68,7 @@ class CustomSwitchListTile extends StatelessWidget {
onChanged: disabled != null && disabled == true
? null
: onChanged,
activeColor: Theme.of(context).primaryColor,
activeColor: Theme.of(context).colorScheme.primary,
)
],
),

View file

@ -30,11 +30,11 @@ class OptionBox extends StatelessWidget {
borderRadius: BorderRadius.circular(50),
border: Border.all(
color: optionsValue == itemValue
? Theme.of(context).primaryColor
? Theme.of(context).colorScheme.primary
: Colors.grey
),
color: optionsValue == itemValue
? Theme.of(context).primaryColor.withOpacity(0.1)
? Theme.of(context).colorScheme.primary
: Colors.transparent,
),
child: child,

View file

@ -22,7 +22,7 @@ class SectionLabel extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: Theme.of(context).primaryColor
color: Theme.of(context).colorScheme.primary
),
),
),

View file

@ -373,7 +373,7 @@ class _ServersListState extends State<ServersList> with SingleTickerProviderStat
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
color: Theme.of(context).colorScheme.surfaceVariant,
width: 1
)
)