Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated some files for better GUI #41

Merged
merged 4 commits into from
Oct 25, 2020
Merged

Updated some files for better GUI #41

merged 4 commits into from
Oct 25, 2020

Conversation

ShahzadUmarBaig
Copy link
Contributor

Check the GUI please #40

@@ -1,5 +1,8 @@
import 'package:flutter/cupertino.dart' as c;
import 'package:flutter/widgets.dart';
import 'package:star_book/models/mood.dart';
import 'package:star_book/utils/color.dart';
import 'package:star_book/widgets/color_container.dart';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use relative import.
Add them below //Files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay let me check what do you mean.

@@ -23,6 +26,7 @@ class _ActivityEditSheetState extends State<ActivityEditSheet> {
Activity activity;
final TextEditingController titleController = TextEditingController();
final TextEditingController noteController = TextEditingController();
var containerColor;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there is no need for this variable

text: "Mood",
icon: c.CupertinoIcons.right_chevron,
color: containerColor,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a function to get container color

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on this

@@ -70,6 +74,14 @@ class _ActivityEditSheetState extends State<ActivityEditSheet> {
}

Widget _buildBody(BuildContext context) {
// Before we return the body of the main context/activity sheet, it checks the conditions everytime
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return the result from that function based on the condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let me fix that using the method.

),
),
Container(
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 seems a bit small. what do you say?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 Looks better but Let me change it to 10

@ShahzadUmarBaig
Copy link
Contributor Author

Completed all of the tasks, you can review them and let me know for any further changings

import '../models/activity.dart';
import '../widgets/my_container.dart';
import '../controllers/activity.dart';
import '../styles/style.dart';
import 'package:star_book/utils/color.dart';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import 'package:star_book/utils/color.dart';
import '../utils/color.dart';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

import '../models/activity.dart';
import '../widgets/my_container.dart';
import '../controllers/activity.dart';
import '../styles/style.dart';
import 'package:star_book/utils/color.dart';
import 'package:star_book/widgets/color_container.dart';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import 'package:star_book/widgets/color_container.dart';
import '../widgets/color_container.dart';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -54,6 +55,14 @@ class _ActivityEditSheetState extends State<ActivityEditSheet> {
Navigator.of(context, rootNavigator: true).pop();
}

c.CupertinoDynamicColor _getMoodColor() {
return activity.moodId == null
? c.CupertinoColors.systemGrey
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? c.CupertinoColors.systemGrey
? c.CupertinoDynamicColor.resolve( c.CupertinoColors.tertiarySystemGroupedBackground, context)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

return activity.moodId == null
? c.CupertinoColors.systemGrey
: getColor(
EColor.values[activity.moodId],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EColor.values[activity.moodId],
c.CupertinoDynamicColor.resolve(EColor.values[activity.moodId], context)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot (111)

ref

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  c.CupertinoDynamicColor _getMoodColor() {
    return c.CupertinoDynamicColor.resolve(
      activity.moodId == null
          ? c.CupertinoColors.tertiarySystemGroupedBackground
          : getColor(
              EColor.values[activity.moodId],
            ),
      context,
    );

@hashirshoaeb hashirshoaeb merged commit d03e3c8 into Blocship:master Oct 25, 2020
@hashirshoaeb hashirshoaeb linked an issue Oct 25, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes Suggestion
2 participants