Package
dynamic_color
Existing issue?
What happened?
When using Dynamic color, the surface container and its variants variants Theme.of(context).colorScheme.
surfaceContainer
surfaceContainerHighest
surfaceContainerHigh
surfaceContainerLow
surfaceContainerLowest
are the same color as Theme.of(context).colorScheme.surface.
Screenshot (web without dynamicColor, Android with dynamicColor:

Code:
import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return DynamicColorBuilder(
builder: (ColorScheme? lightDynamic, ColorScheme? darkDynamic) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme:
lightDynamic ?? ColorScheme.fromSeed(seedColor: Colors.cyan),
),
darkTheme: ThemeData(
colorScheme:
darkDynamic ??
ColorScheme.fromSeed(
seedColor: Colors.cyan,
brightness: Brightness.dark,
),
brightness: Brightness.dark,
),
themeMode: ThemeMode.dark,
home: Scaffold(body: Center(child: MyWidget())),
);
},
);
}
}
class MyWidget extends StatelessWidget {
const MyWidget({super.key});
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
child: Padding(
padding: EdgeInsets.all(8),
child: Text('Hello, World!'),
),
),
Card(
color: Theme.of(context).colorScheme.surfaceContainerHigh,
child: Padding(
padding: EdgeInsets.all(8),
child: Text('Hello, World!'),
),
),
],
);
}
}
Package
dynamic_color
Existing issue?
What happened?
When using Dynamic color, the surface container and its variants variants
Theme.of(context).colorScheme.surfaceContainersurfaceContainerHighestsurfaceContainerHighsurfaceContainerLowsurfaceContainerLowestare the same color as
Theme.of(context).colorScheme.surface.Screenshot (web without

dynamicColor, Android withdynamicColor:Code: