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

removed profile pic and added an horizontal line to some pages #1294

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added codecov
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:uni/model/providers/startup/profile_provider.dart';
import 'package:uni/model/providers/startup/session_provider.dart';
import 'package:uni/view/common_widgets/expanded_image_label.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/bottom_navigation_bar.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/profile_button.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/refresh_state.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/top_navigation_bar.dart';

Expand Down Expand Up @@ -136,7 +135,6 @@ abstract class GeneralPageViewState<T extends StatefulWidget> extends State<T> {
AppTopNavbar? getTopNavbar(BuildContext context) {
return AppTopNavbar(
title: this.getTitle(),
rightButton: const ProfileButton(),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,54 @@ import 'package:uni/view/common_widgets/page_title.dart';
class AppTopNavbar extends StatelessWidget implements PreferredSizeWidget {
const AppTopNavbar({
this.title,
this.rightButton,
DGoiana marked this conversation as resolved.
Show resolved Hide resolved
this.leftButton,
super.key,
});

static const double borderMargin = 18;

final String? title;
final Widget? rightButton;
final Widget? leftButton;

Widget _createTopWidgets(BuildContext context) {
return Padding(
padding: EdgeInsets.fromLTRB(leftButton == null ? 20 : 12, 0, 20, 0),
child: Row(
children: [
if (leftButton != null)
Padding(
padding: const EdgeInsets.only(right: 8),
child: leftButton,
),
Expanded(
child: PageTitle(
name: title ?? '',
pad: false,
center: false,
),
final shouldShowDivider = title == 'Faculty' || title == 'Restaurants';

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.fromLTRB(leftButton == null ? 20 : 12, 0, 20, 0),
child: Row(
children: [
if (leftButton != null)
Padding(
padding: const EdgeInsets.only(right: 8),
child: leftButton,
),
Expanded(
child: PageTitle(
name: title ?? '',
pad: false,
center: false,
),
),
],
),
if (rightButton != null)
Padding(
padding: const EdgeInsets.only(left: 8),
child: rightButton,
),
if (shouldShowDivider)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
child: Container(
height: 1,
color: const Color(0xFF7F7F7F),
),
],
),
),
],
);
}

@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
Size get preferredSize => const Size.fromHeight(kToolbarHeight + 10);

@override
AppBar build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ abstract class SecondaryPageViewState<T extends StatefulWidget>
return AppTopNavbar(
title: getTitle(),
leftButton: const BackButton(),
rightButton: getTopRightButton(context),
);
}
}
2 changes: 0 additions & 2 deletions packages/uni_app/lib/view/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:uni/generated/l10n.dart';
import 'package:uni/utils/favorite_widget_type.dart';
import 'package:uni/view/common_widgets/page_title.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/general.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/profile_button.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/widgets/top_navigation_bar.dart';
import 'package:uni/view/home/widgets/main_cards_list.dart';
import 'package:uni/view/home/widgets/tracking_banner.dart';
Expand Down Expand Up @@ -132,7 +131,6 @@ class HomePageViewState extends GeneralPageViewState {
padding: EdgeInsets.symmetric(horizontal: 8),
child: UniIcon(),
),
rightButton: ProfileButton(),
);
}
}
Loading