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 'package:flutter_hooks/flutter_hooks.dart'; | |
class AppSlidable extends HookWidget { | |
const AppSlidable({ | |
required this.child, | |
required this.actions, | |
super.key, | |
}); |
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 StripesPainter extends CustomPainter { | |
StripesPainter({required this.stripeColor}); | |
final Color stripeColor; | |
@override | |
void paint(Canvas canvas, Size size) { | |
final paint = Paint() | |
..color = stripeColor |
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'; | |
abstract class AppTypography { | |
AppTypography({ | |
required this.name, | |
required this.regular, | |
required this.medium, | |
required this.semiBold, | |
required this.bold, | |
}); |
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 AppText extends StatelessWidget { | |
const AppText( | |
this.text, { | |
super.key, | |
required this.textStyle, | |
required this.textAlign, | |
}); | |
final String text; | |
final TextStyle textStyle; |
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/services.dart'; | |
class PhoneNumberFormatter extends TextInputFormatter { | |
@override | |
TextEditingValue formatEditUpdate( | |
TextEditingValue oldValue, TextEditingValue newValue,) { | |
if (newValue.text.isEmpty) { | |
return newValue; | |
} |
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:math' as math; | |
class RoundedTrapezoidShapePainter extends CustomPainter { | |
/// BackgroundColor of the shape | |
/// | |
final Color? color; | |
/// Radius of the topRight and topLeft corners | |
/// | |
final double radius; |
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/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
class ClickableTextView extends StatelessWidget { | |
final String text; | |
const ClickableTextView({Key? key, required this.text}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return RichText( |
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 'package:flutter/services.dart'; | |
class CardInputFormatter extends TextInputFormatter { | |
CardInputFormatter({required this.separator, this.splitAt = 4}); | |
final String separator; | |
final int splitAt; | |
@override | |
TextEditingValue formatEditUpdate( |
NewerOlder