Skip to content

Instantly share code, notes, and snippets.

View sparkwud's full-sized avatar
🏄‍♂️

Kelvin Agbenyo sparkwud

🏄‍♂️
View GitHub Profile
import 'package:flutter/material.dart';
class ExpandTapArea extends StatelessWidget {
final Widget child;
final VoidCallback onTap;
final EdgeInsetsGeometry padding;
const ExpandTapArea({
required this.child,
required this.onTap,
import 'package:core_platform/core_platform.dart';
import 'package:flutter/material.dart';
import 'package:my_credit_score_app/ux/resources/dimens.dart';
import 'package:my_credit_score_app/ux/resources/images.dart';
class DatePickerIcon extends StatelessWidget {
final VoidCallback onTap;
const DatePickerIcon({super.key, required this.onTap});
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class DecoratedInputBorder extends InputBorder {
DecoratedInputBorder({required this.child, required this.shadow})
: super(borderSide: child.borderSide);
figma switch from prototype mode to design mode
replace "proto" in the url with "design"
e.g
https://www.figma.com/proto/aBupFN0JtHEHnoVAJrcBZn/branch/lQD6aLIZM6gcmAMw38smJe/Hubtel-Retailer
becomes
https://www.figma.com/design/aBupFN0JtHEHnoVAJrcBZn/branch/lQD6aLIZM6gcmAMw38smJe/Hubtel-Retailer
import 'package:flutter/material.dart';
class CustomToggleSwitch extends StatelessWidget {
const CustomToggleSwitch({
super.key,
required this.value,
this.onToggle,
this.activeColor,
this.inactiveColor,
this.width = 52,
{
"files.autoSave": "afterDelay",
// "kotlin.java.home": "C:\\Program Files\\Java\\jdk-19",
"dart.debugExternalPackageLibraries": true,
"dart.debugSdkLibraries": false,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"terminal.integrated.defaultProfile.windows": "Git Bash",
// "workbench.iconTheme": "material-icon-theme",
import 'package:intl/intl.dart';
// https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html
extension DateTimeFormattingExtensions on DateTime {
// Existing methods
String get day => DateFormat('d').format(this); // e.g., "6"
String get abbrWeekday => DateFormat('E').format(this); // e.g., "Thu"
String get weekday => DateFormat('EEEE').format(this); // e.g., "Thursday"
String get abbrStandaloneMonth => DateFormat('LLL').format(this); // e.g., "Jun"
String get standaloneMonth => DateFormat('LLLL').format(this); // e.g., "June"
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
class SkeletonBox extends StatelessWidget {
const SkeletonBox({
super.key,
required this.width,
required this.height,
this.borderRadius = 4.0,
this.delay,
import 'package:flutter/material.dart';
class StarRating extends StatelessWidget {
final double rating;
final double size;
final Color filledColor;
final Color unfilledColor;
const StarRating({
super.key,
Text.rich(
TextSpan(
children: [
const TextSpan(
text: "${AppStrings.enterTheOtp} ",
),
TextSpan(
text: phoneNumber,
style: const TextStyle(fontWeight: FontWeight.bold),
),