This file contains 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 Shimmer extends StatefulWidget { | |
final Widget child; | |
final Duration period; | |
final Gradient gradient; | |
Shimmer({Key key, this.child, this.period, this.gradient}): super(key: key); | |
@override |
This file contains 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/rendering.dart'; | |
class _Shimmer extends SingleChildRenderObjectWidget { | |
final Gradient gradient; | |
_Shimmer({Widget child, this.gradient}) | |
: super(child: child); | |
@override | |
_ShimmerFilter createRenderObject(BuildContext context) { |
This file contains 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
class _ShimmerState extends State<Shimmer> with TickerProviderStateMixin { | |
AnimationController controller; | |
@override | |
void initState() { | |
super.initState(); | |
controller = AnimationController(vsync: this, duration: widget.period) | |
..addListener(() { | |
setState(() {}); | |
}) |
This file contains 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
class FlipWidget extends StatelessWidget { | |
Widget child; | |
FlipWidget({Key key, this.child}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
mainAxisSize: MainAxisSize.min, | |
children: [ |
This file contains 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
@override | |
Widget build(BuildContext context) { | |
return Column( | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
Transform( | |
transform: Matrix4.rotationX(pi / 4), | |
alignment: Alignment.bottomCenter, | |
child: ClipRect( | |
child: Align( |
This file contains 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
... | |
Transform( | |
transform: Matrix4.identity()..setEntry(3, 2, 0.006)..rotateX(pi / 4), | |
alignment: Alignment.bottomCenter, | |
child: ClipRect( | |
child: Align( | |
alignment: Alignment.topCenter, | |
heightFactor: 0.5, | |
child: child, | |
)), |
This file contains 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'; | |
import 'dart:math' as math; | |
import 'dart:async'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
This file contains 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:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:zoomable_image/zoomable_image.dart'; | |
import 'page_indicator.dart'; |
This file contains 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'; | |
import 'dart:math'; | |
class DotsIndicator extends AnimatedWidget { | |
DotsIndicator({ | |
Key key, | |
this.controller, | |
this.itemCount, | |
this.onPageSelected, | |
this.color: Colors.white, |
This file contains 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:convert'; | |
import 'dart:math'; | |
import 'dart:typed_data'; | |
import "package:pointycastle/export.dart"; | |
import "package:asn1lib/asn1lib.dart"; | |
List<int> decodePEM(String pem) { | |
var startsWith = [ | |
"-----BEGIN PUBLIC KEY-----", | |
"-----BEGIN PRIVATE KEY-----", |
OlderNewer