Skip to content

Commit

Permalink
Scroll ui
Browse files Browse the repository at this point in the history
Add scrollbar to wrap orientation builder.
Add padding to  orientation builder.
Add logo, labels and spaces to personal data.
Disable scroll to the personal data  listview.
  • Loading branch information
alexandrepasc committed Dec 11, 2019
1 parent 9aaecf4 commit 5e3d9ef
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions gsr_draft/lib/component/coachDetail/CoachDetailProfileTab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,22 @@ class _CoachDetailProfileTab extends State<CoachDetailProfileTab> {

Card _getPersonalData() => Card(
child: ListView(
//shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: <Widget>[
logo,
SizedBox(height: mediumHeight),
_infoText("First Name:"),
SizedBox(height: smallHeight),
_getFirstNameInput(),
SizedBox(height: buttonHeight),
_infoText("Last Name:"),
SizedBox(height: smallHeight),
_getLastNameInput(),
SizedBox(height: buttonHeight),
_infoText("Description:"),
SizedBox(height: smallHeight),
_getDescriptionInput(),
SizedBox(height: buttonHeight),
_checkPermissions()
]
)
Expand All @@ -102,7 +113,7 @@ class _CoachDetailProfileTab extends State<CoachDetailProfileTab> {
OrientationBuilder _orientationBuilder() => OrientationBuilder(
builder: (context, orientation) {
return GridView.count(
//shrinkWrap: true,
padding: EdgeInsets.all(15.0),
crossAxisCount: orientation == Orientation.portrait ? 1 : 2,
children: <Widget>[
_getPersonalData(),
Expand All @@ -113,9 +124,17 @@ class _CoachDetailProfileTab extends State<CoachDetailProfileTab> {
}
);

return _orientationBuilder();
return Scrollbar(
child: _orientationBuilder(),
);
}

final logo = CircleAvatar(
backgroundColor: Colors.transparent,
radius: bigRadius,
child: studentLogo,
);

Text _infoText(String txt) => Text(
txt,
style: TextStyle(
Expand Down

0 comments on commit 5e3d9ef

Please sign in to comment.