owlnext_utils 0.3.0
owlnext_utils: ^0.3.0 copied to clipboard
Owlnext Front-end utilitaries
0.3.0 #
- Added [decimalSeparator] and [thousandsSeparator] properties to [parseDoubleIntoAmount] method
0.2.0+1 #
- Removing flutter_dotenv dependency
- Removed isMobileView and isTabletView methods
if you need those methods back in your app, see flutter_skeleton example (lib/system/screen_size/app_screen_size.dart), or simply paste this code in you app:
import 'package:flutter/material.dart';
import 'package:owlnext_utils/owlnext_utils.dart';
bool isMobileView(BuildContext context) {
var longestSide = MediaQuery.of(context).size.width;
return longestSide < ScreenSizeConstants.MOBILE_LANDSCAPE_BREAKPOINT;
}
bool isTabletView(BuildContext context) {
var longestSide = MediaQuery.of(context).size.width;
return longestSide < ScreenSizeConstants.TABLET_LANDSCAPE_BREAKPOINT;
}
0.1.0 #
- Removed dependency to intl
- Removed dependency to path_provider
[BC BREAKS] Commented [offline_utils] whole file (was binded to hard coded agriechange code), if you need it in your app, just copy the whole file from package and adapt it. Commented [getTodayDate] extension on DateTime (because heavily relies on intl) Commented [prettifyISODate] extension on String (because heavily relies on intl)
if you want to repair that BC BREAK in your app, copy them from the commented function of this package or in the code section below
extension PrettifyStringExtension on String {
String prettifyISODate(String isoDate, bool? hasHours) {
isoDate = isoDate.substring(0, isoDate.length - 6).replaceAll('T', ' ');
var inputFormat = DateFormat('yyyy-MM-dd HH:mm');
var inputDate = inputFormat.parse(isoDate);
var outputFormat = DateFormat('dd-MM-yyyy');
if (hasHours == true) {
outputFormat = DateFormat('dd-MM-yyyy HH:mm', 'fr');
}
var outputDate = outputFormat.format(inputDate);
return outputDate;
}
}
extension TodayDateTimeExtension on DateTime {
/// Returns today's date as a formatted string with full weekday and month names,
/// with the first letter capitalized.
///
/// [code] : Optional named parameter specifying the language code (default: 'fr').
/// Example: 'fr' for French, 'en' for English.
///
/// Returns a [String] representing today's date in the chosen language.
String getTodayDate({
String code = 'fr', // Language code for formatting (default is French)
}) {
var dateFormat = DateFormat.yMMMMEEEEd(code);
final date = DateTime.now();
return dateFormat.format(date).capitalize();
}
}
0.0.5 #
- Downgraded to environment: sdk: ">=3.1.0 <4.0.0" flutter: ">=3.22.0"
0.0.4 #
- Downgraded Dart SDK to 3.7.0
0.0.3 #
- Added parsers & sorters
0.0.1 #
- Moving all common utilitaries to this package
- Cleaning code