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
| // A string search algorithm that can handle typographical errors and misspellings | |
| // Returns true if there is a match or if strings are similar enough | |
| bool isFound(String string, String search) { | |
| if (search.isEmpty) return true; | |
| final String lowerString = string.toLowerCase(); | |
| final String lowerSearch = search.toLowerCase(); | |
| // Quick check for exact substring match | |
| if (lowerString.contains(lowerSearch)) return true; |
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
| class AnimatedDigit extends StatefulWidget { | |
| final int value; | |
| final TextStyle? style; | |
| const AnimatedDigit({ | |
| super.key, | |
| required this.value, | |
| this.style, | |
| }); |
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:ui"; | |
| import "package:flutter/material.dart"; | |
| /// Use with ClipRect or ClipRRect if the blur covers everwehre | |
| class AnimatedBlur extends StatefulWidget { | |
| final Widget child; | |
| final double beginBlur; | |
| final double endBlur; | |
| final Duration duration; |
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 DottedBackgroundPainter extends CustomPainter { | |
| @override | |
| void paint(Canvas canvas, Size size) { | |
| final paint = Paint() | |
| ..color = Colors.white10 | |
| ..style = PaintingStyle.fill; | |
| double spacing = 10; |
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
| enum Length { | |
| millimeter, | |
| centimeter, | |
| meter, | |
| kilometer, | |
| inch, | |
| foot, | |
| yard, | |
| mile, | |
| } |
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
| part of "auth/auth.dart"; | |
| /// A typedef for a function that deserializes JSON into an object of type [T]. | |
| /// | |
| /// Example usage: | |
| /// ```dart | |
| /// User userFromJson(Map<String, dynamic> json) => User.fromJson(json); | |
| /// ``` | |
| typedef Serializer<T> = T Function(Map<String, dynamic> data); |
NewerOlder