Skip to content

Commit

Permalink
Google fonts issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
BrawlerXull committed Jun 2, 2024
1 parent 4fb01e1 commit ffb3d96
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 67 deletions.
21 changes: 7 additions & 14 deletions lib/app/modules/about/views/about_page_app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:taskwarrior/app/utils/gen/assets.gen.dart';
import 'package:url_launcher/url_launcher.dart';

import '../controllers/about_controller.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';

class AboutPageAppBar extends StatelessWidget implements PreferredSizeWidget {
const AboutPageAppBar({super.key});
Expand All @@ -25,7 +14,11 @@ class AboutPageAppBar extends StatelessWidget implements PreferredSizeWidget {
backgroundColor: TaskWarriorColors.kprimaryBackgroundColor,
title: Text(
'About',
style: GoogleFonts.poppins(color: TaskWarriorColors.white),
// style: GoogleFonts.poppins(color: TaskWarriorColors.white),
style: TextStyle(
fontFamily: FontFamily.poppins,
color: TaskWarriorColors.white,
),
),
leading: GestureDetector(
onTap: () {
Expand All @@ -39,6 +32,6 @@ class AboutPageAppBar extends StatelessWidget implements PreferredSizeWidget {
);
}

@override
@override
Size get preferredSize => AppBar().preferredSize;
}
18 changes: 10 additions & 8 deletions lib/app/modules/about/views/about_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:taskwarrior/app/modules/about/views/about_page_app_bar.dart';
import 'package:taskwarrior/app/utils/gen/assets.gen.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:url_launcher/url_launcher.dart';

import '../controllers/about_controller.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';

class AboutPageBody extends StatelessWidget {
const AboutPageBody({super.key});

@override
Widget build(BuildContext context) {
String introduction =
String introduction =
"This project aims to build an app for Taskwarrior. It is your task management app across all platforms. It helps you manage your tasks and filter them as per your needs.";

return Padding(
Expand Down Expand Up @@ -85,7 +79,15 @@ class AboutPageBody extends StatelessWidget {
children: <TextSpan>[
TextSpan(
text: 'Version: ',
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontWeight: TaskWarriorFonts.bold,
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? TaskWarriorColors.white
// : TaskWarriorColors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
Expand Down
8 changes: 1 addition & 7 deletions lib/app/modules/about/views/about_view.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:package_info_plus/package_info_plus.dart';

import 'package:taskwarrior/app/modules/about/views/about_page_app_bar.dart';
import 'package:taskwarrior/app/modules/about/views/about_page_body.dart';
import 'package:taskwarrior/app/utils/gen/assets.gen.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:url_launcher/url_launcher.dart';

import '../controllers/about_controller.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

class AboutView extends GetView<AboutController> {
Expand Down
62 changes: 44 additions & 18 deletions lib/app/modules/detailRoute/views/dateTimePicker.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// ignore_for_file: file_names, use_build_context_synchronously

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

import 'package:intl/intl.dart';

import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

class DateTimeWidget extends StatelessWidget {
Expand Down Expand Up @@ -40,21 +40,36 @@ class DateTimeWidget extends StatelessWidget {
children: <TextSpan>[
TextSpan(
text: '$name:'.padRight(13),
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontWeight: TaskWarriorFonts.bold,
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
TextSpan(
text: value ?? "not selected",
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
],
Expand Down Expand Up @@ -129,8 +144,7 @@ class DateTimeWidget extends StatelessWidget {
var date = await showDatePicker(
context: context,
initialDate: initialDate,
firstDate:
now,
firstDate: now,
lastDate: DateTime(2037, 12, 31), // < 2038-01-19T03:14:08.000Z
);

Expand All @@ -147,9 +161,7 @@ class DateTimeWidget extends StatelessWidget {
),
);


if (dateTime.isBefore(DateTime.now())) {

ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
Expand All @@ -167,7 +179,6 @@ class DateTimeWidget extends StatelessWidget {
),
);
} else {

return callback(dateTime.toUtc());
}
}
Expand Down Expand Up @@ -211,21 +222,36 @@ class StartWidget extends StatelessWidget {
children: <TextSpan>[
TextSpan(
text: '$name:'.padRight(13),
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontWeight: TaskWarriorFonts.bold,
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
TextSpan(
text: value ?? "not selected",
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
],
Expand Down
56 changes: 43 additions & 13 deletions lib/app/modules/detailRoute/views/description_widget.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';

import 'package:loggy/loggy.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

class DescriptionWidget extends StatelessWidget {
Expand Down Expand Up @@ -37,21 +37,36 @@ class DescriptionWidget extends StatelessWidget {
children: <TextSpan>[
TextSpan(
text: '$name:'.padRight(13),
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontWeight: TaskWarriorFonts.bold,
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
TextSpan(
text: value ?? "not selected",
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
],
Expand Down Expand Up @@ -159,21 +174,36 @@ class ProjectWidget extends StatelessWidget {
children: <TextSpan>[
TextSpan(
text: '$name:'.padRight(13),
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontWeight: TaskWarriorFonts.bold,
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
TextSpan(
text: value ?? "not selected",
style: GoogleFonts.poppins(
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
// ? Colors.white
// : Colors.black,
// ),
style: TextStyle(
fontFamily: FontFamily.poppins,
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
? Colors.white
: Colors.black,
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/controllers/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,6 @@ class HomeController extends GetxController {

void initDarkMode() {
isDarkModeOn.value = AppSettings.isDarkMode;
print("called and value is" + isDarkModeOn.value.toString());
print("called and value is${isDarkModeOn.value}");
}
}
1 change: 0 additions & 1 deletion lib/app/modules/home/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:taskwarrior/app/modules/home/views/nav_drawer.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/taskserver/taskserver.dart';
import 'package:taskwarrior/app/utils/home_path/home_path.dart' as rc;
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import '../controllers/home_controller.dart';

Expand Down
Loading

0 comments on commit ffb3d96

Please sign in to comment.