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( |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
@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
class ReadMoreWithMention extends StatefulWidget { | |
final String text; | |
final TextStyle? textStyle; | |
final String readMoreText; | |
final TextStyle? readMoreTextStyle; | |
final int maxLines; | |
final int steps; | |
// final bool shouldUseSteps; | |
const ReadMoreWithMention({ | |
Key? 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
class ResizingCard extends StatefulWidget { | |
const ResizingCard({Key? key, this.onClose}) : super(key: key); | |
final VoidCallback? onClose; | |
@override | |
State<ResizingCard> createState() => _ResizingCardState(); | |
} | |
class _ResizingCardState extends State<ResizingCard> |
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 CustomTrackShape extends RoundedRectSliderTrackShape { | |
@override | |
Rect getPreferredRect( | |
{required RenderBox parentBox, | |
Offset offset = Offset.zero, | |
required SliderThemeData sliderTheme, | |
bool isEnabled = false, | |
bool isDiscrete = false}) { |
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 ReadMore extends StatefulWidget { | |
final String text; | |
final TextStyle? textStyle; | |
final String readMoreText; | |
final TextStyle? readMoreTextStyle; | |
final int maxLines; | |
final int steps; |
NewerOlder