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 'package:flutter/material.dart'; | |
class RailTransition extends StatefulWidget { | |
const RailTransition({ super.key, required this.animation, required this.child }); | |
final Animation<double> animation; | |
final Widget child; | |
@override | |
State<RailTransition> createState() => _RailTransition(); |
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 'package:flutter/material.dart'; | |
enum GlideDirection { | |
startToEnd, | |
endToStart, | |
up, | |
down, | |
} |
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 'package:flutter/material.dart'; | |
enum GlideDirection { | |
startToEnd, | |
endToStart, | |
up, | |
down, | |
} | |
// animation.value == 0, child is not visible |
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' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/services.dart'; | |
typedef _NextChild = RenderBox? Function(RenderBox child); |
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 'package:flutter/material.dart'; | |
class Badge extends StatelessWidget { | |
const Badge({ | |
super.key, | |
this.backgroundColor, | |
this.label, | |
this.child, | |
}); |
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 'package:flutter/material.dart'; | |
class Star { | |
const Star({ | |
this.fillColor = Colors.white, | |
this.borderColor = Colors.black, | |
this.borderWidth = 9, | |
this.points = 7, | |
this.innerRadiusRatio = 0.75, | |
this.pointRounding = 0.5, |
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 'package:flutter/material.dart'; | |
class Star { | |
const Star({ | |
this.fillColor = Colors.white, | |
this.borderColor = Colors.black, | |
this.borderWidth = 9, | |
this.points = 7, | |
this.innerRadiusRatio = 0.75, | |
this.pointRounding = 0.5, |
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 'package:flutter/material.dart'; | |
class Star { | |
const Star(this.title); | |
final String title; | |
} | |
class StarView extends StatefulWidget { | |
const StarView({ super.key, required this.star, required this.onTitleChanged }); |
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 'package:flutter/material.dart'; | |
class Star { | |
const Star({ | |
this.fillColor = Colors.white, | |
this.borderColor = Colors.black, | |
this.borderWidth = 9, | |
this.points = 7, | |
this.innerRadiusRatio = 0.75, | |
this.pointRounding = 0.5, |
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
// Add inflateRRect to EdgeInsets. #108908 | |
// https://github.com/flutter/flutter/pull/108908 | |
import 'package:flutter/material.dart'; | |
class RRectPainter extends CustomPainter { | |
const RRectPainter(this.roundedRect); | |
final RRect roundedRect; |