kd_utils 0.1.1
kd_utils: ^0.1.1 copied to clipboard
This package is for utils and custom widgets so any one can use and make there app as hi/she like
My Utils #
A My_Utils is make to help developers to fast and smooth coding experience with helping widget and method in flutter
Get Started #
import 'package:kd_utils/kd_utils.dart';
TimeStamp
Usage. #
final DateTime date = getDateTimeFromTimeStamp(timeStamp: "1694160861");
print(date); // 2023-09-08 13:44:21.000
final weekDay = getWeekDay(1, short: true);
print(weekDay); // Mon
Date Picker
Usage. #
DatePickerView(
currentDate: DateTime.now(),
startDate: DateTime.now().subtract(Duration(days: 50)),
endDate: DateTime.now().add(Duration(days: 50)),
weekday: TextStyle(fontSize: 12, fontWeight: FontWeight.bold),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10)),
onDateClick: (selectedDate) {
print(selectedDate);
},
),
Dot Line painter #
CustomPaint(
painter: DotLinePainter(
dotheight: 4,
space: 16,
strokeWdith: 5,
strokeCap: StrokeCap.round,
axis: Axis.vertical,
),
),
Extension methos #
Widgets Extension
200.height,
10.width,
Context Extension
ThemeData themeData = context.theme;
EdgeInsets padding = context.viewPadding;
Size screenSize = context.screenSize;
double screenWidth = context.screenWidth;
double screenHeight = context.screenHeight;
Base Api class #
class MyApi extends AppApiService{
@override
Future get(String url) {
// TODO: implement get
throw UnimplementedError();
}
@override
Future post(String url, {required Map<String, dynamic> body}) {
// TODO: implement post
throw UnimplementedError();
}
}