Skip to content

Commit

Permalink
Merge pull request #32 from AdrianMargineanu/edit_profile
Browse files Browse the repository at this point in the history
Authentication bug fixes
  • Loading branch information
IoanaAlexandru authored Sep 21, 2020
2 parents 303ca5f + 1a3e6e4 commit 9125681
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
15 changes: 9 additions & 6 deletions lib/authentication/view/dropdown_tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ class DropdownTree extends StatefulWidget {
final List<String> initialPath;
final double leftPadding;
final DropdownTreeController controller;
final TextStyle textStyle;

DropdownTree({
Key key,
this.initialPath,
this.leftPadding,
this.controller,
this.textStyle,
}) : super(key: key);

@override
Expand All @@ -47,10 +49,11 @@ class _DropdownTreeState extends State<DropdownTree> {
EdgeInsets.only(top: 8.0, left: widget.leftPadding ?? 0.0),
child: Text(
filter.localizedLevelNames[i][LocaleProvider.localeString],
style: Theme.of(context)
.textTheme
.caption
.apply(color: Theme.of(context).hintColor),
style: widget.textStyle ??
Theme.of(context)
.textTheme
.subtitle1
.apply(fontSizeFactor: 1.1),
),
),
DropdownButtonFormField<FilterNode>(
Expand Down Expand Up @@ -90,8 +93,8 @@ class _DropdownTreeState extends State<DropdownTree> {
if (snap.hasData) {
filter = snap.data;
nodes ??= widget.initialPath == null
? [filter.root]
: filter.findNodesByPath(widget.initialPath);
? [filter.root]
: filter.findNodesByPath(widget.initialPath);
return Column(
children: _buildDropdowns(context),
);
Expand Down
4 changes: 4 additions & 0 deletions lib/authentication/view/edit_profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ class _EditProfilePageState extends State<EditProfilePage> {
initialPath: path,
controller: dropdownController,
leftPadding: 10.0,
textStyle: Theme.of(context)
.textTheme
.caption
.apply(color: Theme.of(context).hintColor),
)
]),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/authentication/view/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class _ProfilePageState extends State<ProfilePage> {
User user = snap.data;
if (user != null) {
userName = user.firstName + ' ' + user.lastName;
userGroup = user?.classes?.last;
userGroup = user.classes != null ? user.classes.last : null;
}
return Column(
children: <Widget>[
Expand Down
1 change: 0 additions & 1 deletion lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A mobile application for students at ACS UPB.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.7.1+2
version: 0.7.1+3

environment:
sdk: ">=2.6.0 <3.0.0"
Expand Down

0 comments on commit 9125681

Please sign in to comment.