mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 16:26:37 +08:00
Update screens UI as per the latest Material 3 colors
This commit is contained in:
@ -74,10 +74,7 @@ class NavbarButton extends ConsumerWidget {
|
|||||||
? Theme.of(context)
|
? Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onSecondaryContainer
|
.onSecondaryContainer
|
||||||
: Theme.of(context)
|
: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
.colorScheme
|
|
||||||
.onSurface
|
|
||||||
.withOpacity(0.65),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
|
@ -29,10 +29,7 @@ class EditorTitle extends StatelessWidget {
|
|||||||
tooltip: title,
|
tooltip: title,
|
||||||
onSelected: onSelected,
|
onSelected: onSelected,
|
||||||
child: Ink(
|
child: Ink(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.surface,
|
||||||
.colorScheme
|
|
||||||
.secondaryContainer
|
|
||||||
.withOpacity(0.3),
|
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6),
|
const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
@ -29,17 +29,13 @@ class EnvCellField extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintStyle: kCodeStyle.copyWith(
|
hintStyle: kCodeStyle.copyWith(
|
||||||
color: clrScheme.outline.withOpacity(
|
color: clrScheme.outlineVariant,
|
||||||
kHintOpacity,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
hintText: hintText,
|
hintText: hintText,
|
||||||
contentPadding: const EdgeInsets.only(bottom: 12),
|
contentPadding: const EdgeInsets.only(bottom: 12),
|
||||||
focusedBorder: UnderlineInputBorder(
|
focusedBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: clrScheme.primary.withOpacity(
|
color: clrScheme.outlineVariant,
|
||||||
kHintOpacity,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
enabledBorder: UnderlineInputBorder(
|
enabledBorder: UnderlineInputBorder(
|
||||||
|
@ -26,9 +26,7 @@ class EnvURLField extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: kHintTextUrlCard,
|
hintText: kHintTextUrlCard,
|
||||||
hintStyle: kCodeStyle.copyWith(
|
hintStyle: kCodeStyle.copyWith(
|
||||||
color: Theme.of(context).colorScheme.outline.withOpacity(
|
color: Theme.of(context).colorScheme.outlineVariant,
|
||||||
kHintOpacity,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
|
@ -107,7 +107,7 @@ class Dashboard extends ConsumerWidget {
|
|||||||
VerticalDivider(
|
VerticalDivider(
|
||||||
thickness: 1,
|
thickness: 1,
|
||||||
width: 1,
|
width: 1,
|
||||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: IndexedStack(
|
child: IndexedStack(
|
||||||
|
@ -112,14 +112,14 @@ class _HistoryExpansionTileState extends ConsumerState<HistoryExpansionTile>
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.chevron_right_rounded,
|
Icons.chevron_right_rounded,
|
||||||
size: 20,
|
size: 20,
|
||||||
color: colorScheme.onSurface.withOpacity(0.6),
|
color: colorScheme.outline,
|
||||||
)),
|
)),
|
||||||
kHSpacer5,
|
kHSpacer5,
|
||||||
Text(
|
Text(
|
||||||
humanizeDate(widget.date),
|
humanizeDate(widget.date),
|
||||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: colorScheme.onSurface.withOpacity(0.6),
|
color: colorScheme.outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -23,7 +23,7 @@ class BottomNavBar extends ConsumerWidget {
|
|||||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surfaceContainerLowest,
|
||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
@ -21,9 +21,9 @@ class PageBase extends ConsumerWidget {
|
|||||||
final isDarkMode =
|
final isDarkMode =
|
||||||
ref.watch(settingsProvider.select((value) => value.isDark));
|
ref.watch(settingsProvider.select((value) => value.isDark));
|
||||||
final scaffold = Scaffold(
|
final scaffold = Scaffold(
|
||||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
backgroundColor: Theme.of(context).colorScheme.surfaceContainerLowest,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
backgroundColor: Theme.of(context).colorScheme.surfaceContainerLowest,
|
||||||
primary: true,
|
primary: true,
|
||||||
title: Text(title),
|
title: Text(title),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
@ -43,7 +43,7 @@ class PageBase extends ConsumerWidget {
|
|||||||
? kPb70
|
? kPb70
|
||||||
: EdgeInsets.zero) +
|
: EdgeInsets.zero) +
|
||||||
(kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero),
|
(kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero),
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surfaceContainerLowest,
|
||||||
child: scaffold,
|
child: scaffold,
|
||||||
),
|
),
|
||||||
if (kIsWindows)
|
if (kIsWindows)
|
||||||
|
Reference in New Issue
Block a user