ChartTheme.dark constructor
ChartTheme.dark()
Create dark theme with enhanced colors.
Returns a professionally designed dark theme with:
- Dark background (slate gray)
- Light text for contrast
- Muted grid and axis colors
- Bright gradient color palette
- Modern rounded corners
Example
final theme = ChartTheme.dark();
Implementation
factory ChartTheme.dark() {
return const ChartTheme(
backgroundColor: Color(0xFF1F2937),
textColor: Color(0xFFF9FAFB),
gridColor: Color(0xFF374151),
axisColor: Color(0xFF9CA3AF),
gradientColors: [
Color(0xFF818CF8), // Light Indigo
Color(0xFFA78BFA), // Light Purple
Color(0xFFF472B6), // Light Pink
Color(0xFF34D399), // Light Emerald
Color(0xFFFBBF24), // Light Amber
],
shadowElevation: 16.0,
borderRadius: 24.0,
);
}