Initial commit

This commit is contained in:
2022-08-31 22:19:20 -04:00
commit a8e802ffab
114 changed files with 4555 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
DateTimeRange constructDateRange(DateTime startDateTime, DateTime endDateTime) {
var startDate = DateTime(
startDateTime.year,
startDateTime.month,
startDateTime.day,
);
var endDate = DateTime(
endDateTime.year,
endDateTime.month,
endDateTime.day,
23,
59,
59,
);
return DateTimeRange(start: startDate, end: endDate);
}

View File

@@ -0,0 +1,12 @@
String greeting() {
var currentHour = DateTime.now().hour;
if (currentHour > 4 && currentHour < 11) {
return "Good morning";
} else if (currentHour >= 11 && currentHour < 17) {
return "Good afternoon";
} else if (currentHour >= 17 && currentHour < 21) {
return "Good evening";
} else {
return "Good night";
}
}

23
lib/src/utils/theme.dart Normal file
View File

@@ -0,0 +1,23 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
ThemeData _baseTheme = ThemeData(
primarySwatch: Colors.deepPurple,
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Colors.grey[100],
unselectedItemColor: Colors.grey[500],
),
textTheme: TextTheme(
subtitle2: TextStyle(
color: Colors.grey[500],
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
);
ThemeData myFurmanTheme = _baseTheme.copyWith(
textTheme: GoogleFonts.interTextTheme(_baseTheme.textTheme),
);
var furmanTextStyle = (TextStyle baseStyle) => GoogleFonts.inter(textStyle: baseStyle);