Change: Extend SkeletonizerConfigData with ThemeExtension for improved theme configuration.
Details:
What: This pull request extends SkeletonizerConfigData with ThemeExtension, enabling easier configuration of default themes using ThemeData.
Why: By integrating ThemeExtension, it simplifies the process of setting default themes in ThemeData across different theme modes e.g (light, dark, dim).
Example Usage: See the updated usage in the example provided, showcasing how SkeletonizerConfigData can now directly influence skeleton loading effects based on different theme modes.
Example Import:
import 'package:atlassync/config/themes/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:skeletonizer/skeletonizer.dart';
final lightSkeletonizerTheme = skeletonizerConfigData.copyWith(
containersColor: lightColors.primary,
effect: const SoldColorEffect(color: Colors.green));
final darkSkeletonizerTheme = skeletonizerConfigData.copyWith(
containersColor: darkColors.primary,
effect: const SoldColorEffect(color: Colors.green));
final dimSkeletonizerTheme = skeletonizerConfigData.copyWith(
containersColor: dimColors.primary,
effect: const SoldColorEffect(color: Colors.green));
/// Theme data for the light theme mode.
final lightThemeData = ThemeData(
useMaterial3: true,
extensions: [
lightSkeletonizerTheme
],
);
/// Theme data for the dark theme mode.
final darkThemeData = ThemeData(
useMaterial3: true,
extensions: [darkSkeletonizerTheme],
);
/// Theme data for the dim theme mode.
final dimThemeData = ThemeData(
useMaterial3: true,
extensions: [dimSkeletonizerTheme],
);
Description
Change: Extend
SkeletonizerConfigData
withThemeExtension
for improved theme configuration.Details:
SkeletonizerConfigData
withThemeExtension
, enabling easier configuration of default themes usingThemeData
.ThemeExtension
, it simplifies the process of setting default themes inThemeData
across different theme modes e.g (light
,dark
,dim
).SkeletonizerConfigData
can now directly influence skeleton loading effects based on different theme modes.Example Import: