magic_card library

Classes

AnimatedFoil
An implicitly animated widget for Foil gradients.
CardView
Crinkle
Provide animation to a piece of Foil by wrapping it in a Roll with a specified Crinkle.
CustomErrorIndicator
A custom error indicator that doesn't use Material components
Foil
FoilMagicCard
Returns a Widget displaying a Magic: The Gathering card with optional foil effect.
Foils
Pre-rolled Gradients for deployment as Foil.gradient or anywhere else a Gradient is called for.
FoilShader
PointerTracker
A widget that tracks pointer movements and reports normalized positions.
Roll
A widget that provides shared gradient and animation properties to descendant Foil widgets.
RolledOutFoil
An implicitly animated widget that handles position animations for foil effects.
RollState
State class for Roll that manages animations and provides properties to descendant Foil widgets.
Scalar
A Scalar provides an opportunity to scale axis-based double data. Default constructor takes named paramters per axis. Use Scalar.xy as a shortcut to only provide positional double values.
Sheet
A wrapper for the parameters that pertain to an Animated/Container.
StaticFoil
TradingCard
TranslateGradient
This class's transform method considers TextDirection and will consider positive values as translation to the right if ltr and translate left for positive values if rtl.

Functions

getImage({required String id, ImageVersion size = ImageVersion.normal, bool back = true}) Future<Uint8List>
getMagicCard({required String scryfallId, bool isFoil = false, double? width, double? height, BoxFit fit = BoxFit.contain, double primaryFoilOpacity = 0.4, double secondaryFoilOpacity = 0.25, Gradient primaryFoilGradient = Foils.linearRainbow, Gradient secondaryFoilGradient = Foils.oilslick, double borderRadius = 16.0}) Widget
A simplified function to get a Magic card widget with optional foil effect
sfClient() → ScryfallApiClient

Typedefs

PointerCallback = void Function(double normalizedX, double normalizedY)
Function signature for callbacks that report normalized pointer position.
TransformGradient = GradientTransform Function(double x, double y)
The definition of a Function that positionally accepts a
double x then double y and returns a GradientTransform,
such as the default for this package: TranslateGradient.