mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-01-18 19:30:43 +00:00
removed theme deprecations
This commit is contained in:
parent
5753e261f6
commit
f784af927a
7 changed files with 12 additions and 17 deletions
|
@ -33,7 +33,7 @@ ThemeData themeFrom(Color primaryColor, Brightness brightness) {
|
||||||
elevation: Dimens.elevationLevel0,
|
elevation: Dimens.elevationLevel0,
|
||||||
scrolledUnderElevation: Dimens.elevationLevel2,
|
scrolledUnderElevation: Dimens.elevationLevel2,
|
||||||
color: scheme.surface,
|
color: scheme.surface,
|
||||||
foregroundColor: scheme.onBackground,
|
foregroundColor: scheme.onSurface,
|
||||||
surfaceTintColor: scheme.surfaceTint,
|
surfaceTintColor: scheme.surfaceTint,
|
||||||
),
|
),
|
||||||
cardTheme: CardTheme(
|
cardTheme: CardTheme(
|
||||||
|
@ -83,8 +83,6 @@ ColorScheme _colorSchemeFromColor(Color primaryColor, Brightness brightness) {
|
||||||
|
|
||||||
return ColorScheme(
|
return ColorScheme(
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
background: Color(scheme.background),
|
|
||||||
onBackground: Color(scheme.onBackground),
|
|
||||||
error: Color(scheme.error),
|
error: Color(scheme.error),
|
||||||
onError: Color(scheme.onError),
|
onError: Color(scheme.onError),
|
||||||
errorContainer: Color(scheme.errorContainer),
|
errorContainer: Color(scheme.errorContainer),
|
||||||
|
@ -103,7 +101,7 @@ ColorScheme _colorSchemeFromColor(Color primaryColor, Brightness brightness) {
|
||||||
onTertiaryContainer: Color(scheme.onTertiaryContainer),
|
onTertiaryContainer: Color(scheme.onTertiaryContainer),
|
||||||
surface: Color(scheme.surface),
|
surface: Color(scheme.surface),
|
||||||
onSurface: Color(scheme.onSurface),
|
onSurface: Color(scheme.onSurface),
|
||||||
surfaceVariant: Color(scheme.surfaceVariant),
|
surfaceContainerHighest: Color(scheme.surfaceContainerHighest),
|
||||||
onSurfaceVariant: Color(scheme.onSurfaceVariant),
|
onSurfaceVariant: Color(scheme.onSurfaceVariant),
|
||||||
outline: Color(scheme.outline),
|
outline: Color(scheme.outline),
|
||||||
outlineVariant: Color(scheme.outlineVariant),
|
outlineVariant: Color(scheme.outlineVariant),
|
||||||
|
|
|
@ -25,7 +25,7 @@ class CameraControlsPlaceholder extends StatelessWidget {
|
||||||
const SizedBox(height: Dimens.grid8),
|
const SizedBox(height: Dimens.grid8),
|
||||||
Text(
|
Text(
|
||||||
error.toStringLocalized(context),
|
error.toStringLocalized(context),
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onBackground),
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -62,14 +62,14 @@ class _Title<T extends PhotographyStopValue> extends StatelessWidget {
|
||||||
value.toString(),
|
value.toString(),
|
||||||
stepGranularity: 0.5,
|
stepGranularity: 0.5,
|
||||||
minFontSize: 10,
|
minFontSize: 10,
|
||||||
style: labelTextStyle(context).copyWith(color: Theme.of(context).colorScheme.onBackground),
|
style: labelTextStyle(context).copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(
|
||||||
value.toString(),
|
value.toString(),
|
||||||
style: labelTextStyle(context).copyWith(color: Theme.of(context).colorScheme.onBackground),
|
style: labelTextStyle(context).copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -97,7 +97,7 @@ class _Tick extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ColoredBox(
|
return ColoredBox(
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 1,
|
height: 1,
|
||||||
width: _length,
|
width: _length,
|
||||||
|
|
|
@ -78,7 +78,7 @@ class ExposurePairsList extends StatelessWidget {
|
||||||
? constraints.maxHeight / 2
|
? constraints.maxHeight / 2
|
||||||
: constraints.maxHeight,
|
: constraints.maxHeight,
|
||||||
child: ColoredBox(
|
child: ColoredBox(
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
child: const SizedBox(width: 1),
|
child: const SizedBox(width: 1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -120,7 +120,7 @@ class _Slider extends StatelessWidget {
|
||||||
width: handleDistance + trackThickness,
|
width: handleDistance + trackThickness,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(trackThickness / 2),
|
borderRadius: BorderRadius.circular(trackThickness / 2),
|
||||||
child: ColoredBox(color: Theme.of(context).colorScheme.surfaceVariant),
|
child: ColoredBox(color: Theme.of(context).colorScheme.surfaceContainerHighest),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
AnimatedPositioned.fromRect(
|
AnimatedPositioned.fromRect(
|
||||||
|
|
|
@ -20,15 +20,12 @@ class IconPlaceholder extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
icon,
|
icon,
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
),
|
),
|
||||||
const SizedBox(height: Dimens.grid8),
|
const SizedBox(height: Dimens.grid8),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||||
.textTheme
|
|
||||||
.bodyMedium
|
|
||||||
?.copyWith(color: Theme.of(context).colorScheme.onBackground),
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -30,7 +30,7 @@ class RulerSlider extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
valueAdapter(value),
|
valueAdapter(value),
|
||||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(color: Theme.of(context).colorScheme.onBackground),
|
style: Theme.of(context).textTheme.labelLarge!.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||||
),
|
),
|
||||||
const SizedBox(height: Dimens.grid4),
|
const SizedBox(height: Dimens.grid4),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -78,7 +78,7 @@ class _Ruler extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
||||||
final itemsColor = Theme.of(context).colorScheme.onBackground;
|
final itemsColor = Theme.of(context).colorScheme.onSurface;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
final bool showAllMainTicks =
|
final bool showAllMainTicks =
|
||||||
|
|
Loading…
Reference in a new issue