This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct PausableRotation: GeometryEffect { | |
@Binding var currentAngle: Double | |
private var currentAngleValue: Double = 0.0 | |
var animatableData: Double { | |
get { currentAngleValue } | |
set { currentAngleValue = newValue } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
// based on https://github.com/fedeoo/flip_card/ | |
// provides a callback to the front & back widgets so they can trigger the flip, therefore the CardSideBuilder | |
// note this version only flips horizontally | |
class AnimationCard extends StatelessWidget { | |
AnimationCard({this.child, this.animation}); |