MoonPhaseWidget constructor

const MoonPhaseWidget({
  1. Key? key,
  2. required MoonPhaseInfo moonInfo,
  3. double size = 160,
  4. Color overlayColor = Colors.black,
  5. double overlayOpacity = 0,
  6. String moonAssetPath = 'assets/moon.svg',
  7. String? backgroundAssetPath,
  8. String? assetPackage = 'hijri_date',
  9. BoxFit fit = BoxFit.contain,
  10. bool usePhaseBasedIllumination = false,
  11. double moonScale = 0.9,
})

Implementation

const MoonPhaseWidget({
  super.key,
  required this.moonInfo,
  this.size = 160,
  this.overlayColor = Colors.black,
  this.overlayOpacity = 0,
  this.moonAssetPath = 'assets/moon.svg',
  this.backgroundAssetPath,
  this.assetPackage = 'hijri_date',
  this.fit = BoxFit.contain,
  this.usePhaseBasedIllumination = false,
  this.moonScale = 0.9,
})  : assert(overlayOpacity >= 0 && overlayOpacity <= 1),
      assert(moonScale > 0 && moonScale <= 1);